Re: [PATCH net-next v1 0/4] virtio_net: enable premapped mode by default

2024-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2024 at 04:46:23PM +0800, Xuan Zhuo wrote: > On Wed, 6 Nov 2024 02:38:40 -0500, "Michael S. Tsirkin" > wrote: > > On Mon, Nov 04, 2024 at 06:46:41PM -0800, Jakub Kicinski wrote: > > > On Tue, 29 Oct 2024 16:46:11 +0800 Xuan Zhuo wrote: > &

Re: [PATCH net-next v2 02/13] virtio_ring: split: record extras for indirect buffers

2024-11-05 Thread Michael S. Tsirkin
On Wed, Nov 06, 2024 at 09:44:39AM +0800, Jason Wang wrote: > > > > while (vq->split.vring.desc[i].flags & nextflag) { > > > > - vring_unmap_one_split(vq, i); > > > > + vring_unmap_one_split(vq, &extra[i]); > > > > > > Not sure if I've asked this before. But this

Re: [PATCH net-next v1 0/4] virtio_net: enable premapped mode by default

2024-11-05 Thread Michael S. Tsirkin
t; > > > More info: > > http://lore.kernel.org/all/20240820071913.68004-1-xuanz...@linux.alibaba.com > > Sorry to ping, Michael, Jason we're waiting to hear from you on > this one. Can patch 1 be applied on net as well? Or I can take it through my tree. It's a bugfix, just for an uncommon configuration.

Re: [PATCH net-next v1 1/4] virtio-net: fix overflow inside virtnet_rq_alloc

2024-11-05 Thread Michael S. Tsirkin
On Tue, Oct 29, 2024 at 04:46:12PM +0800, Xuan Zhuo wrote: > When the frag just got a page, then may lead to regression on VM. > Specially if the sysctl net.core.high_order_alloc_disable value is 1, > then the frag always get a page when do refill. > > Which could see reliable crashes or scp failu

Re: [PATCH 1/5] virtio-net: fix overflow inside virtnet_rq_alloc

2024-10-19 Thread Michael S. Tsirkin
On Thu, Oct 17, 2024 at 03:42:59PM +0200, Paolo Abeni wrote: > > > On 10/14/24 05:12, Xuan Zhuo wrote: > > When the frag just got a page, then may lead to regression on VM. > > Specially if the sysctl net.core.high_order_alloc_disable value is 1, > > then the frag always get a page when do refill

Re: [PATCH 0/5] virtio_net: enable premapped mode by default

2024-10-19 Thread Michael S. Tsirkin
On Fri, Oct 18, 2024 at 03:59:14PM +0100, Darren Kenny wrote: > Hi Michael / Xuan Zhuo, > > On Wednesday, 2024-10-16 at 08:55:21 +01, Darren Kenny wrote: > > Hi Michael, > > > > On Monday, 2024-10-14 at 00:57:41 -04, Michael S. Tsirkin wrote: > >> On Mon, Oc

Re: [PATCH 0/5] virtio_net: enable premapped mode by default

2024-10-13 Thread Michael S. Tsirkin
On Mon, Oct 14, 2024 at 11:12:29AM +0800, Xuan Zhuo wrote: > In the last linux version, we disabled this feature to fix the > regress[1]. > > The patch set is try to fix the problem and re-enable it. > > More info: > http://lore.kernel.org/all/20240820071913.68004-1-xuanz...@linux.alibaba.com >

Re: [PATCH 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-10-09 Thread Michael S. Tsirkin
On Wed, Oct 09, 2024 at 06:00:47PM +0800, Xuan Zhuo wrote: > On Wed, 9 Oct 2024 05:29:35 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Sep 06, 2024 at 08:31:34PM +0800, Xuan Zhuo wrote: > > > Regression: > > > http://lore.kernel.org/all/8b20cc2

Re: [PATCH 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-10-09 Thread Michael S. Tsirkin
tp://lore.kernel.org/all/20240820071913.68004-1-xuanz...@linux.alibaba.com > > If that can not work or Darren can not reply in time, Michael you can try this > patch set. > > Thanks. It's been a month - were you going to post patches fixing bugs in premap and then re-enabling

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote: > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" > wrote: > > As gcc luckily noted: > > > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > > > @@ -1617,23 +1617

Re: [PATCH 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-09-11 Thread Michael S. Tsirkin
11-rc7. > > Tested-by: Darren Kenny > > Thanks, > > Darren. > > PS - I'll try get to looking at the other potential fix when I have time. > > On Tuesday, 2024-09-10 at 08:12:06 -04, Michael S. Tsirkin wrote: > > On Fri, Sep 06, 2024 at 08:31:34PM +080

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-11 Thread Michael S. Tsirkin
As gcc luckily noted: On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct vring_virtqueue > *vq, > } > > if (vq->indirect) { > + struct vring_desc_extra *extra; > u32 len; > >

Re: [PATCH net-next 02/13] virtio_ring: split: harden dma unmap for indirect

2024-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2024 at 11:46:30AM +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote: > > > > 1. this commit hardens dma unmap for indirect > > I think we need to explain why we need such hardening. yes pls be more specific. Recording same state in two places is just a

Re: [PATCH 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-09-10 Thread Michael S. Tsirkin
tp://lore.kernel.org/all/20240820071913.68004-1-xuanz...@linux.alibaba.com > > If that can not work or Darren can not reply in time, Michael you can try this > patch set. Just making sure netdev maintainers see this, this patch is for net. > Thanks. > > Xuan Zhuo (3): > Rev

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-08 Thread Michael S. Tsirkin
On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote: > leads to regression on VM with the sysctl value of: > > - net.core.high_order_alloc_disable=1 > > which could see reliable crashes or scp failure (scp a file 100M in size > to VM): > > The issue is that the virtnet_rq_dma takes up 16 b

Re: [PATCH 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-09-08 Thread Michael S. Tsirkin
tp://lore.kernel.org/all/20240820071913.68004-1-xuanz...@linux.alibaba.com > > If that can not work or Darren can not reply in time, Michael you can try this > patch set. Acked-by: Michael S. Tsirkin Tested-by: Takero Funaki > Thanks. > > Xuan Zhuo (3): > Revert &

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-08 Thread Michael S. Tsirkin
On Sat, Sep 07, 2024 at 12:16:24PM +0900, Takero Funaki wrote: > 2024年9月6日(金) 18:55 Michael S. Tsirkin : > > > > On Fri, Sep 06, 2024 at 05:46:02PM +0800, Xuan Zhuo wrote: > > > On Fri, 6 Sep 2024 05:44:27 -0400, "Michael S. Tsirkin" > > > wrote: >

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2024 at 05:46:02PM +0800, Xuan Zhuo wrote: > On Fri, 6 Sep 2024 05:44:27 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Sep 06, 2024 at 05:25:36PM +0800, Xuan Zhuo wrote: > > > On Fri, 6 Sep 2024 05:08:56 -0400, "Michael S. Tsirkin"

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2024 at 05:25:36PM +0800, Xuan Zhuo wrote: > On Fri, 6 Sep 2024 05:08:56 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Sep 06, 2024 at 04:53:38PM +0800, Xuan Zhuo wrote: > > > On Fri, 6 Sep 2024 04:43:29 -0400, "Michael S. Tsirkin"

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2024 at 04:53:38PM +0800, Xuan Zhuo wrote: > On Fri, 6 Sep 2024 04:43:29 -0400, "Michael S. Tsirkin" > wrote: > > On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote: > > > leads to regression on VM with the sysctl value of: > > > >

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-09-06 Thread Michael S. Tsirkin
On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote: > leads to regression on VM with the sysctl value of: > > - net.core.high_order_alloc_disable=1 > > which could see reliable crashes or scp failure (scp a file 100M in size > to VM): > > The issue is that the virtnet_rq_dma takes up 16 b

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 03:38:07PM +0800, Xuan Zhuo wrote: > On Thu, 29 Aug 2024 03:35:58 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, Aug 29, 2024 at 03:26:00PM +0800, Xuan Zhuo wrote: > > > On Thu, 29 Aug 2024 12:51:31 +0800, Jason Wang > > >

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 03:26:00PM +0800, Xuan Zhuo wrote: > On Thu, 29 Aug 2024 12:51:31 +0800, Jason Wang wrote: > > On Wed, Aug 28, 2024 at 7:21 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 27 Aug 2024 11:38:45 +0800, Jason Wang > > > wrote: > > > > On Tue, Aug 20, 2024 at 3:19 PM Xuan Zhuo

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-08-20 Thread Michael S. Tsirkin
On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote: > leads to regression on VM with the sysctl value of: > > - net.core.high_order_alloc_disable=1 > > which could see reliable crashes or scp failure (scp a file 100M in size > to VM): > > The issue is that the virtnet_rq_dma takes up 16 b

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-08-20 Thread Michael S. Tsirkin
On Tue, Aug 20, 2024 at 12:44:46PM -0700, Si-Wei Liu wrote: > > > On 8/20/2024 12:19 AM, Xuan Zhuo wrote: > > leads to regression on VM with the sysctl value of: > > > > - net.core.high_order_alloc_disable=1 > > > > which could see reliable crashes or scp failure (scp a file 100M in size > > to

Re: [PATCH net] virtio-net: fix overflow inside virtnet_rq_alloc

2024-08-20 Thread Michael S. Tsirkin
On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote: > leads to regression on VM with the sysctl value of: > > - net.core.high_order_alloc_disable=1 > which could see reliable crashes or scp failure (scp a file 100M in size > to VM): > > The issue is that the virtnet_rq_dma takes up 16

Re: [PATCH net] virtio_net: move netdev_tx_reset_queue() call before RX napi enable

2024-08-14 Thread Michael S. Tsirkin
BQL counters reset before RX > napi enable to avoid the issue. > > Reported-by: Marek Szyprowski > Closes: > https://lore.kernel.org/netdev/e632e378-d019-4de7-8f13-07c572ab3...@samsung.com/ > Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits") > T

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-14 Thread Michael S. Tsirkin
On Wed, Aug 14, 2024 at 10:17:15AM +0200, Jiri Pirko wrote: > >diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > >index 3f10c72743e9..c6af18948092 100644 > >--- a/drivers/net/virtio_net.c > >+++ b/drivers/net/virtio_net.c > >@@ -2867,8 +2867,8 @@ static int virtnet_enable_queue_pai

Re: [PATCH net-next v5 1/4] virtio_ring: enable premapped mode whatever use_dma_api

2024-08-14 Thread Michael S. Tsirkin
On Tue, Aug 13, 2024 at 08:39:53PM -0700, Si-Wei Liu wrote: > Hi Michael, > > I'll look for someone else from Oracle to help you on this, as the relevant > team already did verify internally that reverting all 4 patches from this > series could help address the regression

Re: [PATCH net-next v5 1/4] virtio_ring: enable premapped mode whatever use_dma_api

2024-08-13 Thread Michael S. Tsirkin
On Tue, Aug 13, 2024 at 12:28:41PM -0700, Si-Wei Liu wrote: > > Turning out this below commit to unconditionally enable premapped > virtio-net: > > commit f9dac92ba9081062a6477ee015bd3b8c5914efc4 > Author: Xuan Zhuo > Date:   Sat May 11 11:14:01 2024 +0800 > > leads to regression on VM with no

Re: [Patch net] vsock: fix recursive ->recvmsg calls

2024-08-12 Thread Michael S. Tsirkin
b4 ("vsock: support sockmap") > Reported-by: syzbot+bdb4bd87b5e22058e...@syzkaller.appspotmail.com > Tested-by: syzbot+bdb4bd87b5e22058e...@syzkaller.appspotmail.com > Cc: Bobby Eshleman > Cc: Michael S. Tsirkin > Cc: Stefano Garzarella > Signed-off-by: Cong Wang Acked-

Re: [PATCH net-next V6 0/4] virtio-net: synchronize op/admin state

2024-08-07 Thread Michael S. Tsirkin
rrier during ndo_open/stop while doing > other necessary serialization about the carrier settings during probe. > > While at it, also fix a race between probe and ndo_set_features as we > didn't initalize the guest offload setting under rtnl lock. Acked-by: Michael S. Tsirkin

Re: [PATCH net-next V6 4/4] virtio-net: synchronize probe with ndo_set_features

2024-08-06 Thread Michael S. Tsirkin
On Tue, Aug 06, 2024 at 10:22:24AM +0800, Jason Wang wrote: > We calculate guest offloads during probe without the protection of > rtnl_lock. This lead to race between probe and ndo_set_features. Fix > this by moving the calculation under the rtnl_lock. > > Signed-off-by: Jason Wang Fixes tag pl

Re: [PATCH net v3 2/2] virtio-net: unbreak vq resizing when coalescing is not negotiated

2024-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 08:27:39PM +0800, Heng Qi wrote: > Don't break the resize action if the vq coalescing feature > named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated. > > Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq > resize") > Signed-off-by: Heng Qi > Reviewed-by:

Re: [PATCH net v2] virtio-net: unbreak vq resizing when coalescing is not negotiated

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:07:43PM +0800, Heng Qi wrote: > On Wed, 31 Jul 2024 08:46:42 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Jul 31, 2024 at 08:25:23PM +0800, Heng Qi wrote: > > > On Wed, 31 Jul 2024 08:14:43 -0400, "Michael S. Tsirkin" >

Re: [PATCH net v2] virtio-net: unbreak vq resizing when coalescing is not negotiated

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 08:25:23PM +0800, Heng Qi wrote: > On Wed, 31 Jul 2024 08:14:43 -0400, "Michael S. Tsirkin" > wrote: > > On Wed, Jul 31, 2024 at 08:07:17PM +0800, Heng Qi wrote: > > > >From the virtio spec: > > > > > > The drive

Re: [PATCH net v2] virtio-net: unbreak vq resizing when coalescing is not negotiated

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 08:07:17PM +0800, Heng Qi wrote: > >From the virtio spec: > > The driver MUST have negotiated the VIRTIO_NET_F_VQ_NOTF_COAL > feature when issuing commands VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET > and VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET. > > The driver must not se

Re: [PATCH net-next] net: virtio: fix virtnet_sq_free_stats initialization

2024-07-12 Thread Michael S. Tsirkin
s") > Reported-by: Aishwarya TCV > Signed-off-by: Jean-Philippe Brucker Acked-by: Michael S. Tsirkin > --- > Both these patches are still in next so it might be possible to fix it > up directly. I'd be fine with squashing but I don't think it's done in net-

Re: [PATCH net-next v8 00/10] virtio-net: support AF_XDP zero copy

2024-07-09 Thread Michael S. Tsirkin
et's start with the small mode. > 3. merge some commits and remove some not important commits Series: Acked-by: Michael S. Tsirkin > ## AF_XDP > > XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero > copy feature of xsk (XDP socket) needs to

Re: [PATCH] virtio_net: Use u64_stats_fetch_begin() for stats fetch

2024-07-09 Thread Michael S. Tsirkin
On Wed, Jun 19, 2024 at 10:55:29AM +0800, Li RongQing wrote: > This place is fetching the stats, so u64_stats_fetch_begin > and u64_stats_fetch_retry should be used > > Fixes: 6208799553a8 ("virtio-net: support rx netdim") > Signed-off-by: Li RongQing So I dropped this from my tree, if you think

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-26 Thread Michael S. Tsirkin
t;On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin" > >> > wrote: > >> >> On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote: > >> >> > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: > >> >> > &

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-26 Thread Michael S. Tsirkin
On Wed, Jun 26, 2024 at 09:52:58AM +0200, Jiri Pirko wrote: > Thu, Jun 20, 2024 at 12:31:34PM CEST, hen...@linux.alibaba.com wrote: > >On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin" > >wrote: > >> On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Ts

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-25 Thread Michael S. Tsirkin
On Tue, Jun 25, 2024 at 09:27:24AM +0800, Jason Wang wrote: > On Thu, Jun 20, 2024 at 6:12 PM Michael S. Tsirkin wrote: > > > > On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote: > > > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: > > &g

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-24 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 12:19:05AM +0800, Heng Qi wrote: > If the device does not respond to a request for a long time, > then control vq polling elevates CPU utilization, a problem that > exacerbates with more command requests. > > Enabling control vq's irq is advantageous for the guest, and > th

Re: [PATCH net 0/2] virtio_net: fix race on control_buf

2024-06-23 Thread Michael S. Tsirkin
On Tue, May 28, 2024 at 03:52:24PM +0800, Heng Qi wrote: > Patch 1 did a simple rename, leaving 'ret' for patch 2. > Patch 2 fixed a race between reading the device response and the > new command submission. Acked-by: Michael S. Tsirkin > Heng Qi (2): > virt

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-21 Thread Michael S. Tsirkin
On Fri, Jun 21, 2024 at 03:41:46PM +0800, Xuan Zhuo wrote: > On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote: > > > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: &g

Re: [PATCH][net-next,v2] virtio_net: Remove u64_stats_update_begin()/end() for stats fetch

2024-06-21 Thread Michael S. Tsirkin
d-by: Jakub Kicinski > Signed-off-by: Li RongQing I like the added comment, makes things clearer. Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net

Re: [PATCH] virtio_net: Use u64_stats_fetch_begin() for stats fetch

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 07:09:08AM -0700, Jakub Kicinski wrote: > On Wed, 19 Jun 2024 10:55:29 +0800 Li RongQing wrote: > > This place is fetching the stats, so u64_stats_fetch_begin > > and u64_stats_fetch_retry should be used > > > > Fixes: 6208799553a8 ("virtio-net: support rx netdim") > > Sign

Re: [PATCH net-next v6 10/10] virtio_net: xsk: rx: free the unused xsk buffer

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 12:46:24PM +0200, Paolo Abeni wrote: > On Tue, 2024-06-18 at 15:56 +0800, Xuan Zhuo wrote: > > Release the xsk buffer, when the queue is releasing or the queue is > > resizing. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/net/virtio_net.c | 5 + > > 1 file cha

Re: [PATCH 2/2] virtio_net: fixing XDP for fully checksummed packets handling

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 06:38:49PM +0800, Heng Qi wrote: > On Thu, 20 Jun 2024 18:27:16 +0800, Heng Qi wrote: > > On Thu, 20 Jun 2024 06:19:01 -0400, "Michael S. Tsirkin" > > wrote: > > > On Thu, Jun 20, 2024 at 05:28:48PM +0800, Heng Qi wrote: > > >

Re: [PATCH 2/2] virtio_net: fixing XDP for fully checksummed packets handling

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 05:28:48PM +0800, Heng Qi wrote: > On Thu, 20 Jun 2024 16:33:35 +0800, Jason Wang wrote: > > On Tue, Jun 18, 2024 at 11:17 AM Heng Qi wrote: > > > > > > On Tue, 18 Jun 2024 11:10:26 +0800, Jason Wang > > > wrote: > > > > On Mon, Jun 17, 2024 at 9:15 PM Heng Qi > > > >

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: > > On Thu, 20 Jun 2024 16:26:05 +0800, Jason Wang wrote: > > > On Thu, Jun 20, 2024 at 4:21 PM Jason Wang wrote: > > > > > > > &g

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: > On Thu, 20 Jun 2024 16:26:05 +0800, Jason Wang wrote: > > On Thu, Jun 20, 2024 at 4:21 PM Jason Wang wrote: > > > > > > On Thu, Jun 20, 2024 at 3:35 PM Heng Qi wrote: > > > > > > >

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 05:38:22PM +0800, Heng Qi wrote: > On Thu, 20 Jun 2024 04:32:15 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, Jun 20, 2024 at 03:29:15PM +0800, Heng Qi wrote: > > > On Wed, 19 Jun 2024 17:19:12 -0400, "Michael S. Tsirkin" >

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 03:29:15PM +0800, Heng Qi wrote: > On Wed, 19 Jun 2024 17:19:12 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, Jun 20, 2024 at 12:19:05AM +0800, Heng Qi wrote: > > > @@ -5312,7 +5315,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-20 Thread Michael S. Tsirkin
s > >job a bit easier: > > > >$ size /tmp/orig/virtio_net.o > > textdata bss dec hex filename > > 658573892 100 69849 110d9 /tmp/orig/virtio_net.o > >$ size /tmp/new/virtio_net.o > > textdata bss dec h

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-19 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 12:19:05AM +0800, Heng Qi wrote: > @@ -5312,7 +5315,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > /* Parameters for control virtqueue, if any */ > if (vi->has_cvq) { > - callbacks[total_vqs - 1] = NULL; > + callbacks[tota

Re: [PATCH net-next v4 0/5] virtio_net: enable the irq for ctrlq

2024-06-19 Thread Michael S. Tsirkin
On Thu, Jun 20, 2024 at 12:19:03AM +0800, Heng Qi wrote: > Ctrlq in polling mode may cause the virtual machine to hang and > occupy additional CPU resources. Enabling the irq for ctrlq > alleviates this problem and allows commands to be requested > concurrently. Any patch that is supposed to be a

Re: [PATCH] virtio_net: Use u64_stats_fetch_begin() for stats fetch

2024-06-19 Thread Michael S. Tsirkin
On Wed, Jun 19, 2024 at 10:55:29AM +0800, Li RongQing wrote: > This place is fetching the stats, so u64_stats_fetch_begin > and u64_stats_fetch_retry should be used > > Fixes: 6208799553a8 ("virtio-net: support rx netdim") > Signed-off-by: Li RongQing Ack

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-19 Thread Michael S. Tsirkin
49 110d9 /tmp/orig/virtio_net.o $ size /tmp/new/virtio_net.o textdata bss dec hex filename 657603892 100 69752 11078 /tmp/new/virtio_net.o Couldn't measure any performance impact, unsurprizingly. Signed-off-by: Michael S. Tsirkin --- diff --git a/dri

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-19 Thread Michael S. Tsirkin
e. > >> > >> Not sure I get you. __free_old_xmit() is always called with stats > >> zeroed. So this is just sum-up of one queue completion run. > >> I don't see how this could become "larger and larger number" as you > >> describe. > >

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-19 Thread Michael S. Tsirkin
On Wed, Jun 19, 2024 at 07:45:16AM +0200, Jiri Pirko wrote: > Tue, Jun 18, 2024 at 08:18:12PM CEST, m...@redhat.com wrote: > >This looks like a sensible way to do this. > >Yet something to improve: > > > > > >On Tue, Jun 18, 2024 at 04:44:56PM +0200, Jiri Pirko wrote: > >> From: Jiri Pirko > >> >

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2024 at 08:52:38AM +0800, Jason Wang wrote: > On Mon, Jun 17, 2024 at 5:30 PM Jiri Pirko wrote: > > > > Mon, Jun 17, 2024 at 03:44:55AM CEST, jasow...@redhat.com wrote: > > >On Mon, Jun 10, 2024 at 10:19 PM Michael S. Tsirkin > > >wrote: > &g

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Michael S. Tsirkin
This looks like a sensible way to do this. Yet something to improve: On Tue, Jun 18, 2024 at 04:44:56PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. > Tested with fq_codel and pfif

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Michael S. Tsirkin
On Mon, Jun 17, 2024 at 11:30:36AM +0200, Jiri Pirko wrote: > Mon, Jun 17, 2024 at 03:44:55AM CEST, jasow...@redhat.com wrote: > >On Mon, Jun 10, 2024 at 10:19 PM Michael S. Tsirkin wrote: > >> > >> On Fri, Jun 07, 2024 at 01:30:34PM +0200, Jiri Pirko wrote: > >&g

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Michael S. Tsirkin
On Mon, Jun 17, 2024 at 09:44:55AM +0800, Jason Wang wrote: > Probably, but do we need to define a bar here? Looking at git history, > we didn't ask a full benchmark for a lot of commits that may touch > performance. There's no may here and we even got a report from a real user. -- MST

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Michael S. Tsirkin
On Wed, Jun 12, 2024 at 07:08:51PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. > Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is > running in background. Netpe

Re: [PATCH net-next v4 11/15] virtio_net: xsk: tx: support xmit xsk buffer

2024-06-12 Thread Michael S. Tsirkin
On Wed, Jun 12, 2024 at 04:25:05PM -0700, Jakub Kicinski wrote: > On Tue, 11 Jun 2024 19:41:43 +0800 Xuan Zhuo wrote: > > @@ -534,10 +534,13 @@ enum virtnet_xmit_type { > > VIRTNET_XMIT_TYPE_SKB, > > VIRTNET_XMIT_TYPE_XDP, > > VIRTNET_XMIT_TYPE_DMA, > > + VIRTNET_XMIT_TYPE_XSK, > > A

Re: [PATCH net-next v4 09/15] virtio_net: xsk: bind/unbind xsk

2024-06-12 Thread Michael S. Tsirkin
On Tue, Jun 11, 2024 at 07:41:41PM +0800, Xuan Zhuo wrote: > This patch implement the logic of bind/unbind xsk pool to sq and rq. > > Signed-off-by: Xuan Zhuo I'd just squash with previous patch. This one is hard to review in isolation. > --- > drivers/net/virtio_net.c | 199 ++

Re: [PATCH net-next v4 08/15] virtio_net: sq support premapped mode

2024-06-12 Thread Michael S. Tsirkin
On Tue, Jun 11, 2024 at 07:41:40PM +0800, Xuan Zhuo wrote: > If the xsk is enabling, the xsk tx will share the send queue. > But the xsk requires that the send queue use the premapped mode. > So the send queue must support premapped mode when it is bound to > af-xdp. > > * virtnet_sq_set_premapped

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-12 Thread Michael S. Tsirkin
On Wed, Jun 12, 2024 at 07:08:51PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. > Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is > running in background. Netpe

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-10 Thread Michael S. Tsirkin
On Fri, Jun 07, 2024 at 01:30:34PM +0200, Jiri Pirko wrote: > Fri, Jun 07, 2024 at 12:23:37PM CEST, m...@redhat.com wrote: > >On Fri, Jun 07, 2024 at 11:57:37AM +0200, Jiri Pirko wrote: > >> >True. Personally, I would like to just drop orphan mode. But I'm not > >> >sure others are happy with this.

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-07 Thread Michael S. Tsirkin
On Fri, Jun 07, 2024 at 11:57:37AM +0200, Jiri Pirko wrote: > >True. Personally, I would like to just drop orphan mode. But I'm not > >sure others are happy with this. > > How about to do it other way around. I will take a stab at sending patch > removing it. If anyone is against and has solid dat

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Michael S. Tsirkin
> >On Thu, Jun 6, 2024 at 2:05 PM Michael S. Tsirkin wrote: > >> >> > >> >> On Thu, Jun 06, 2024 at 12:25:15PM +0800, Jason Wang wrote: > >> >> > > If the codes of orphan mode don't have an impact when you enable > >> >> &

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Michael S. Tsirkin
ibaba.com > > >> > > > >wrote: > > >> > > > >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko > > >> > > > >> wrote: > > >> > > > >>> From: Jiri Pirko > > >> > > > >>> > > >

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Michael S. Tsirkin
2024 at 02:48:15PM CEST, j...@resnulli.us wrote: > > > > > > >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com > > > > > > >wrote: > > > > > > >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko > > > > > > >>wro

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Michael S. Tsirkin
On Thu, Jun 06, 2024 at 12:25:15PM +0800, Jason Wang wrote: > > If the codes of orphan mode don't have an impact when you enable > > napi_tx mode, please keep it if you can. > > For example, it complicates BQL implementation. > > Thanks I very much doubt sending interrupts to a VM can *on all be

Re: [PATCH net-next v2 12/12] virtio_net: refactor the xmit type

2024-06-02 Thread Michael S. Tsirkin
On Thu, May 30, 2024 at 07:24:06PM +0800, Xuan Zhuo wrote: > +enum virtnet_xmit_type { > + VIRTNET_XMIT_TYPE_SKB, > + VIRTNET_XMIT_TYPE_XDP, > +}; > + > +#define VIRTNET_XMIT_TYPE_MASK (VIRTNET_XMIT_TYPE_SKB | > VIRTNET_XMIT_TYPE_XDP) No idea how this has any chance to work. Was this test

Re: [PATCH net-next v2 00/12] virtnet_net: prepare for af-xdp

2024-06-02 Thread Michael S. Tsirkin
On Sat, Jun 01, 2024 at 09:01:29AM +0800, Xuan Zhuo wrote: > On Thu, 30 May 2024 07:53:17 -0400, "Michael S. Tsirkin" > wrote: > > On Thu, May 30, 2024 at 07:23:54PM +0800, Xuan Zhuo wrote: > > > This patch set prepares for supporting af-xdp zerocopy. > >

Re: [PATCH net-next v2 00/12] virtnet_net: prepare for af-xdp

2024-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2024 at 07:23:54PM +0800, Xuan Zhuo wrote: > This patch set prepares for supporting af-xdp zerocopy. > There is no feature change in this patch set. > I just want to reduce the patch num of the final patch set, > so I split the patch set. > > Thanks. > > v2: > 1. Add five comm

Re: [PATCH net v3 1/2] virtio_net: fix possible dim status unrecoverable

2024-05-30 Thread Michael S. Tsirkin
to DIM_START_MEASURE. > > Fixes: 6208799553a8 ("virtio-net: support rx netdim") > Signed-off-by: Heng Qi > Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

Re: [PATCH net v3 2/2] virtio_net: fix a spurious deadlock issue

2024-05-30 Thread Michael S. Tsirkin
_fault+0x3a2/0x8a0 > ? lock_release+0x72/0x140 > ? do_user_addr_fault+0x3a7/0x8a0 > __x64_sys_sendto+0x29/0x30 > do_syscall_64+0x78/0x180 > entry_SYSCALL_64_after_hwframe+0x76/0x7e > > Fixes: 4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce") >

Re: [PATCH net-next v1 0/7] virtnet_net: prepare for af-xdp

2024-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2024 at 03:26:42PM +0800, Xuan Zhuo wrote: > This patch set prepares for supporting af-xdp zerocopy. > There is no feature change in this patch set. > I just want to reduce the patch num of the final patch set, > so I split the patch set. > > #1-#3 add independent directory for vir

Re: [PATCH net 2/2] virtio_net: fix missing lock protection on control_buf access

2024-05-28 Thread Michael S. Tsirkin
On Wed, May 29, 2024 at 12:01:45AM +0800, Heng Qi wrote: > On Tue, 28 May 2024 11:46:28 -0400, "Michael S. Tsirkin" > wrote: > > On Tue, May 28, 2024 at 03:52:26PM +0800, Heng Qi wrote: > > > Refactored the handling of control_buf to be within the cvq_lock > >

Re: [PATCH net 2/2] virtio_net: fix missing lock protection on control_buf access

2024-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2024 at 03:52:26PM +0800, Heng Qi wrote: > Refactored the handling of control_buf to be within the cvq_lock > critical section, mitigating race conditions between reading device > responses and new command submissions. > > Fixes: 6f45ab3e0409 ("virtio_net: Add a lock for the comman

Re: [PATCH net 2/2] Revert "virtio_net: Add a lock for per queue RX coalesce"

2024-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2024 at 04:52:19PM +0800, Heng Qi wrote: > On Wed, 22 May 2024 10:15:46 +0200, Jiri Pirko wrote: > > Wed, May 22, 2024 at 05:45:48AM CEST, hen...@linux.alibaba.com wrote: > > >This reverts commit 4d4ac2ececd3c42a08dd32a6e3a4aaf25f7efe44. > > > > This commit does not exist in -net

Re: [PATCH net-next] virtio-net: synchronize operstate with admin state on up/down

2024-05-21 Thread Michael S. Tsirkin
; DEFAULT group default qlen 1000 > link/ether 00:00:05:00:00:09 brd ff:ff:ff:ff:ff:ff > ... > 5: macvlan0@enp0s3: mtu 1500 qdisc > noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000 > link/ether b2:a9:c5:04:da:53 brd ff:ff:ff:ff:ff:ff > > Cc: Venkat Ve

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-16 Thread Michael S. Tsirkin
On Thu, May 16, 2024 at 05:25:20PM +0200, Jiri Pirko wrote: > > >I'd expect a regression if any to be in a streaming benchmark. > > Can you elaborate? BQL does two things that can hurt throughput: - limits amount of data in the queue - can limit bandwidth if we now get queue underruns - adds C

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-16 Thread Michael S. Tsirkin
On Thu, May 16, 2024 at 12:54:58PM +0200, Jiri Pirko wrote: > Thu, May 16, 2024 at 06:48:38AM CEST, jasow...@redhat.com wrote: > >On Wed, May 15, 2024 at 8:54 PM Jiri Pirko wrote: > >> > >> Wed, May 15, 2024 at 12:12:51PM CEST, j...@resnulli.us wrote: > >> >Wed, May 15, 2024 at 10:20:04AM CEST, m.

Re: [PATCH v3] virtio_net: Fix missed rtnl_unlock

2024-05-15 Thread Michael S. Tsirkin
-by: Eric Dumazet > Link: > https://lore.kernel.org/netdev/cann89ilazvaucvhpm6rpjj0owra_ofnx7fhc8d60gv-65ad...@mail.gmail.com/ > Signed-off-by: Daniel Jurgens Acked-by: Michael S. Tsirkin net tree I presume. > --- > v3: > - Changed to promisc_allmulti alloc to

Re: [PATCH v3] virtio_net: Fix missed rtnl_unlock

2024-05-15 Thread Michael S. Tsirkin
-by: Eric Dumazet > Link: > https://lore.kernel.org/netdev/cann89ilazvaucvhpm6rpjj0owra_ofnx7fhc8d60gv-65ad...@mail.gmail.com/ > Signed-off-by: Daniel Jurgens Acked-by: Michael S. Tsirkin > --- > v3: > - Changed to promisc_allmulti alloc to GPF_KERNEL > v2: &

Re: [PATCH] virtio_net: Fix missed rtnl_unlock

2024-05-15 Thread Michael S. Tsirkin
On Wed, May 15, 2024 at 09:31:20AM -0500, Daniel Jurgens wrote: > The rtnl_lock would stay locked if allocating promisc_allmulti failed. > > Reported-by: Eric Dumazet > Link: > https://lore.kernel.org/netdev/cann89ilazvaucvhpm6rpjj0owra_ofnx7fhc8d60gv-65ad...@mail.gmail.com/ > Signed-off-by: Dan

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-15 Thread Michael S. Tsirkin
On Wed, May 15, 2024 at 09:34:08AM +0200, Jiri Pirko wrote: > Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: > >On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: > >> Fri, May 10, 2024 at 12:52:52PM CEST, m...@redhat.com wrote: > >> >On Fri, May 10, 2024 at 12:37:15PM +0200,

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Michael S. Tsirkin
On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: > Fri, May 10, 2024 at 12:52:52PM CEST, m...@redhat.com wrote: > >On Fri, May 10, 2024 at 12:37:15PM +0200, Jiri Pirko wrote: > >> Thu, May 09, 2024 at 04:28:12PM CEST, m...@redhat.com wrote: > >> >On Thu, May 09, 2024 at 03:31:56PM +0200,

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Michael S. Tsirkin
On Fri, May 10, 2024 at 12:37:15PM +0200, Jiri Pirko wrote: > Thu, May 09, 2024 at 04:28:12PM CEST, m...@redhat.com wrote: > >On Thu, May 09, 2024 at 03:31:56PM +0200, Jiri Pirko wrote: > >> Thu, May 09, 2024 at 02:41:39PM CEST, m...@redhat.com wrote: > >> >On Thu, May 09, 2024 at 01:46:15PM +0200,

Re: [PATCH] virtio_net: Fix memory leak in virtnet_rx_mod_work

2024-05-10 Thread Michael S. Tsirkin
tdev/0674ca1b-020f-4f93-94d0-104964566...@kernel.dk/ > Signed-off-by: Daniel Jurgens Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-09 Thread Michael S. Tsirkin
On Thu, May 09, 2024 at 03:31:56PM +0200, Jiri Pirko wrote: > Thu, May 09, 2024 at 02:41:39PM CEST, m...@redhat.com wrote: > >On Thu, May 09, 2024 at 01:46:15PM +0200, Jiri Pirko wrote: > >> From: Jiri Pirko > >> > >> Add support for Byte Queue Limits (BQL). > >> > >> Signed-off-by: Jiri Pirko

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-09 Thread Michael S. Tsirkin
On Thu, May 09, 2024 at 01:46:15PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Signed-off-by: Jiri Pirko Can we get more detail on the benefits you observe etc? Thanks! > --- > drivers/net/virtio_net.c | 33 - >

Re: [patch net-next v4 0/6] selftests: virtio_net: introduce initial testing infrastructure

2024-04-22 Thread Michael S. Tsirkin
devices, allowing > user to filter features to pretend to be driver that is not capable > of the filtered feature. virtio things: Acked-by: Michael S. Tsirkin > Example: > $ cat /sys/bus/virtio/devices/virtio0/features > 111001010101110010001

Re: [PATCH RESEND net-next v7 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-22 Thread Michael S. Tsirkin
ut this would be better along with cleaning up the rest of > the drivers, which we can get to very soon after this set. > > Please review, thank you very much! Acked-by: Michael S. Tsirkin > Changelog > = > v6->v7: > - A new wrapper struct pointer is used in struc

  1   2   3   4   5   6   7   8   9   10   >