Re: [PATCH vhost v3 2/4] virtio_net: big mode skip the unmap check

2024-04-24 Thread Jason Wang
On Thu, Apr 25, 2024 at 10:37 AM Xuan Zhuo wrote: > > On Thu, 25 Apr 2024 10:11:55 +0800, Jason Wang wrote: > > On Wed, Apr 24, 2024 at 4:17 PM Xuan Zhuo > > wrote: > > > > > > The virtio-net big mode did not enable premapped mode, > > > so we did not need to check the unmap. And the subsequent

Re: [PATCH net-next v6 8/8] virtio-net: support queue stat

2024-04-24 Thread Jakub Kicinski
On Tue, 23 Apr 2024 19:31:41 +0800 Xuan Zhuo wrote: > +static void virtnet_get_base_stats(struct net_device *dev, > +struct netdev_queue_stats_rx *rx, > +struct netdev_queue_stats_tx *tx) > +{ > + /* The queue stats of the virtio-n

Re: [PATCH vhost v3 2/4] virtio_net: big mode skip the unmap check

2024-04-24 Thread Xuan Zhuo
On Thu, 25 Apr 2024 10:11:55 +0800, Jason Wang wrote: > On Wed, Apr 24, 2024 at 4:17 PM Xuan Zhuo wrote: > > > > The virtio-net big mode did not enable premapped mode, > > so we did not need to check the unmap. And the subsequent > > commit will remove the failover code for failing enable > > pre

Re: [PATCH vhost v3 2/4] virtio_net: big mode skip the unmap check

2024-04-24 Thread Jason Wang
On Wed, Apr 24, 2024 at 4:17 PM Xuan Zhuo wrote: > > The virtio-net big mode did not enable premapped mode, > so we did not need to check the unmap. And the subsequent > commit will remove the failover code for failing enable > premapped for merge and small mode. So we need to remove > the checkin

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

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 12:40 +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 v6 4/5] selftests: forwarding: add wait_for_dev() helper

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 12:40 +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 v6 3/5] selftests: forwarding: add check_driver() helper

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 12:40 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add a helper to be used to check if the netdevice is backed by specified > driver. > > Signed-off-by: Jiri Pirko > --- Reviewed-by: Benjamin Poirier

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

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 12:40 +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

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

2024-04-24 Thread Heng Qi
在 2024/4/23 上午4:55, Michael S. Tsirkin 写道: On Mon, Apr 15, 2024 at 09:38:03PM +0800, Heng Qi wrote: 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 whic

[patch net-next v6 5/5] selftests: virtio_net: add initial tests

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

2024-04-24 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 Reviewed-by: Petr Machata --- v3->v4: - removed "

[patch net-next v6 3/5] selftests: forwarding: add check_driver() helper

2024-04-24 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 --- v5->v6: - removed the root check removal, that was a rebase mistake --- tools/testing/selftests/net/forwarding/lib.sh | 12 1 file changed, 12 insertions

[patch net-next v6 2/5] selftests: forwarding: add ability to assemble NETIFS array by driver name

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

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

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

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

Re: [PATCH net-next v6 6/8] virtio_net: rename stat tx_timeout to timeout

2024-04-24 Thread Xuan Zhuo
On Wed, 24 Apr 2024 11:55:24 +0800, Jason Wang wrote: > On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote: > > > > Now, we have this: > > > > tx_queue_0_tx_timeouts > > > > This is used to record the tx schedule timeout. > > But this has two "tx". I think the below is enough. > > > > tx_que

Re: [PATCH net-next v6 5/8] virtio_net: add the total stats field

2024-04-24 Thread Xuan Zhuo
On Wed, 24 Apr 2024 11:52:12 +0800, Jason Wang wrote: > On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote: > > > > Now, we just show the stats of every queue. > > > > But for the user, the total values of every stat may are valuable. > > > > NIC statistics: > > rx_packets: 373522 > > rx_b

[PATCH vhost v3 4/4] virtio_net: remove the misleading comment

2024-04-24 Thread Xuan Zhuo
We call the build_skb() actually without copying data. The comment is misleading. So remove it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a4b924ba18d3..3

[PATCH vhost v3 1/4] virtio_ring: enable premapped mode whatever use_dma_api

2024-04-24 Thread Xuan Zhuo
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: Jason Wang --- drivers/virtio/virtio_ring.c | 7 +-- 1 file ch

[PATCH vhost v3 3/4] virtio_net: rx remove premapped failover code

2024-04-24 Thread Xuan Zhuo
Now, the premapped mode can be enabled unconditionally. So we can remove the failover code for merge and small mode. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/net/virtio_net.c | 85 +--- 1 file changed, 35 insertions(+), 50 deletions(-) diff

[PATCH vhost v3 2/4] virtio_net: big mode skip the unmap check

2024-04-24 Thread Xuan Zhuo
The virtio-net big mode did not enable premapped mode, so we did not need to check the unmap. And the subsequent commit will remove the failover code for failing enable premapped for merge and small mode. So we need to remove the checking do_dma code in the big mode path. Signed-off-by: Xuan Zhuo

[PATCH vhost v3 0/4] virtio_net: rx enable premapped mode by default

2024-04-24 Thread Xuan Zhuo
Actually, for the virtio drivers, we can enable premapped mode whatever the value of use_dma_api. Because we provide the virtio dma apis. So the driver can enable premapped mode unconditionally. This patch set makes the big mode of virtio-net to support premapped mode. And enable premapped mode fo