Re: [PATCH net-next v2 2/2] virtio_net: Add TX stopped and wake counters

2024-05-10 Thread Jason Xing
On Sat, May 11, 2024 at 4:20 AM Daniel Jurgens wrote: > > Add a tx queue stop and wake counters, they are useful for debugging. > > $ ./tools/net/ynl/cli.py --spec netlink/specs/netdev.yaml \ > --dump qstats-get --json '{"scope": "queue"}' > ... > {'ifindex': 13, > 'queue-id': 0, > 'queue-typ

Re: [PATCH net-next v2 1/2] netdev: Add queue stats for TX stop and wake

2024-05-10 Thread Jason Xing
On Sat, May 11, 2024 at 4:20 AM Daniel Jurgens wrote: > > TX queue stop and wake are counted by some drivers. > Support reporting these via netdev-genl queue stats. > > Signed-off-by: Daniel Jurgens > Reviewed-by: Jiri Pirko Good to see this finally :) Reviewed-by: Jason Xing > --- > Docume

[PATCH net-next v5 4/4] virtio_net: remove the misleading comment

2024-05-10 Thread Xuan Zhuo
We call the build_skb() actually without copying data. The comment is misleading. So remove it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3ffcb2e2185f..f

[PATCH net-next v5 2/4] virtio_net: big mode skip the unmap check

2024-05-10 Thread Xuan Zhuo
The virtio-net big mode did not enable premapped mode, so we did not need to check the unmap. And the subsequent commit will remove the failover code for failing enable premapped for merge and small mode. So we need to remove the checking do_dma code in the big mode path. Signed-off-by: Xuan Zhuo

[PATCH net-next v5 3/4] virtio_net: rx remove premapped failover code

2024-05-10 Thread Xuan Zhuo
Now, the premapped mode can be enabled unconditionally. So we can remove the failover code for merge and small mode. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Reviewed-by: Larysa Zaremba --- drivers/net/virtio_net.c | 85 +--- 1 file changed, 35 inserti

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

2024-05-10 Thread Xuan Zhuo
Now, we have virtio DMA APIs, the driver can be the premapped mode whatever the virtio core uses dma api or not. So remove the limit of checking use_dma_api from virtqueue_set_dma_premapped(). Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 7 +-- 1 file ch

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

2024-05-10 Thread Xuan Zhuo
Actually, for the virtio drivers, we can enable premapped mode whatever the value of use_dma_api. Because we provide the virtio dma apis. So the driver can enable premapped mode unconditionally. This patch set makes the big mode of virtio-net to support premapped mode. And enable premapped mode fo

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

2024-05-10 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Thu, 9 May 2024 13:36:34 -0500 you wrote: > The pointer delcaration was missing the __free(kfree). > > Fixes: ff7c7d9f5261 ("virtio_net: Remove command data from control_buf") > Reported-by: Jens Axboe > Closes:

Re: [PATCH net-next 1/2] netdev: Add queue stats for TX stop and wake

2024-05-10 Thread Andrew Lunn
> It wouldn't be trivial. The stats are queried from the driver. So are page pool stats, with the increments happening in the page pool code, not the driver. Andrew

RE: [PATCH net-next 1/2] netdev: Add queue stats for TX stop and wake

2024-05-10 Thread Dan Jurgens
> From: Andrew Lunn > Sent: Friday, May 10, 2024 7:59 AM > To: Dan Jurgens > Cc: netdev@vger.kernel.org; m...@redhat.com; jasow...@redhat.com; > xuanz...@linux.alibaba.com; virtualizat...@lists.linux.dev; > da...@davemloft.net; eduma...@google.com; k...@kernel.org; > pab...@redhat.com; Jiri Pirko

[PATCH net-next v2 2/2] virtio_net: Add TX stopped and wake counters

2024-05-10 Thread Daniel Jurgens
Add a tx queue stop and wake counters, they are useful for debugging. $ ./tools/net/ynl/cli.py --spec netlink/specs/netdev.yaml \ --dump qstats-get --json '{"scope": "queue"}' ... {'ifindex': 13, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 14756682850, 'tx-packets': 226465, 'tx-stop'

[PATCH net-next v2 1/2] netdev: Add queue stats for TX stop and wake

2024-05-10 Thread Daniel Jurgens
TX queue stop and wake are counted by some drivers. Support reporting these via netdev-genl queue stats. Signed-off-by: Daniel Jurgens Reviewed-by: Jiri Pirko --- Documentation/netlink/specs/netdev.yaml | 14 ++ include/net/netdev_queues.h | 3 +++ include/uapi/linux/ne

[PATCH net-next 0/2] Add TX stop/wake counters

2024-05-10 Thread Daniel Jurgens
Several drivers provide TX stop and wake counters via ethtool stats. Add those to the netdev queue stats, and use them in virtio_net. v2: - Fixed an accidental line deletion - Enhanced documentation Daniel Jurgens (2): netdev: Add queue stats for TX stop and wake virtio_net: A

RE: RE: [PATCH net-next 2/2] virtio_net: Add TX stopped and wake counters

2024-05-10 Thread Dan Jurgens
> From: Xuan Zhuo > Sent: Friday, May 10, 2024 1:48 AM > To: Dan Jurgens > Cc: m...@redhat.com; jasow...@redhat.com; virtualizat...@lists.linux.dev; > da...@davemloft.net; eduma...@google.com; k...@kernel.org; > pab...@redhat.com; Jiri Pirko ; netdev@vger.kernel.org > Subject: Re: RE: [PATCH net-

Re: [PATCH net-next 1/2] netdev: Add queue stats for TX stop and wake

2024-05-10 Thread Andrew Lunn
On Thu, May 09, 2024 at 09:19:52PM +, Dan Jurgens wrote: > > From: Andrew Lunn > > Sent: Thursday, May 9, 2024 3:47 PM > > To: Dan Jurgens > > Subject: Re: [PATCH net-next 1/2] netdev: Add queue stats for TX stop and > > wake > > > > On Thu, May 09, 2024 at 11:32:15AM -0500, Daniel Jurgens w

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

2024-05-10 Thread Jiri Pirko
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, Jiri Pirko wrote: >> >> Thu, May 09, 2024 at 04:28:12PM CEST, m...@

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 Jiri Pirko
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, Jiri Pirko wrote: >> >> Thu, May 09, 2024 at 02:41:39PM CEST, m...@

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 net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Jiri Pirko
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, Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> >> >> Add support

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

2024-05-10 Thread Jiri Pirko
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 wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). > >Historically both Jason and Michael have attempted to support BQL >for virtio-net, for example: > >ht

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

2024-05-10 Thread Michael S. Tsirkin
On Thu, May 09, 2024 at 01:36:34PM -0500, Daniel Jurgens wrote: > The pointer delcaration was missing the __free(kfree). > > Fixes: ff7c7d9f5261 ("virtio_net: Remove command data from control_buf") > Reported-by: Jens Axboe > Closes: > https://lore.kernel.org/netdev/0674ca1b-020f-4f93-94d0-10496

Re: [PATCH net-next v4 3/4] virtio_net: rx remove premapped failover code

2024-05-10 Thread Larysa Zaremba
On Wed, May 08, 2024 at 02:37:17PM +0800, Xuan Zhuo wrote: > Now, the premapped mode can be enabled unconditionally. > > So we can remove the failover code for merge and small mode. > > Signed-off-by: Xuan Zhuo > Acked-by: Jason Wang > --- > drivers/net/virtio_net.c | 85 +-

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

2024-05-10 Thread Larysa Zaremba
On Wed, May 08, 2024 at 02:37:15PM +0800, Xuan Zhuo wrote: > Now, we have virtio DMA APIs, the driver can be the premapped > mode whatever the virtio core uses dma api or not. > > So remove the limit of checking use_dma_api from > virtqueue_set_dma_premapped(). > > Signed-off-by: Xuan Zhuo > Ack

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

2024-05-10 Thread Heng Qi
On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). Historically both Jason and Michael have attempted to support BQL for virtio-net, for example: https://lore.kernel.org/netdev/21384cb5-99a6-7431-1039-b356521e1...@redhat.com/