Re: [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-11 Thread Shay Agroskin
Charlie Somerville writes: On Mon, Jan 11, 2021, at 04:31, Shay Agroskin wrote: Is this addition needed ? Seems like we don't set VIRTIO_XDP_TX bit in case of virtnet_xdp_xmit() failure, so the surrounding 'if' won't be taken. Good catch, it looks like you're right. I'm happy to remove

Re: [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-10 Thread Charlie Somerville
On Mon, Jan 11, 2021, at 04:31, Shay Agroskin wrote: > Is this addition needed ? Seems like we don't set VIRTIO_XDP_TX > bit in case of virtnet_xdp_xmit() failure, so the surrounding 'if' > won't be taken. Good catch, it looks like you're right. I'm happy to remove that extra branch although I

Re: [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-10 Thread Shay Agroskin
Charlie Somerville writes: No send queues will be allocated for XDP filters. Attempts to transmit packets when no XDP send queues exist will fail with EOPNOTSUPP. Signed-off-by: Charlie Somerville --- drivers/net/virtio_net.c | 17 + 1 file changed, 13 insertions(+), 4 del

[PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-08 Thread Charlie Somerville
No send queues will be allocated for XDP filters. Attempts to transmit packets when no XDP send queues exist will fail with EOPNOTSUPP. Signed-off-by: Charlie Somerville --- drivers/net/virtio_net.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/ne