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

2024-04-17 Thread Jason Wang
On Wed, Apr 17, 2024 at 3:31 AM Daniel Jurgens wrote: > > 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 f

Re: [PATCH vhost 6/6] virtio_net: rx remove premapped failover code

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM Xuan Zhuo wrote: > > Now, for the merge and small, the premapped mode can be enabled > unconditionally. I guess it's not only merge and small but big mode as well? > > So we can remove the failover code. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thank

Re: [PATCH vhost 5/6] virtio_net: enable premapped by default

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM Xuan Zhuo wrote: > > Currently, big, merge, and small modes all support the premapped mode. > We can now enable premapped mode by default. Furthermore, > virtqueue_set_dma_premapped() must succeed when called immediately after > find_vqs(). Consequently, we can ass

Re: [PATCH vhost 4/6] virtio_net: big mode support premapped

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM Xuan Zhuo wrote: > > In big mode, pre-mapping DMA is beneficial because if the pages are not > used, we can reuse them without needing to unmap and remap. > > We require space to store the DMA address. I use the page.dma_addr to > store the DMA address from the pp

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

2024-04-17 Thread Jiri Pirko
Wed, Apr 17, 2024 at 08:58:27PM CEST, benjamin.poir...@gmail.com wrote: >On 2024-04-17 18:45 +0200, Jiri Pirko wrote: >> 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

Re: [PATCH vhost 2/6] virtio_ring: enable premapped mode whatever use_dma_api

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM 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 > --- > driv

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

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM Xuan Zhuo wrote: > > Now, we chain the pages of big mode by the page's private variable. > But a subsequent patch aims to make the big mode to support > premapped mode. This requires additional space to store the dma addr. > > Within the sub-struct that contains th

Re: [PATCH vhost 2/6] virtio_ring: enable premapped mode whatever use_dma_api

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM 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 Acked-by: Ja

Re: [PATCH vhost 1/6] virtio_ring: introduce dma map api for page

2024-04-17 Thread Jason Wang
On Thu, Apr 11, 2024 at 10:51 AM Xuan Zhuo wrote: > > The virtio-net big mode sq will use these APIs to map the pages. > > dma_addr_t virtqueue_dma_map_page_attrs(struct virtqueue *_vq, struct page > *page, >size_t offset, size_t size, >

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

2024-04-17 Thread Jason Wang
On Thu, Apr 18, 2024 at 12:15 PM Jason Wang wrote: > > On Wed, Apr 17, 2024 at 4:45 PM Xuan Zhuo wrote: > > > > On Wed, 17 Apr 2024 12:08:10 +0800, Jason Wang wrote: > > > On Wed, Apr 17, 2024 at 9:38 AM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 16 Apr 2024 11:24:53 +0800, Jason Wang >

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

2024-04-17 Thread Jason Wang
On Wed, Apr 17, 2024 at 4:45 PM Xuan Zhuo wrote: > > On Wed, 17 Apr 2024 12:08:10 +0800, Jason Wang wrote: > > 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 > > >

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

2024-04-17 Thread Jason Wang
On Wed, Apr 17, 2024 at 3:23 PM Jiri Pirko wrote: > > Wed, Apr 17, 2024 at 06:37:30AM CEST, jasow...@redhat.com wrote: > >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

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

2024-04-17 Thread Benjamin Poirier
On 2024-04-17 18:45 +0200, Jiri Pirko wrote: > 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/self

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

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

2024-04-17 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 v3 4/6] selftests: forwarding: add check_driver() helper

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

2024-04-17 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 v3 2/6] selftests: forwarding: move couple of initial check to the beginning

2024-04-17 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 | 15 ++- 1 file change

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

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

2024-04-17 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 vhost 3/6] virtio_net: replace private by pp struct inside page

2024-04-17 Thread Xuan Zhuo
On Wed, 17 Apr 2024 12:08:10 +0800, Jason Wang wrote: > 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 >

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

2024-04-17 Thread Heng Qi
在 2024/4/17 下午2:52, 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?

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

2024-04-17 Thread Jiri Pirko
Wed, Apr 17, 2024 at 06:37:30AM CEST, jasow...@redhat.com wrote: >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 the