Count XDP packet drops, error drops, transmissions and redirects and
expose these counters via the ethtool stats command.
Signed-off-by: Charles McLachlan
---
drivers/net/ethernet/sfc/ethtool.c| 25 +
drivers/net/ethernet/sfc/net_driver.h | 8
drivers/net
Provide an ndo_xdp_xmit function that uses the XDP tx queue for this
CPU to send the packet.
Signed-off-by: Charles McLachlan
---
drivers/net/ethernet/sfc/efx.c | 14 +++
drivers/net/ethernet/sfc/efx.h | 3 ++
drivers/net/ethernet/sfc/rx.c | 15 +++-
drivers/net/ethernet/sfc/tx.c
Each CPU needs access to its own queue to allow uncontested
transmission of XDP_TX packets. This means we need to allocate (up
front) enough channels ("xdp transmit channels") to provide at least
one extra tx queue per CPU. These tx queues should not do TSO.
Signed-off-by: Charles
Provide an ndo_bpf function to efx_netdev_ops that allows setting and
querying of xdp programs on an interface.
Also check that the MTU size isn't too big when setting a program or
when the MTU is explicitly set.
Signed-off-by: Charles McLachlan
---
drivers/net/ethernet/sfc/efx.c
Adds a field to hold an attached xdp_prog, but never populates it (see
following patch). Also, XDP_TX support is deferred to a later patch
in the series.
Signed-off-by: Charles McLachlan
---
drivers/net/ethernet/sfc/efx.c| 4 +-
drivers/net/ethernet/sfc/net_driver.h | 7 ++
drivers
Add a field to efx_tx_buffer so that we can track xdp_frames. Add a
flag so that buffers that contain xdp_frames can be identified and
passed to xdp_return_frame.
Signed-off-by: Charles McLachlan
---
drivers/net/ethernet/sfc/net_driver.h | 10 --
drivers/net/ethernet/sfc/tx.c
Supply the XDP callbacks in netdevice ops that enable lower level processing
of XDP frames.
Charles McLachlan (6):
sfc: support encapsulation of xdp_frames in efx_tx_buffer.
sfc: perform XDP processing on received packets.
sfc: Enable setting of xdp_prog.
sfc: allocate channels for XDP tx