linux_dsm_epyc7002/drivers/net/ethernet
Jesper Dangaard Brouer 60bbf7eeef mlx5: use page_pool for xdp_return_frame call
This patch shows how it is possible to have both the driver local page
cache, which uses elevated refcnt for "catching"/avoiding SKB
put_page returns the page through the page allocator.  And at the
same time, have pages getting returned to the page_pool from
ndp_xdp_xmit DMA completion.

The performance improvement for XDP_REDIRECT in this patch is really
good.  Especially considering that (currently) the xdp_return_frame
API and page_pool_put_page() does per frame operations of both
rhashtable ID-lookup and locked return into (page_pool) ptr_ring.
(It is the plan to remove these per frame operation in a followup
patchset).

The benchmark performed was RX on mlx5 and XDP_REDIRECT out ixgbe,
with xdp_redirect_map (using devmap) . And the target/maximum
capability of ixgbe is 13Mpps (on this HW setup).

Before this patch for mlx5, XDP redirected frames were returned via
the page allocator.  The single flow performance was 6Mpps, and if I
started two flows the collective performance drop to 4Mpps, because we
hit the page allocator lock (further negative scaling occurs).

Two test scenarios need to be covered, for xdp_return_frame API, which
is DMA-TX completion running on same-CPU or cross-CPU free/return.
Results were same-CPU=10Mpps, and cross-CPU=12Mpps.  This is very
close to our 13Mpps max target.

The reason max target isn't reached in cross-CPU test, is likely due
to RX-ring DMA unmap/map overhead (which doesn't occur in ixgbe to
ixgbe testing).  It is also planned to remove this unnecessary DMA
unmap in a later patchset

V2: Adjustments requested by Tariq
 - Changed page_pool_create return codes not return NULL, only
   ERR_PTR, as this simplifies err handling in drivers.
 - Save a branch in mlx5e_page_release
 - Correct page_pool size calc for MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ

V5: Updated patch desc

V8: Adjust for b0cedc844c ("net/mlx5e: Remove rq_headroom field from params")
V9:
 - Adjust for 121e892754 ("net/mlx5e: Refactor RQ XDP_TX indication")
 - Adjust for 73281b78a3 ("net/mlx5e: Derive Striding RQ size from MTU")
 - Correct handling if page_pool_create fail for MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ

V10: Req from Tariq
 - Change pool_size calc for MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-17 10:50:29 -04:00
..
3com
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
amazon net: ena: Eliminate duplicate barriers on weakly-ordered archs 2018-03-26 12:47:56 -04:00
amd ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
apm
apple
aquantia net: aquantia: oops when shutdown on already stopped device 2018-04-11 10:41:36 -04:00
arc net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred 2018-03-20 12:06:23 -04:00
atheros
aurora
broadcom bnxt_en: Fix NULL pointer dereference at bnxt_free_irq(). 2018-04-11 14:42:00 -04:00
brocade ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
cadence treewide: fix up files incorrectly marked executable 2018-04-07 13:31:23 -07:00
calxeda
cavium liquidio: Enhanced ethtool stats 2018-04-17 09:56:52 -04:00
chelsio cxgb4: LLD driver changes to support TLS 2018-03-31 23:37:32 -04:00
cirrus
cisco enic: drop IP proto check for vxlan tunnel delete 2018-03-16 09:50:40 -04:00
cortina net: gemini: fix memory leak 2018-03-20 12:08:45 -04:00
davicom treewide: simplify Kconfig dependencies for removed archs 2018-03-26 15:55:57 +02:00
dec
dlink
emulex ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ezchip
faraday
freescale net/fsl_pq_mdio: Allow explicit speficition of TBIPA address 2018-04-08 12:44:49 -04:00
fujitsu
hisilicon net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES 2018-04-04 11:46:14 -04:00
hp
huawei
i825xx
ibm ibmvnic: Do not reset CRQ for Mobility driver resets 2018-04-08 12:39:47 -04:00
intel xdp: rhashtable with allocator ID to pointer mapping 2018-04-17 10:50:29 -04:00
marvell net: mvpp2: Fix parser entry init boundary check 2018-04-05 22:13:16 -04:00
mediatek net: mediatek: use of_device_get_match_data() 2018-04-16 13:43:07 -04:00
mellanox mlx5: use page_pool for xdp_return_frame call 2018-04-17 10:50:29 -04:00
micrel
microchip lan743x: make functions lan743x_csr_read and lan743x_csr_read static 2018-03-12 11:12:38 -04:00
moxa
myricom ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
neterion
netronome nfp: use full 40 bits of the NSP buffer address 2018-04-04 11:45:24 -04:00
ni net: ethernet: nixge: Add support for National Instruments XGE netdev 2018-03-29 11:51:00 -04:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2018-04-05 11:56:35 -07:00
qualcomm net: qualcomm: rmnet: check for null ep to avoid null pointer dereference 2018-03-26 12:11:24 -04:00
rdc
realtek r8169: replace magic numbers with PCI MRRS constant 2018-04-16 18:55:04 -04:00
renesas sh_eth: kill useless check in __sh_eth_get_regs() 2018-04-01 14:09:53 -04:00
rocker
samsung ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
seeq
sfc More power management updates for 4.17-rc1 2018-04-11 17:03:20 -07:00
sgi
silan
sis
smsc arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
socionext net: socionext: reset hardware in ndo_stop 2018-04-16 13:46:38 -04:00
stmicro net: stmmac: Switch stmmac_mode_ops to generic HW Interface Helpers 2018-04-16 18:50:03 -04:00
sun ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
synopsys
tehuti
ti Merge branch 'akpm' (patches from Andrew) 2018-04-06 14:19:26 -07:00
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
korina.c
lantiq_etop.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
netx-eth.c