]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit46302e29e45de16af7dc9ca020ca781b83d49329
treee1293f0a66bec110de424af51c1d60371fa816be
parentc00307bf87918191dd7b0c324b2d8b72ce54c9fe
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