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

2024-04-16 Thread Jason Xing
On Wed, Apr 17, 2024 at 2:35 PM Heng Qi wrote: > > > > 在 2024/4/17 上午10:53, Jason Xing 写道: > > Hello Jakub, > > > > On Wed, Apr 17, 2024 at 10:30 AM Jakub Kicinski wrote: > >> On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote: > >>> Have you encountered compilation problems in v8? > >> Yes, please

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

2024-04-16 Thread Heng Qi
在 2024/4/17 上午10:53, Jason Xing 写道: Hello Jakub, On Wed, Apr 17, 2024 at 10:30 AM Jakub Kicinski wrote: On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote: Have you encountered compilation problems in v8? Yes, please try building allmodconfig: make allmodconfig make .. there's many driver

Re: [patch net-next v2 1/6] virtio: add debugfs infrastructure to allow to debug virtio features

2024-04-16 Thread Jason Wang
On Tue, Apr 16, 2024 at 5:37 PM Jiri Pirko wrote: > > Tue, Apr 16, 2024 at 05:52:41AM CEST, jasow...@redhat.com wrote: > >On Tue, Apr 16, 2024 at 12:25 AM Jiri Pirko wrote: > >> > >> From: Jiri Pirko > >> > >> Currently there is no way for user to set what features the driver > >> should obey or

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

2024-04-16 Thread Jason Wang
On Tue, Apr 16, 2024 at 9:03 PM Jiri Pirko wrote: > > Tue, Apr 16, 2024 at 11:53:35AM CEST, j...@resnulli.us wrote: > >Mon, Apr 15, 2024 at 07:26:59PM CEST, k...@kernel.org wrote: > >>On Sat, 13 Apr 2024 15:23:53 +0200 Jiri Pirko wrote: > >>> That is a goal. Currently I do it with: > >>> vng --qem

Re: [PATCH vhost 3/6] virtio_net: replace private by pp struct inside page

2024-04-16 Thread Jason Wang
On Wed, Apr 17, 2024 at 9:38 AM Xuan Zhuo wrote: > > On Tue, 16 Apr 2024 11:24:53 +0800, Jason Wang wrote: > > On Mon, Apr 15, 2024 at 5:04 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 15 Apr 2024 16:56:45 +0800, Jason Wang > > > wrote: > > > > On Mon, Apr 15, 2024 at 4:50 PM Xuan Zhuo > > >

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

2024-04-16 Thread Jason Xing
Hello Jakub, On Wed, Apr 17, 2024 at 10:30 AM Jakub Kicinski wrote: > > On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote: > > Have you encountered compilation problems in v8? > > Yes, please try building allmodconfig: > > make allmodconfig > make .. > > there's many drivers using this API, you go

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

2024-04-16 Thread Jakub Kicinski
On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote: > Have you encountered compilation problems in v8? Yes, please try building allmodconfig: make allmodconfig make .. there's many drivers using this API, you gotta build the full kernel..

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

2024-04-16 Thread Heng Qi
在 2024/4/17 上午8:38, Jakub Kicinski 写道: On Tue, 16 Apr 2024 20:29:46 +0800 Heng Qi wrote: Please review, thank you very much! Please stop posting code which does not compile. The mailing list is for reviewing code, not build testing it. Sorry, three versions v7, RESEND v7, v8 in two days, t

Re: [PATCH vhost 3/6] virtio_net: replace private by pp struct inside page

2024-04-16 Thread Xuan Zhuo
On Tue, 16 Apr 2024 11:24:53 +0800, Jason Wang wrote: > On Mon, Apr 15, 2024 at 5:04 PM Xuan Zhuo wrote: > > > > On Mon, 15 Apr 2024 16:56:45 +0800, Jason Wang wrote: > > > On Mon, Apr 15, 2024 at 4:50 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 15 Apr 2024 14:43:24 +0800, Jason Wang >

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

2024-04-16 Thread Jakub Kicinski
On Tue, 16 Apr 2024 20:29:46 +0800 Heng Qi wrote: > Please review, thank you very much! Please stop posting code which does not compile. The mailing list is for reviewing code, not build testing it. -- pw-bot: cr

[PATCH net-next v4 6/6] virtio_net: Remove rtnl lock protection of command buffers

2024-04-16 Thread Daniel Jurgens
The rtnl lock is no longer needed to protect the control buffer and command VQ. Signed-off-by: Daniel Jurgens Reviewed-by: Jiri Pirko --- drivers/net/virtio_net.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/

[PATCH net-next v4 4/6] virtio_net: Do DIM update for specified queue only

2024-04-16 Thread Daniel Jurgens
Since we no longer have to hold the RTNL lock here just do updates for the specified queue. Signed-off-by: Daniel Jurgens --- drivers/net/virtio_net.c | 40 +++- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers

[PATCH net-next v4 2/6] virtio_net: Remove command data from control_buf

2024-04-16 Thread Daniel Jurgens
Allocate memory for the data when it's used. Ideally the could be on the stack, but we can't DMA stack memory. With this change only the header and status memory are shared between commands, which will allow using a tighter lock than RTNL. Signed-off-by: Daniel Jurgens Reviewed-by: Jiri Pirko --

[PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-16 Thread Daniel Jurgens
The command VQ will no longer be protected by the RTNL lock. Use a spinlock to protect the control buffer header and the VQ. Signed-off-by: Daniel Jurgens Reviewed-by: Jiri Pirko --- drivers/net/virtio_net.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/vi

[PATCH net-next v4 5/6] virtio_net: Add a lock for per queue RX coalesce

2024-04-16 Thread Daniel Jurgens
Once the RTNL locking around the control buffer is removed there can be contention on the per queue RX interrupt coalescing data. Use a spin lock per queue. Signed-off-by: Daniel Jurgens --- drivers/net/virtio_net.c | 40 +--- 1 file changed, 33 insertions(+),

[PATCH net-next v4 1/6] virtio_net: Store RSS setting in virtnet_info

2024-04-16 Thread Daniel Jurgens
Stop storing RSS setting in the control buffer. This is prep work for removing RTNL lock protection of the control buffer. Signed-off-by: Daniel Jurgens Reviewed-by: Jiri Pirko --- drivers/net/virtio_net.c | 40 1 file changed, 20 insertions(+), 20 delet

[PATCH net-next v4 0/6] Remove RTNL lock protection of CVQ

2024-04-16 Thread Daniel Jurgens
Currently the buffer used for control VQ commands is protected by the RTNL lock. Previously this wasn't a major concern because the control VQ was only used during device setup and user interaction. With the recent addition of dynamic interrupt moderation the control VQ may be used frequently durin

RE: [PATCH net-next v3 5/6] virtio_net: Add a lock for per queue RX coalesce

2024-04-16 Thread Dan Jurgens
> From: Jakub Kicinski > Sent: Tuesday, April 16, 2024 9:27 AM > To: Dan Jurgens > On Tue, 16 Apr 2024 03:15:34 + Dan Jurgens wrote: > > Which version? It compiles for me with: > > $ clang -v > > clang version 15.0.7 (Fedora 15.0.7-2.fc37) > > clang version 17.0.6 (Fedora 17.0.6-2.fc39) >

Re: [PATCH net-next v3 5/6] virtio_net: Add a lock for per queue RX coalesce

2024-04-16 Thread Jakub Kicinski
On Tue, 16 Apr 2024 03:15:34 + Dan Jurgens wrote: > Which version? It compiles for me with: > $ clang -v > clang version 15.0.7 (Fedora 15.0.7-2.fc37) clang version 17.0.6 (Fedora 17.0.6-2.fc39) allmodconfig The combination of UNIQUE() goto and guard seems to make it unhappy: ../drivers/net

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

2024-04-16 Thread Jiri Pirko
Tue, Apr 16, 2024 at 11:53:35AM CEST, j...@resnulli.us wrote: >Mon, Apr 15, 2024 at 07:26:59PM CEST, k...@kernel.org wrote: >>On Sat, 13 Apr 2024 15:23:53 +0200 Jiri Pirko wrote: >>> That is a goal. Currently I do it with: >>> vng --qemu-opts="-nic >>> tap,id=nd0,ifname=xtap0,model=virtio-net-pci,

[PATCH net-next v8 1/4] linux/dim: move useful macros to .h file

2024-04-16 Thread Heng Qi
These will be used in subsequent patches, including newly declared profile arrays. Signed-off-by: Heng Qi --- include/linux/dim.h | 13 + lib/dim/net_dim.c | 10 ++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/include/linux/dim.h b/include/linux/dim.h ind

[PATCH net-next v8 4/4] virtio-net: support dim profile fine-tuning

2024-04-16 Thread Heng Qi
Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to fine-tune the profile list. Since the profile now exists in netdevice, adding a function similar t

[PATCH net-next v8 3/4] virtio-net: refactor dim initialization/destruction

2024-04-16 Thread Heng Qi
Extract the initialization and destruction actions of dim for use in the next patch. Signed-off-by: Heng Qi --- drivers/net/virtio_net.c | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.

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

2024-04-16 Thread Heng Qi
The NetDIM library provides excellent acceleration for many modern network cards. However, the default profiles of DIM limits its maximum capabilities for different NICs, so providing a way which the NIC can be custom configured is necessary. Currently, interaction with the driver is still based o

[PATCH net-next v8 2/4] ethtool: provide customized dim profile management

2024-04-16 Thread Heng Qi
The NetDIM library, currently leveraged by an array of NICs, delivers excellent acceleration benefits. Nevertheless, NICs vary significantly in their dim profile list prerequisites. Specifically, virtio-net backends may present diverse sw or hw device implementation, making a one-size-fits-all par

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

2024-04-16 Thread Jiri Pirko
Mon, Apr 15, 2024 at 07:26:59PM CEST, k...@kernel.org wrote: >On Sat, 13 Apr 2024 15:23:53 +0200 Jiri Pirko wrote: >> That is a goal. Currently I do it with: >> vng --qemu-opts="-nic >> tap,id=nd0,ifname=xtap0,model=virtio-net-pci,script=no,downscript=no,mac=52:54:00:12:34:57 >> -nic >> tap,id=n

Re: [patch net-next v2 1/6] virtio: add debugfs infrastructure to allow to debug virtio features

2024-04-16 Thread Jiri Pirko
Tue, Apr 16, 2024 at 05:52:41AM CEST, jasow...@redhat.com wrote: >On Tue, Apr 16, 2024 at 12:25 AM Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> Currently there is no way for user to set what features the driver >> should obey or not, it is hard wired in the code. >> >> In order to be able to de

Re: [patch net-next v2 5/6] selftests: forwarding: add wait_for_dev() helper

2024-04-16 Thread Jiri Pirko
Mon, Apr 15, 2024 at 11:39:42PM CEST, benjamin.poir...@gmail.com wrote: >On 2024-04-15 18:25 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> The existing setup_wait*() helper family check the status of the >> interface to be up. Introduce wait_for_dev() to wait for the netdevice >> to appear,