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

2024-05-09 Thread Xuan Zhuo
On Fri, 10 May 2024 03:35:51 +, Dan Jurgens wrote: > > From: Xuan Zhuo > > Sent: Thursday, May 9, 2024 8:22 PM > > To: Dan Jurgens > > Cc: m...@redhat.com; jasow...@redhat.com; xuanz...@linux.alibaba.com; > > virtualizat...@lists.linux.dev; da...@davemloft.net; > > eduma...@google.com; k...@

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

2024-05-09 Thread Jason Wang
On Thu, May 9, 2024 at 10:28 PM Michael S. Tsirkin 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 sup

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

2024-05-09 Thread Jason Wang
On Thu, May 9, 2024 at 7:46 PM Jiri Pirko wrote: > > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Signed-off-by: Jiri Pirko > --- Does this work for non tx NAPI mode (it seems not obvious to me)? Thanks

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

2024-05-09 Thread Dan Jurgens
> From: Jakub Kicinski > Sent: Thursday, May 9, 2024 8:31 PM > 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; pab...@redhat.com; Jiri > Pirko > Subject:

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

2024-05-09 Thread Dan Jurgens
> From: Xuan Zhuo > Sent: Thursday, May 9, 2024 8:22 PM > To: Dan Jurgens > Cc: 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 > ; Dan Jurgens ; > netdev

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

2024-05-09 Thread Jakub Kicinski
On Thu, 9 May 2024 11:32:15 -0500 Daniel Jurgens wrote: > diff --git a/tools/include/uapi/linux/netdev.h > b/tools/include/uapi/linux/netdev.h > index cf24f1d9adf8..ccf6976b1693 100644 > --- a/tools/include/uapi/linux/netdev.h > +++ b/tools/include/uapi/linux/netdev.h > @@ -164,7 +164,8 @@ enum {

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

2024-05-09 Thread Xuan Zhuo
On Thu, 9 May 2024 11:32:16 -0500, 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-ty

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

2024-05-09 Thread Xuan Zhuo
On Thu, 9 May 2024 13:36:34 -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-104964566...

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

2024-05-09 Thread Dan Jurgens
> 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 wrote: > > TX queue stop and wake are counted by some drivers. > > Support r

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

2024-05-09 Thread Andrew Lunn
On Thu, May 09, 2024 at 11:32:15AM -0500, 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 > --- > Documentation/netlink/specs/netdev.yaml | 10 +

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

2024-05-09 Thread Jens Axboe
On 5/9/24 12:36 PM, Daniel Jurgens wrote: > The pointer delcaration was missing the __free(kfree). Works for me: Tested-by: Jens Axboe -- Jens Axboe

[PATCH] virtio_net: Fix memory leak in virtnet_rx_mod_work

2024-05-09 Thread Daniel Jurgens
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-104964566...@kernel.dk/ Signed-off-by: Daniel Jurgens --- drivers/net/virtio_ne

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

2024-05-09 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 | 10 ++ include/net/netdev_queues.h | 3 +++ include/uapi/linux/netdev

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

2024-05-09 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 0/2] Add TX stop/wake counters

2024-05-09 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. Daniel Jurgens (2): netdev: Add queue stats for TX stop and wake virtio_net: Add TX stopped and wake counters Documentation/netlink/specs/netdev.yaml | 10 +++

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 Jiri Pirko
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 > >Can we get more detail on the benefits you observe etc? >Thanks! More

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 - >

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

2024-05-09 Thread Jiri Pirko
From: Jiri Pirko Add support for Byte Queue Limits (BQL). Signed-off-by: Jiri Pirko --- drivers/net/virtio_net.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 218a446c4c27..c53d6