OSDN Git Service

net: netsec: add XDP support
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Sat, 29 Jun 2019 05:23:25 +0000 (08:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2019 02:27:08 +0000 (19:27 -0700)
commitba2b232108d3c2951bab02930a00f23b0cffd5af
tree44f3634c61f1698ff8ed9a4f5d47bdbe70810f17
parentbb005f2a70742d66f8fe44d57e217c696e805d97
net: netsec: add XDP support

The interface only supports 1 Tx queue so locking is introduced on
the Tx queue if XDP is enabled to make sure .ndo_start_xmit and
.ndo_xdp_xmit won't corrupt Tx ring

- Performance (SMMU off)

Benchmark   XDP_SKB     XDP_DRV
xdp1        291kpps     344kpps
rxdrop      282kpps     342kpps

- Performance (SMMU on)
Benchmark   XDP_SKB     XDP_DRV
xdp1        167kpps     324kpps
rxdrop      164kpps     323kpps

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/socionext/netsec.c