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

2024-04-15 Thread Jason Wang
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 debug the device behavior in case some feature is > disabled, introduce a d

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

2024-04-15 Thread Jason Wang
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 > > > wrote: > > > > On Mon, Apr 15, 2024 at 10:35 AM Xuan Zhuo > >

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

2024-04-15 Thread Dan Jurgens
> From: Jakub Kicinski > Sent: Friday, April 12, 2024 9:21 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 v7 2/4] ethtool: provide customized dim profile management

2024-04-15 Thread Heng Qi
在 2024/4/16 上午4:03, Simon Horman 写道: On Mon, Apr 15, 2024 at 05:36:36PM +0800, Heng Qi wrote: ... @@ -10229,6 +10230,61 @@ static void netdev_do_free_pcpu_stats(struct net_device *dev) } } +static int dev_dim_profile_init(struct net_device *dev) +{ +#if IS_ENABLED(CONFIG_DIML

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

2024-04-15 Thread Benjamin Poirier
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, for example after test script does manual device bind. > > Signed-off-by: Jir

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

2024-04-15 Thread Dan Jurgens
> From: Heng Qi > Sent: Monday, April 15, 2024 8:42 AM > To: Dan Jurgens ; netdev@vger.kernel.org > 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 >

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

2024-04-15 Thread Simon Horman
On Mon, Apr 15, 2024 at 05:36:36PM +0800, Heng Qi wrote: ... > @@ -10229,6 +10230,61 @@ static void netdev_do_free_pcpu_stats(struct > net_device *dev) > } > } > > +static int dev_dim_profile_init(struct net_device *dev) > +{ > +#if IS_ENABLED(CONFIG_DIMLIB) > + u32 supported = dev-

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

2024-04-15 Thread Jakub Kicinski
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=nd1,ifname=xtap1,model=virtio-net-pci,script=no,downscript=no,mac=52

[patch net-next v2 6/6] selftests: virtio_net: add initial tests

2024-04-15 Thread Jiri Pirko
From: Jiri Pirko Introduce initial tests for virtio_net driver. Focus on feature testing leveraging previously introduced debugfs feature filtering infrastructure. Add very basic ping and F_MAC feature tests. To run this, do: $ make -C tools/testing/selftests/ TARGETS=drivers/net/virtio_net/ run

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

2024-04-15 Thread Jiri Pirko
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, for example after test script does manual device bind. Signed-off-by: Jiri Pirko --- v1->v2: - reworked wait_for_dev() helper to us

[patch net-next v2 4/6] selftests: forwarding: add check_driver() helper

2024-04-15 Thread Jiri Pirko
From: Jiri Pirko Add a helper to be used to check if the netdevice is backed by specified driver. Signed-off-by: Jiri Pirko --- tools/testing/selftests/net/forwarding/lib.sh | 12 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools

[patch net-next v2 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-15 Thread Jiri Pirko
From: Jiri Pirko Allow driver tests to work without specifying the netdevice names. Introduce a possibility to search for available netdevices according to set driver name. Allow test to specify the name by setting NETIF_FIND_DRIVER variable. Note that user overrides this either by passing netde

[patch net-next v2 2/6] selftests: forwarding: move couple of initial check to the beginning

2024-04-15 Thread Jiri Pirko
From: Jiri Pirko These two check can be done at he very beginning of the script. As the follow up patch needs to add early code that needs to be executed after the checks, move them. Signed-off-by: Jiri Pirko --- tools/testing/selftests/net/forwarding/lib.sh | 20 +-- 1 file ch

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

2024-04-15 Thread Jiri Pirko
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 debug the device behavior in case some feature is disabled, introduce a debugfs infrastructure with couple of files allowing user to see wh

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

2024-04-15 Thread Jiri Pirko
From: Jiri Pirko This patchset aims at introducing very basic initial infrastructure for virtio_net testing, namely it focuses on virtio feature testing. The first patch adds support for debugfs for virtio devices, allowing user to filter features to pretend to be driver that is not capable of t

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

2024-04-15 Thread Heng Qi
在 2024/4/13 上午3:53, 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 | 23 --- 1 fi

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

2024-04-15 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 RESEND net-next v7 3/4] virtio-net: refactor dim initialization/destruction

2024-04-15 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 RESEND net-next v7 2/4] ethtool: provide customized dim profile management

2024-04-15 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

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

2024-04-15 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 RESEND net-next v7 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-15 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

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

2024-04-15 Thread Heng Qi
Please ignore this set, "RESEND v7" will be used instead. 在 2024/4/15 下午5:36, 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 ca

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

2024-04-15 Thread kernel test robot
Hi Heng, kernel test robot noticed the following build warnings: [auto build test WARNING on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/linux-dim-move-useful-macros-to-h-file/20240415-173921 base: net-next/main patch link: https://lore.kernel.org/r

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

2024-04-15 Thread kernel test robot
Hi Heng, kernel test robot noticed the following build warnings: [auto build test WARNING on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/linux-dim-move-useful-macros-to-h-file/20240415-173921 base: net-next/main patch link: https://lore.kernel.org/r

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

2024-04-15 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

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

2024-04-15 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 v7 1/4] linux/dim: move useful macros to .h file

2024-04-15 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 v7 3/4] virtio-net: refactor dim initialization/destruction

2024-04-15 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 v7 0/4] ethtool: provide the dim profile fine-tuning channel

2024-04-15 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

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

2024-04-15 Thread Xuan Zhuo
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 wrote: > > > On Mon, Apr 15, 2024 at 10:35 AM Xuan Zhuo > > > wrote: > > > > > > > > On Fri, 12 Apr 2024 13:49:12 +0800, Jason Wang

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

2024-04-15 Thread Jason Wang
On Mon, Apr 15, 2024 at 4:50 PM Xuan Zhuo wrote: > > On Mon, 15 Apr 2024 14:43:24 +0800, Jason Wang wrote: > > On Mon, Apr 15, 2024 at 10:35 AM Xuan Zhuo > > wrote: > > > > > > On Fri, 12 Apr 2024 13:49:12 +0800, Jason Wang > > > wrote: > > > > On Fri, Apr 12, 2024 at 1:39 PM Xuan Zhuo > >

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

2024-04-15 Thread Xuan Zhuo
On Mon, 15 Apr 2024 14:43:24 +0800, Jason Wang wrote: > On Mon, Apr 15, 2024 at 10:35 AM Xuan Zhuo wrote: > > > > On Fri, 12 Apr 2024 13:49:12 +0800, Jason Wang wrote: > > > On Fri, Apr 12, 2024 at 1:39 PM Xuan Zhuo > > > wrote: > > > > > > > > On Fri, 12 Apr 2024 12:47:55 +0800, Jason Wang

Re: [patch net-next 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-15 Thread Jiri Pirko
Sun, Apr 14, 2024 at 09:32:46PM CEST, benjamin.poir...@gmail.com wrote: >On 2024-04-13 15:27 +0200, Jiri Pirko wrote: >> Fri, Apr 12, 2024 at 10:38:30PM CEST, benjamin.poir...@gmail.com wrote: >> >On 2024-04-12 17:13 +0200, Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> >> >> Allow driver tests t

Re: [PATCH net-next v5 4/9] virtio_net: support device stats

2024-04-15 Thread Jason Wang
On Mon, Apr 15, 2024 at 4:15 PM Xuan Zhuo wrote: > > On Mon, 15 Apr 2024 14:45:36 +0800, Jason Wang wrote: > > On Mon, Apr 15, 2024 at 10:51 AM Xuan Zhuo > > wrote: > > > > > > On Thu, 11 Apr 2024 14:09:24 +0800, Jason Wang > > > wrote: > > > > On Wed, Apr 10, 2024 at 6:55 PM Xuan Zhuo > >

Re: [PATCH net-next v5 4/9] virtio_net: support device stats

2024-04-15 Thread Xuan Zhuo
On Mon, 15 Apr 2024 14:45:36 +0800, Jason Wang wrote: > On Mon, Apr 15, 2024 at 10:51 AM Xuan Zhuo wrote: > > > > On Thu, 11 Apr 2024 14:09:24 +0800, Jason Wang wrote: > > > On Wed, Apr 10, 2024 at 6:55 PM Xuan Zhuo > > > wrote: > > > > > > > > On Wed, 10 Apr 2024 14:09:23 +0800, Jason Wang