[PATCH net-next 6/6] sfc: add XDP counters to ethtool stats.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 5/6] sfc: handle XDP_TX outcomes of XDP eBPF programs.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 4/6] sfc: allocate channels for XDP tx queues.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 3/6] sfc: Enable setting of xdp_prog.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 2/6] sfc: perform XDP processing on received packets.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 1/6] sfc: support encapsulation of xdp_frames in efx_tx_buffer.

2019-10-22 Thread Charles McLachlan
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

[PATCH net-next 0/6] sfc: Add XDP support

2019-10-22 Thread Charles McLachlan
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