Re: [PATCH net v2 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-10-03 Thread Paolo Abeni
On Mon, 2023-09-25 at 15:53 +0800, Heng Qi wrote: > According to the definition of virtqueue coalescing spec[1]: > > Upon disabling and re-enabling a transmit virtqueue, the device MUST set > the coalescing parameters of the virtqueue to those configured through the >

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-20 Thread Paolo Abeni
On Tue, 2023-09-19 at 22:38 -0400, Michael S. Tsirkin wrote: > On Tue, Sep 19, 2023 at 03:35:51PM +0200, Stefano Garzarella wrote: > > On Tue, Sep 19, 2023 at 03:19:54PM +0200, Paolo Abeni wrote: > > > > > DaveM suggests this should go via the virtio tree, too. Any

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-19 Thread Paolo Abeni
On Tue, 2023-09-19 at 09:54 +0200, Stefano Garzarella wrote: > On Mon, Sep 18, 2023 at 07:56:00PM +0300, Arseniy Krasnov wrote: > > Hi Stefano, > > > > thanks for review! So when this patchset will be merged to net-next, > > I'll start sending next part of MSG_ZEROCOPY patchset, e.g. AF_VSOCK + >

Re: [PATCH net] virtio: kdoc for struct virtio_pci_modern_device

2023-08-31 Thread Paolo Abeni
Hi, On Mon, 2023-08-28 at 14:34 -0700, Shannon Nelson wrote: > Finally following up to Simon's suggestion for some kdoc attention > on struct virtio_pci_modern_device. > > Link: https://lore.kernel.org/netdev/ze%2fqs0lnuvxfa...@corigine.com/ > Cc: Simon Horman > Signed-off-by: Shannon Nelson

Re: [PATCH net-next v6 2/4] vsock/virtio: support to send non-linear skb

2023-08-22 Thread Paolo Abeni
Hi, I'm sorry for the long delay here. I was OoO in the past few weeks. On Tue, 2023-08-15 at 00:27 +0300, Arseniy Krasnov wrote: > For non-linear skb use its pages from fragment array as buffers in > virtio tx queue. These pages are already pinned by 'get_user_pages()' > during such skb

Re: [PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-08-01 Thread Paolo Abeni
On Tue, 2023-08-01 at 16:36 +0300, Arseniy Krasnov wrote: > > On 01.08.2023 16:34, Paolo Abeni wrote: > > On Sun, 2023-07-30 at 11:59 +0300, Arseniy Krasnov wrote: > > > +static int virtio_transport_fill_skb(struct sk_buff *skb, > > > +

Re: [PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-08-01 Thread Paolo Abeni
On Sun, 2023-07-30 at 11:59 +0300, Arseniy Krasnov wrote: > +static int virtio_transport_fill_skb(struct sk_buff *skb, > + struct virtio_vsock_pkt_info *info, > + size_t len, > + bool zcopy) > +{ > +

Re: [PATCH net-next v5 1/4] vsock/virtio/vhost: read data from non-linear skb

2023-08-01 Thread Paolo Abeni
On Sun, 2023-07-30 at 11:59 +0300, Arseniy Krasnov wrote: > This is preparation patch for MSG_ZEROCOPY support. It adds handling of > non-linear skbs by replacing direct calls of 'memcpy_to_msg()' with > 'skb_copy_datagram_iter()'. Main advantage of the second one is that it > can handle paged

Re: [PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command

2023-07-27 Thread Paolo Abeni
On Tue, 2023-07-25 at 16:07 +0300, Gavin Li wrote: > Add interrupt_coalesce config in send_queue and receive_queue to cache user > config. > > Send per virtqueue interrupt moderation config to underlying device in > order to have more efficient interrupt moderation and cpu utilization of > guest

Re: [PATCH v3] virtio_net: suppress cpu stall when free_unused_bufs

2023-05-02 Thread Paolo Abeni
On Sat, 2023-04-29 at 23:47 +0800, Wenliang Wang wrote: > For multi-queue and large ring-size use case, the following error > occurred when free_unused_bufs: > rcu: INFO: rcu_sched self-detected stall on CPU. > > Signed-off-by: Wenliang Wang Net next is currently closed, but this patch could

Re: [PATCH net-next v4 00/15] virtio_net: refactor xdp codes

2023-04-27 Thread Paolo Abeni
On Thu, 2023-04-27 at 11:05 +0800, Xuan Zhuo wrote: > Due to historical reasons, the implementation of XDP in virtio-net is > relatively > chaotic. For example, the processing of XDP actions has two copies of similar > code. Such as page, xdp_page processing, etc. > > The purpose of this patch

Re: [PATCH net-next 8/8] virtio_net: introduce receive_small_xdp()

2023-03-30 Thread Paolo Abeni
On Tue, 2023-03-28 at 20:04 +0800, Xuan Zhuo wrote: > @@ -949,15 +1042,11 @@ static struct sk_buff *receive_small(struct net_device > *dev, > { > struct sk_buff *skb; > struct bpf_prog *xdp_prog; > - unsigned int xdp_headroom = (unsigned long)ctx; > - unsigned int

Re: [PATCH net-next 7/8] virtio_net: introduce receive_mergeable_xdp()

2023-03-30 Thread Paolo Abeni
Hi, On Tue, 2023-03-28 at 20:04 +0800, Xuan Zhuo wrote: > The purpose of this patch is to simplify the receive_mergeable(). > Separate all the logic of XDP into a function. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio_net.c | 128 +++ > 1 file

Re: [PATCH net 0/2] add checking sq is full inside xdp xmit

2023-03-07 Thread Paolo Abeni
Hi, On Tue, 2023-03-07 at 09:49 +0800, Xuan Zhuo wrote: > On Mon, 6 Mar 2023 12:58:22 -0500, "Michael S. Tsirkin" > wrote: > > On Mon, Mar 06, 2023 at 12:15:33PM +0800, Xuan Zhuo wrote: > > > If the queue of xdp xmit is not an independent queue, then when the xdp > > > xmit used all the desc,

Re: [PATCH v3] virtio-net: Fix probe of virtio-net on kvmtool

2023-03-02 Thread Paolo Abeni
On Thu, 2023-03-02 at 16:10 +0800, Jason Wang wrote: > On Wed, Mar 1, 2023 at 10:44 PM Michael S. Tsirkin wrote: > > > > On Wed, Mar 01, 2023 at 01:59:52PM +, Rob Bradford via B4 Relay wrote: > > > From: Rob Bradford > > > > > > Since the following commit virtio-net on kvmtool has printed

Re: [PATCH 00/33] virtio-net: support AF_XDP zero copy

2023-02-02 Thread Paolo Abeni
On Thu, 2023-02-02 at 19:00 +0800, Xuan Zhuo wrote: > XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero > copy feature of xsk (XDP socket) needs to be supported by the driver. The > performance of zero copy is very good. mlx5 and intel ixgbe already support > this

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Tue, 2023-01-31 at 08:43 -0500, Michael S. Tsirkin wrote: > On Tue, Jan 31, 2023 at 10:01:53AM +0100, Paolo Abeni wrote: > > On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > > > In virtnet_probe(), if the device doesn't provide a MAC address the > > >

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Tue, 2023-01-31 at 10:32 +0100, Laurent Vivier wrote: > On 1/31/23 10:01, Paolo Abeni wrote: > > On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > > > In virtnet_probe(), if the device doesn't provide a MAC address the > > > driver assigns a random one.

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > In virtnet_probe(), if the device doesn't provide a MAC address the > driver assigns a random one. > As we modify the MAC address we need to notify the device to allow it > to update all the related information. > > The problem can be

Re: [PATCH net-next v7 4/4] test/vsock: vsock_perf utility

2023-01-12 Thread Paolo Abeni
On Tue, 2023-01-10 at 10:18 +, Arseniy Krasnov wrote: > This adds utility to check vsock rx/tx performance. > > Usage as sender: > ./vsock_perf --sender --port --bytes > Usage as receiver: > ./vsock_perf --port --rcvlowat > > Signed-off-by: Arseniy Krasnov > --- >

Re: [PATCH net-next v9] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2023-01-10 Thread Paolo Abeni
On Tue, 2023-01-10 at 09:36 +0100, Paolo Abeni wrote: > On Sat, 2023-01-07 at 00:29 +, Bobby Eshleman wrote: > > This commit changes virtio/vsock to use sk_buff instead of > > virtio_vsock_pkt. Beyond better conforming to other net code, using > > sk_buff allows vsock to

Re: [PATCH net-next v6 4/4] test/vsock: vsock_perf utility

2023-01-10 Thread Paolo Abeni
Hi, sorry for the late feedback, a couple of notes below... On Sun, 2023-01-08 at 20:43 +, Arseniy Krasnov wrote: > This adds utility to check vsock rx/tx performance. > > Usage as sender: > ./vsock_perf --sender --port --bytes > Usage as receiver: > ./vsock_perf --port --rcvlowat > >

Re: [PATCH net-next v9] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2023-01-10 Thread Paolo Abeni
> Before: 21.63 Gb/s > After: 25.59 Gb/s (+18%) > > Test: 16B, g2h > Before: 11.86 Mb/s > After: 17.41 Mb/s (+46%) > > Test: 64KB, h2g > Before: 2.15 Gb/s > After: 3.6 Gb/s (+67%) > > Test: 16B, h2g > Before: 14.38 Mb/s > After: 18.43 Mb/s (+28%) >

Re: [PATCH net-next v8] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2022-12-15 Thread Paolo Abeni
On Thu, 2022-12-15 at 04:36 +, Bobby Eshleman wrote: > This commit changes virtio/vsock to use sk_buff instead of > virtio_vsock_pkt. Beyond better conforming to other net code, using > sk_buff allows vsock to use sk_buff-dependent features in the future > (such as sockmap) and improves

Re: [PATCH net-next v7] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2022-12-14 Thread Paolo Abeni
On Tue, 2022-12-13 at 19:28 +, Bobby Eshleman wrote: > diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c > index 5703775af129..2a5994b029b2 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -51,8 +51,7 @@ struct vhost_vsock { > struct hlist_node hash; > >

Re: [PATCH v5] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2022-12-07 Thread Paolo Abeni
On Mon, 2022-11-21 at 12:01 +, Bobby Eshleman wrote: > On Tue, Dec 06, 2022 at 11:20:21AM +0100, Paolo Abeni wrote: > > Hello, > > > > On Fri, 2022-12-02 at 09:35 -0800, Bobby Eshleman wrote: > > [...] > > > diff --git a/include/linux/virtio_vsock.h b/incl

Re: [PATCH v5] virtio/vsock: replace virtio_vsock_pkt with sk_buff

2022-12-06 Thread Paolo Abeni
Hello, On Fri, 2022-12-02 at 09:35 -0800, Bobby Eshleman wrote: [...] > diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h > index 35d7eedb5e8e..6c0b2d4da3fe 100644 > --- a/include/linux/virtio_vsock.h > +++ b/include/linux/virtio_vsock.h > @@ -3,10 +3,129 @@ > #define

Re: [PATCH net-next 0/4] shrink struct ubuf_info

2022-09-27 Thread Paolo Abeni
On Tue, 2022-09-27 at 21:17 +0100, Pavel Begunkov wrote: > On 9/27/22 20:59, Paolo Abeni wrote: > > On Tue, 2022-09-27 at 19:48 +0100, Pavel Begunkov wrote: > > > On 9/27/22 18:56, Paolo Abeni wrote: > > > > On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote: >

Re: [PATCH net-next 0/4] shrink struct ubuf_info

2022-09-27 Thread Paolo Abeni
On Tue, 2022-09-27 at 19:48 +0100, Pavel Begunkov wrote: > On 9/27/22 18:56, Paolo Abeni wrote: > > On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote: > > > On 9/27/22 15:28, Pavel Begunkov wrote: > > > > Hello Paolo, > > > > > > > >

Re: [PATCH net-next 0/4] shrink struct ubuf_info

2022-09-27 Thread Paolo Abeni
On Tue, 2022-09-27 at 18:16 +0100, Pavel Begunkov wrote: > On 9/27/22 15:28, Pavel Begunkov wrote: > > Hello Paolo, > > > > On 9/27/22 14:49, Paolo Abeni wrote: > > > Hello, > > > > > > On Fri, 2022-09-23 at 17:39 +0100, Pavel Begunkov wrote: >

Re: [PATCH net-next 0/4] shrink struct ubuf_info

2022-09-27 Thread Paolo Abeni
Hello, On Fri, 2022-09-23 at 17:39 +0100, Pavel Begunkov wrote: > struct ubuf_info is large but not all fields are needed for all > cases. We have limited space in io_uring for it and large ubuf_info > prevents some struct embedding, even though we use only a subset > of the fields. It's also not

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Paolo Abeni
On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote: > On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > > hi Michael > > > > in virtio-net.c > >     /* Parameters for control virtqueue, if any */ > >     if (vi->has_cvq) { > >         callbacks[total_vqs - 1] = NULL; > >        

Re: [PATCH net] virtio-net: add cond_resched() to the command waiting loop

2022-09-07 Thread Paolo Abeni
On Wed, 2022-09-07 at 10:09 +0800, Jason Wang wrote: > On Tue, Sep 6, 2022 at 6:56 PM Paolo Abeni wrote: > > > > On Mon, 2022-09-05 at 15:49 +0800, Jason Wang wrote: > > > On Mon, Sep 5, 2022 at 3:15 PM Michael S. Tsirkin wrote: > > > > > > > >

Re: [PATCH net] virtio-net: add cond_resched() to the command waiting loop

2022-09-06 Thread Paolo Abeni
On Mon, 2022-09-05 at 15:49 +0800, Jason Wang wrote: > On Mon, Sep 5, 2022 at 3:15 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 05, 2022 at 12:53:41PM +0800, Jason Wang wrote: > > > Adding cond_resched() to the command waiting loop for a better > > > co-operation with the scheduler. This

Re: [PATCH net-next v4 0/9] vsock: updates for SO_RCVLOWAT handling

2022-08-23 Thread Paolo Abeni
On Tue, 2022-08-23 at 16:30 -0400, Stefan Hajnoczi wrote: > On Tue, Aug 23, 2022 at 12:18:52PM -0700, Jakub Kicinski wrote: > > On Tue, 23 Aug 2022 15:14:10 -0400 Stefan Hajnoczi wrote: > > > Stefano will be online again on Monday. I suggest we wait for him to > > > review this series. If it's

[PATCH] vhost_net: fix OoB on sendmsg() failure.

2021-09-08 Thread Paolo Abeni
only error with EBADFD, this change addresses the issue explicitly freeing the XDP buffers batch on error. Fixes: 0a0be13b8fe2 ("vhost_net: batch submitting XDP buffers to underlayer sockets") Suggested-by: Jason Wang Signed-off-by: Paolo Abeni --- Note: my understanding is that this

[PATCH] vhost_net: use packet weight for rx handler, too

2018-04-24 Thread Paolo Abeni
-comparing-open-vswitch-performance/ Signed-off-by: Paolo Abeni <pab...@redhat.com> --- drivers/vhost/net.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index bbf38befefb2..c4b49fca4871 100644 --- a/drivers/vhost/net

Re: [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()

2016-03-19 Thread Paolo Abeni
On Thu, 2016-03-17 at 18:01 -0700, Venkatesh Srinivas wrote: > On Thu, Mar 17, 2016 at 7:44 AM, Paolo Abeni <pab...@redhat.com> wrote: > > > > This gives small but noticeable rx performance improvement (2-3%) > > and will allow exploiting future napi improvement. > &g

[net-next v2] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()

2016-03-19 Thread Paolo Abeni
This gives small but noticeable rx performance improvement (2-3%) and will allow exploiting future napi improvement. Signed-off-by: Paolo Abeni <pab...@redhat.com> -- v2: replace also netdev_alloc_skb_ip_align() invocation in add_recvbuf_small(), suggested by Venkatesh Sr

[PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()

2016-03-19 Thread Paolo Abeni
This gives small but noticeable rx performance improvement (2-3%) and will allow exploiting future napi improvement. Signed-off-by: Paolo Abeni <pab...@redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/d

Re: [RFC -next 2/2] virtio_net: Read and use the advised MTU

2016-03-10 Thread Paolo Abeni
On Thu, 2016-03-10 at 09:28 -0500, Aaron Conole wrote: > This patch checks the feature bit for the VIRTIO_NET_F_MTU feature. If it > exists, read the advised MTU and use it. > > No proper error handling is provided for the case where a user changes the > negotiated MTU. A future commit will add