OSDN Git Service

dpaa_eth: add XDP_TX support
authorCamelia Groza <camelia.groza@nxp.com>
Wed, 25 Nov 2020 16:53:33 +0000 (18:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Dec 2020 01:33:21 +0000 (17:33 -0800)
commitd57e57d0cd04be5ee533a0e1e6d13ba9251114b7
treee1293f0a66bec110de424af51c1d60371fa816be
parent828eadbaccc1b8090514d4b7ccc92b4876a0bd12
dpaa_eth: add XDP_TX support

Use an xdp_frame structure for managing the frame. Store a backpointer to
the structure at the start of the buffer before enqueueing for cleanup
on TX confirmation. Reserve DPAA_TX_PRIV_DATA_SIZE bytes from the frame
size shared with the XDP program for this purpose. Use the XDP
API for freeing the buffer when it returns to the driver on the TX
confirmation path.

The frame queues are shared with the netstack. The DPAA driver is a LLTX
driver so no explicit locking is required on transmission.

This approach will be reused for XDP REDIRECT.

Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
drivers/net/ethernet/freescale/dpaa/dpaa_eth.h