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

2024-04-12 Thread Jakub Kicinski
On Thu, 11 Apr 2024 22:12:29 +0800 Heng Qi wrote: > +name: usec > +type: u16 > + - > +name: pkts > +type: u16 > + - > +name: comps > +type: u16 I think I mentioned already - u32 please.

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

2024-04-12 Thread Jakub Kicinski
On Thu, 11 Apr 2024 22:12:29 +0800 Heng Qi wrote: > +#include > #include > #include > #include > @@ -1649,6 +1650,9 @@ struct net_device_ops { > * @IFF_SEE_ALL_HWTSTAMP_REQUESTS: device wants to see calls to > * ndo_hwtstamp_set() for all timestamp requests regardless of source, > *

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

2024-04-12 Thread Jakub Kicinski
On Fri, 12 Apr 2024 14:53:08 -0500 Daniel Jurgens wrote: > 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. Does not compile on Clang. > + scoped_guard(spinlock, &vi

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

2024-04-12 Thread Jakub Kicinski
On Fri, 12 Apr 2024 17:13:08 +0200 Jiri Pirko wrote: > 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 p

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

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > 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

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

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +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 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > 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 variabl

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

2024-04-12 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 v3 5/6] virtio_net: Add a lock for per queue RX coalesce

2024-04-12 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 | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-)

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

2024-04-12 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 v3 2/6] virtio_net: Remove command data from control_buf

2024-04-12 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 v3 3/6] virtio_net: Add a lock for the command VQ.

2024-04-12 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 v3 0/6] Remove RTNL lock protection of CVQ

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

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

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

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

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

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

2024-04-12 Thread Heng Qi
在 2024/4/12 下午11:33, Brett Creeley 写道: On 4/11/2024 7:07 PM, Heng Qi wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. 在 2024/4/11 下午11:19, Brett Creeley 写道: On 4/11/2024 7:12 AM, Heng Qi wrote:

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

2024-04-12 Thread Brett Creeley
On 4/11/2024 7:07 PM, Heng Qi wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. 在 2024/4/11 下午11:19, Brett Creeley 写道: On 4/11/2024 7:12 AM, Heng Qi wrote: Caution: This message originated from an

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

2024-04-12 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 6/6] selftests: virtio_net: add initial tests

2024-04-12 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 5/6] selftests: forwarding: add wait_for_dev() helper

2024-04-12 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 --- tools/testing/selftests/net/forwarding/lib.sh

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

2024-04-12 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 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-12 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 1/6] virtio: add debugfs infrastructure to allow to debug virtio features

2024-04-12 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 0/6] selftests: virtio_net: introduce initial testing infrastructure

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