[PATCH net v3] virtio_net: fix wrong buf address calculation when using xdp

2022-04-25 Thread Nikolay Aleksandrov
CC: Jason Wang CC: Xuan Zhuo CC: Daniel Borkmann CC: "Michael S. Tsirkin" CC: virtualization@lists.linux-foundation.org Fixes: 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") Signed-off-by: Nikolay Aleksandrov --- v3: Add a comment explaining why offset and headroom

Re: [PATCH net v2] virtio_net: fix wrong buf address calculation when using xdp

2022-04-24 Thread Nikolay Aleksandrov
On 24/04/2022 14:18, Xuan Zhuo wrote: > On Sun, 24 Apr 2022 13:56:17 +0300, Nikolay Aleksandrov > wrote: >> On 24/04/2022 13:42, Xuan Zhuo wrote: >>> On Sun, 24 Apr 2022 13:21:21 +0300, Nikolay Aleksandrov >>> wrote: [snip] >>>> >>>> C

Re: [PATCH net v2] virtio_net: fix wrong buf address calculation when using xdp

2022-04-24 Thread Nikolay Aleksandrov
On 24/04/2022 13:42, Xuan Zhuo wrote: > On Sun, 24 Apr 2022 13:21:21 +0300, Nikolay Aleksandrov > wrote: >> We received a report[1] of kernel crashes when Cilium is used in XDP >> mode with virtio_net after updating to newer kernels. After >> investigating the reason

[PATCH net v2] virtio_net: fix wrong buf address calculation when using xdp

2022-04-24 Thread Nikolay Aleksandrov
Borkmann CC: "Michael S. Tsirkin" CC: virtualization@lists.linux-foundation.org Fixes: 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") Signed-off-by: Nikolay Aleksandrov --- v2: Recalculate headroom based on data, data_hard_start and data_meta drivers/net/virtio_net.c

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 18:01, Xuan Zhuo wrote: > On Sat, 23 Apr 2022 17:58:05 +0300, Nikolay Aleksandrov > wrote: >> On 23/04/2022 17:36, Xuan Zhuo wrote: >>> On Sat, 23 Apr 2022 17:30:11 +0300, Nikolay Aleksandrov >>> wrote: >>>> On 23/04/2022 17:16, Nikolay

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 18:23, Nikolay Aleksandrov wrote: > On 23/04/2022 18:01, Xuan Zhuo wrote: >> On Sat, 23 Apr 2022 17:58:05 +0300, Nikolay Aleksandrov >> wrote: >>> On 23/04/2022 17:36, Xuan Zhuo wrote: >>>> On Sat, 23 Apr 2022 17:30:11 +0300, Nikolay Aleksandrov

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 18:01, Xuan Zhuo wrote: > On Sat, 23 Apr 2022 17:58:05 +0300, Nikolay Aleksandrov > wrote: >> On 23/04/2022 17:36, Xuan Zhuo wrote: >>> On Sat, 23 Apr 2022 17:30:11 +0300, Nikolay Aleksandrov >>> wrote: >>>> On 23/04/2022 17:16, Nikolay

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 17:46, Nikolay Aleksandrov wrote: > On 23/04/2022 17:30, Nikolay Aleksandrov wrote: >> On 23/04/2022 17:16, Nikolay Aleksandrov wrote: >>> On 23/04/2022 16:31, Xuan Zhuo wrote: >>>> On Sat, 23 Apr 2022 14:26:12 +0300, Nikolay Aleksandrov >>>>

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 17:36, Xuan Zhuo wrote: > On Sat, 23 Apr 2022 17:30:11 +0300, Nikolay Aleksandrov > wrote: >> On 23/04/2022 17:16, Nikolay Aleksandrov wrote: >>> On 23/04/2022 16:31, Xuan Zhuo wrote: >>>> On Sat, 23 Apr 2022 14:26:12 +0300, Nikolay Aleksandrov

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 17:30, Nikolay Aleksandrov wrote: > On 23/04/2022 17:16, Nikolay Aleksandrov wrote: >> On 23/04/2022 16:31, Xuan Zhuo wrote: >>> On Sat, 23 Apr 2022 14:26:12 +0300, Nikolay Aleksandrov >>> wrote: >>>> We received a report[1] of kernel crash

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 17:16, Nikolay Aleksandrov wrote: > On 23/04/2022 16:31, Xuan Zhuo wrote: >> On Sat, 23 Apr 2022 14:26:12 +0300, Nikolay Aleksandrov >> wrote: >>> We received a report[1] of kernel crashes when Cilium is used in XDP >>> mode with virtio_net after

Re: [PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
On 23/04/2022 16:31, Xuan Zhuo wrote: > On Sat, 23 Apr 2022 14:26:12 +0300, Nikolay Aleksandrov > wrote: >> We received a report[1] of kernel crashes when Cilium is used in XDP >> mode with virtio_net after updating to newer kernels. After >> investigating the reason

[PATCH net] virtio_net: fix wrong buf address calculation when using xdp

2022-04-23 Thread Nikolay Aleksandrov
foundation.org Fixes: 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") Signed-off-by: Nikolay Aleksandrov --- drivers/net/virtio_net.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 87838cb

[PATCH net-next] virtio_net: add ethtool support for set and get of settings

2016-02-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov This patch allows the user to set and retrieve speed and duplex of the virtio_net device via ethtool. Having this functionality is very helpful for simulating different environments and also enables the virtio_net device to participate in operations where proper speed

Re: [PATCH net-next] virtio_net: add ethtool support for set and get of settings

2016-02-02 Thread Nikolay Aleksandrov
On 02/02/2016 02:23 PM, Michael S. Tsirkin wrote: > On Tue, Feb 02, 2016 at 01:51:20PM +0100, Nikolay Aleksandrov wrote: >> From: Nikolay Aleksandrov >> >> This patch allows the user to set and retrieve speed and duplex of the >> virtio_net device via ethtool. Having

Re: [PATCH net-next] virtio_net: add ethtool support for set and get of settings

2016-02-02 Thread Nikolay Aleksandrov
On 02/02/2016 01:51 PM, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > This patch allows the user to set and retrieve speed and duplex of the > virtio_net device via ethtool. Having this functionality is very helpful > for simulating different environments and a

Re: bonding (IEEE 802.3ad) not working with qemu/virtio

2016-01-30 Thread Nikolay Aleksandrov
On 01/30/2016 07:59 AM, David Miller wrote: > From: Nikolay Aleksandrov > Date: Fri, 29 Jan 2016 22:48:26 +0100 > >> On 01/29/2016 10:45 PM, Jay Vosburgh wrote: >>> Nikolay Aleksandrov wrote: >>> >>>> On 01/25/2016 05:24 PM, Bjørnar Ness wrote:

Re: bonding (IEEE 802.3ad) not working with qemu/virtio

2016-01-30 Thread Nikolay Aleksandrov
On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > Nikolay Aleksandrov wrote: > >> On 01/25/2016 05:24 PM, Bjørnar Ness wrote: >>> As subject says, 802.3ad bonding is not working with virtio network model. >>> >>> The only errors I see is: >>> >&