[PATCH net] virtio_net: move netdev_tx_reset_queue() call before RX napi enable

2024-08-14 Thread Jiri Pirko
From: Jiri Pirko During suspend/resume the following BUG was hit: [ cut here ] kernel BUG at lib/dynamic_queue_limits.c:99! Internal error: Oops - BUG: 0 [#1] SMP ARM Modules linked in: bluetooth ecdh_generic ecc libaes CPU: 1 PID: 1282 Comm: rtcwake Not tainted 6.10.0

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-14 Thread Jiri Pirko
Wed, Aug 14, 2024 at 11:17:35AM CEST, m.szyprow...@samsung.com wrote: >On 14.08.2024 09:49, Jiri Pirko wrote: >> Mon, Aug 12, 2024 at 06:55:26PM CEST, m.szyprow...@samsung.com wrote: >>> On 12.08.2024 18:47, Jiri Pirko wrote: >>>> Mon, Aug 12, 2024 at 04:57:24PM

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-14 Thread Jiri Pirko
Wed, Aug 14, 2024 at 11:43:51AM CEST, m...@redhat.com wrote: >On Wed, Aug 14, 2024 at 10:17:15AM +0200, Jiri Pirko wrote: >> >diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >> >index 3f10c72743e9..c6af18948092 100644 >> >--- a/drivers/net/virt

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-14 Thread Jiri Pirko
Wed, Aug 14, 2024 at 09:49:57AM CEST, j...@resnulli.us wrote: >Mon, Aug 12, 2024 at 06:55:26PM CEST, m.szyprow...@samsung.com wrote: >>On 12.08.2024 18:47, Jiri Pirko wrote: >>> Mon, Aug 12, 2024 at 04:57:24PM CEST, m.szyprow...@samsung.com wrote: >>>> On 18.0

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-14 Thread Jiri Pirko
Mon, Aug 12, 2024 at 06:55:26PM CEST, m.szyprow...@samsung.com wrote: >On 12.08.2024 18:47, Jiri Pirko wrote: >> Mon, Aug 12, 2024 at 04:57:24PM CEST, m.szyprow...@samsung.com wrote: >>> On 18.06.2024 16:44, Jiri Pirko wrote: >>>> From: Jiri Pirko >>>> &

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-08-12 Thread Jiri Pirko
Mon, Aug 12, 2024 at 04:57:24PM CEST, m.szyprow...@samsung.com wrote: >Hi, > >On 18.06.2024 16:44, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). >> >> Tested on qemu emulated virtio_net device with 1, 2 and 4 queues.

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-07-08 Thread Jiri Pirko
Wed, Jun 26, 2024 at 01:51:00PM CEST, j...@resnulli.us wrote: >Wed, Jun 26, 2024 at 11:58:08AM CEST, m...@redhat.com wrote: >>On Wed, Jun 26, 2024 at 10:43:11AM +0200, Jiri Pirko wrote: >>> Wed, Jun 26, 2024 at 10:08:14AM CEST, m...@redhat.com wrote: >>> >On Wed, Ju

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-26 Thread Jiri Pirko
Wed, Jun 26, 2024 at 11:58:08AM CEST, m...@redhat.com wrote: >On Wed, Jun 26, 2024 at 10:43:11AM +0200, Jiri Pirko wrote: >> Wed, Jun 26, 2024 at 10:08:14AM CEST, m...@redhat.com wrote: >> >On Wed, Jun 26, 2024 at 09:52:58AM +0200, Jiri Pirko wrote: >> >> Thu, Jun 20

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-26 Thread Jiri Pirko
Wed, Jun 26, 2024 at 10:08:14AM CEST, m...@redhat.com wrote: >On Wed, Jun 26, 2024 at 09:52:58AM +0200, Jiri Pirko wrote: >> Thu, Jun 20, 2024 at 12:31:34PM CEST, hen...@linux.alibaba.com wrote: >> >On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin" >> >

Re: [PATCH net-next v4 2/5] virtio_net: enable irq for the control vq

2024-06-26 Thread Jiri Pirko
Thu, Jun 20, 2024 at 12:31:34PM CEST, hen...@linux.alibaba.com wrote: >On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin" >wrote: >> On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote: >> > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote: >> > > On Thu, 20 Jun 2024 1

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-19 Thread Jiri Pirko
Wed, Jun 19, 2024 at 10:23:25AM CEST, m...@redhat.com wrote: >On Wed, Jun 19, 2024 at 10:05:41AM +0200, Jiri Pirko wrote: >> >Oh. Right of course. Worth a comment maybe? Just to make sure >> >we remember not to call __free_old_xmit twice in a row >> >without reiniti

Re: [PATCH] virtio_net: Use u64_stats_fetch_begin() for stats fetch

2024-06-19 Thread Jiri Pirko
Wed, Jun 19, 2024 at 04:55:29AM CEST, lirongq...@baidu.com wrote: >This place is fetching the stats, so u64_stats_fetch_begin >and u64_stats_fetch_retry should be used > >Fixes: 6208799553a8 ("virtio-net: support rx netdim") >Signed-off-by: Li RongQing Reviewed-by: Jiri Pirko

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-19 Thread Jiri Pirko
Wed, Jun 19, 2024 at 09:26:22AM CEST, m...@redhat.com wrote: >On Wed, Jun 19, 2024 at 07:45:16AM +0200, Jiri Pirko wrote: >> Tue, Jun 18, 2024 at 08:18:12PM CEST, m...@redhat.com wrote: >> >This looks like a sensible way to do this. >> >Yet something to improve: >>

Re: [PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Jiri Pirko
Tue, Jun 18, 2024 at 08:18:12PM CEST, m...@redhat.com wrote: >This looks like a sensible way to do this. >Yet something to improve: > > >On Tue, Jun 18, 2024 at 04:44:56PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> [...] >> +static void __free_old_x

[PATCH net-next v3] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Jiri Pirko
From: Jiri Pirko Add support for Byte Queue Limits (BQL). Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is running in background. Netperf TCP_RR results: NOBQL FQC 1q: 159.56 159.33 158.50 154.31agv

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Jiri Pirko
Tue, Jun 18, 2024 at 02:53:42AM CEST, jasow...@redhat.com wrote: >On Mon, Jun 17, 2024 at 5:18 PM Jiri Pirko wrote: >> >> Mon, Jun 17, 2024 at 04:34:26AM CEST, jasow...@redhat.com wrote: >> >On Thu, Jun 13, 2024 at 1:09 AM Jiri Pirko wrote: >> >> >> &g

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-18 Thread Jiri Pirko
Mon, Jun 17, 2024 at 06:14:11PM CEST, m...@redhat.com wrote: >On Wed, Jun 12, 2024 at 07:08:51PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). >> >> Tested on qemu emulated virtio_net device with 1, 2 and 4 qu

Re: [PATCH 1/2] virtio_net: checksum offloading handling fix

2024-06-17 Thread Jiri Pirko
SUM feature if GUEST_CSUM is >available") >Signed-off-by: Heng Qi Reviewed-by: Jiri Pirko

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Jiri Pirko
Mon, Jun 17, 2024 at 03:44:55AM CEST, jasow...@redhat.com wrote: >On Mon, Jun 10, 2024 at 10:19 PM Michael S. Tsirkin wrote: >> >> On Fri, Jun 07, 2024 at 01:30:34PM +0200, Jiri Pirko wrote: >> > Fri, Jun 07, 2024 at 12:23:37PM CEST, m...@redhat.com wrote: >> > &g

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Jiri Pirko
Mon, Jun 17, 2024 at 04:34:26AM CEST, jasow...@redhat.com wrote: >On Thu, Jun 13, 2024 at 1:09 AM Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). >> >> Tested on qemu emulated virtio_net device with 1, 2 and 4 queues.

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-17 Thread Jiri Pirko
Fri, Jun 14, 2024 at 11:54:04AM CEST, kerneljasonx...@gmail.com wrote: >Hello Jiri, > >On Thu, Jun 13, 2024 at 1:08 AM Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). >> >> Tested on qemu emulated virtio_net

[PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-12 Thread Jiri Pirko
From: Jiri Pirko Add support for Byte Queue Limits (BQL). Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is running in background. Netperf TCP_RR results: NOBQL FQC 1q: 159.56 159.33 158.50 154.31agv

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-07 Thread Jiri Pirko
Fri, Jun 07, 2024 at 12:23:37PM CEST, m...@redhat.com wrote: >On Fri, Jun 07, 2024 at 11:57:37AM +0200, Jiri Pirko wrote: >> >True. Personally, I would like to just drop orphan mode. But I'm not >> >sure others are happy with this. >> >> How about to do it o

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-07 Thread Jiri Pirko
Fri, Jun 07, 2024 at 08:47:43AM CEST, jasow...@redhat.com wrote: >On Fri, Jun 7, 2024 at 2:39 PM Jiri Pirko wrote: >> >> Fri, Jun 07, 2024 at 08:25:19AM CEST, jasow...@redhat.com wrote: >> >On Thu, Jun 6, 2024 at 9:45 PM Jiri Pirko wrote: >> >> >> >

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Jiri Pirko
Fri, Jun 07, 2024 at 08:22:31AM CEST, jasow...@redhat.com wrote: >On Thu, Jun 6, 2024 at 9:41 PM Jiri Pirko wrote: >> >> Thu, Jun 06, 2024 at 06:25:15AM CEST, jasow...@redhat.com wrote: >> >On Thu, Jun 6, 2024 at 10:59 AM Jason Xing >> >wrote: >> >>

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Jiri Pirko
Fri, Jun 07, 2024 at 08:25:19AM CEST, jasow...@redhat.com wrote: >On Thu, Jun 6, 2024 at 9:45 PM Jiri Pirko wrote: >> >> Thu, Jun 06, 2024 at 09:56:50AM CEST, jasow...@redhat.com wrote: >> >On Thu, Jun 6, 2024 at 2:05 PM Michael S. Tsirkin wrote: >> >> >

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Jiri Pirko
Thu, Jun 06, 2024 at 09:56:50AM CEST, jasow...@redhat.com wrote: >On Thu, Jun 6, 2024 at 2:05 PM Michael S. Tsirkin wrote: >> >> On Thu, Jun 06, 2024 at 12:25:15PM +0800, Jason Wang wrote: >> > > If the codes of orphan mode don't have an impact when you enable >> > > napi_tx mode, please keep it i

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Jiri Pirko
t;> > > >> > > On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote: >> > > > Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: >> > > > >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: >&

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-06 Thread Jiri Pirko
Thu, Jun 06, 2024 at 04:20:48AM CEST, dave.t...@gmail.com wrote: >On Wed, May 15, 2024 at 12:37 AM Jiri Pirko wrote: > >> Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: >> >On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: >> >> Fri, M

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Jiri Pirko
Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Add support for Byte Queue Limits (BQ

Re: [PATCH net v2 2/2] Revert "virtio_net: Add a lock for per queue RX coalesce"

2024-05-23 Thread Jiri Pirko
_sendto+0x1fe/0x210 > ? find_held_lock+0x2b/0x80 > ? do_user_addr_fault+0x3a2/0x8a0 > ? __lock_release+0x5e/0x160 > ? do_user_addr_fault+0x3a2/0x8a0 > ? lock_release+0x72/0x140 > ? do_user_addr_fault+0x3a7/0x8a0 > __x64_sys_sendto+0x29/0x30 > do_syscall_64+0x78/0x180 > entry_SYSCALL_64_after_hwframe+0x76/0x7e > >Fixes: 4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce") >Signed-off-by: Heng Qi Reviewed-by: Jiri Pirko

Re: [PATCH net 2/2] Revert "virtio_net: Add a lock for per queue RX coalesce"

2024-05-22 Thread Jiri Pirko
Wed, May 22, 2024 at 10:52:19AM CEST, hen...@linux.alibaba.com wrote: >On Wed, 22 May 2024 10:15:46 +0200, Jiri Pirko wrote: >> Wed, May 22, 2024 at 05:45:48AM CEST, hen...@linux.alibaba.com wrote: >> >This reverts commit 4d4ac2ececd3c42a08dd32a6e3a4aaf25f7efe44. >> >&

Re: [PATCH net 1/2] virtio_net: fix possible dim status unrecoverable

2024-05-22 Thread Jiri Pirko
ed to DIM_START_MEASURE. > >Fixes: 6208799553a8 ("virtio-net: support rx netdim") >Signed-off-by: Heng Qi Reviewed-by: Jiri Pirko

Re: [PATCH net 2/2] Revert "virtio_net: Add a lock for per queue RX coalesce"

2024-05-22 Thread Jiri Pirko
Wed, May 22, 2024 at 05:45:48AM CEST, hen...@linux.alibaba.com wrote: >This reverts commit 4d4ac2ececd3c42a08dd32a6e3a4aaf25f7efe44. This commit does not exist in -net or -net-next. > >When the following snippet is run, lockdep will complain[1]. > > /* Acquire all queues dim_locks */ > for (i =

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-20 Thread Jiri Pirko
Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: >On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). > >Historically both Jason and Michael have attempted to support BQL &

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-17 Thread Jiri Pirko
Thu, May 16, 2024 at 09:04:41PM CEST, m...@redhat.com wrote: >On Thu, May 16, 2024 at 05:25:20PM +0200, Jiri Pirko wrote: >> >> >I'd expect a regression if any to be in a streaming benchmark. >> >> Can you elaborate? > >BQL does two things that can hur

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-16 Thread Jiri Pirko
Thu, May 16, 2024 at 02:31:59PM CEST, m...@redhat.com wrote: >On Thu, May 16, 2024 at 12:54:58PM +0200, Jiri Pirko wrote: >> Thu, May 16, 2024 at 06:48:38AM CEST, jasow...@redhat.com wrote: >> >On Wed, May 15, 2024 at 8:54 PM Jiri Pirko wrote: >> >> >> >&g

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-16 Thread Jiri Pirko
Thu, May 16, 2024 at 06:48:38AM CEST, jasow...@redhat.com wrote: >On Wed, May 15, 2024 at 8:54 PM Jiri Pirko wrote: >> >> Wed, May 15, 2024 at 12:12:51PM CEST, j...@resnulli.us wrote: >> >Wed, May 15, 2024 at 10:20:04AM CEST, m...@redhat.com wrote: >> >>On W

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-15 Thread Jiri Pirko
Wed, May 15, 2024 at 12:12:51PM CEST, j...@resnulli.us wrote: >Wed, May 15, 2024 at 10:20:04AM CEST, m...@redhat.com wrote: >>On Wed, May 15, 2024 at 09:34:08AM +0200, Jiri Pirko wrote: >>> Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: >>> >On Fri, Ma

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-15 Thread Jiri Pirko
Wed, May 15, 2024 at 10:20:04AM CEST, m...@redhat.com wrote: >On Wed, May 15, 2024 at 09:34:08AM +0200, Jiri Pirko wrote: >> Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: >> >On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: >> >> Fri, May

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-15 Thread Jiri Pirko
Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: >On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: >> Fri, May 10, 2024 at 12:52:52PM CEST, m...@redhat.com wrote: >> >On Fri, May 10, 2024 at 12:37:15PM +0200, Jiri Pirko wrote: >> >> Thu, May

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Jiri Pirko
Fri, May 10, 2024 at 01:27:08PM CEST, m...@redhat.com wrote: >On Fri, May 10, 2024 at 01:11:49PM +0200, Jiri Pirko wrote: >> Fri, May 10, 2024 at 12:52:52PM CEST, m...@redhat.com wrote: >> >On Fri, May 10, 2024 at 12:37:15PM +0200, Jiri Pirko wrote: >> >> Thu, May

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Jiri Pirko
Fri, May 10, 2024 at 12:52:52PM CEST, m...@redhat.com wrote: >On Fri, May 10, 2024 at 12:37:15PM +0200, Jiri Pirko wrote: >> Thu, May 09, 2024 at 04:28:12PM CEST, m...@redhat.com wrote: >> >On Thu, May 09, 2024 at 03:31:56PM +0200, Jiri Pirko wrote: >> >> Thu, May

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Jiri Pirko
Thu, May 09, 2024 at 04:28:12PM CEST, m...@redhat.com wrote: >On Thu, May 09, 2024 at 03:31:56PM +0200, Jiri Pirko wrote: >> Thu, May 09, 2024 at 02:41:39PM CEST, m...@redhat.com wrote: >> >On Thu, May 09, 2024 at 01:46:15PM +0200, Jiri Pirko wrote: >> >> From: Jiri P

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-10 Thread Jiri Pirko
Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: >On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). > >Historically both Jason and Michael have attempted to support BQL &

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-09 Thread Jiri Pirko
Thu, May 09, 2024 at 02:41:39PM CEST, m...@redhat.com wrote: >On Thu, May 09, 2024 at 01:46:15PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add support for Byte Queue Limits (BQL). >> >> Signed-off-by: Jiri Pirko > >Can we get more detail on the b

[patch net-next] virtio_net: add support for Byte Queue Limits

2024-05-09 Thread Jiri Pirko
From: Jiri Pirko Add support for Byte Queue Limits (BQL). Signed-off-by: Jiri Pirko --- drivers/net/virtio_net.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 218a446c4c27

[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

[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: - remo

[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,

[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

[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

[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

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

2024-04-23 Thread Jiri Pirko
Please ignore, I messed-up. Will send v6 tomorrow. Sigh.

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

2024-04-23 Thread Jiri Pirko
Mon, Apr 22, 2024 at 08:47:39PM CEST, benjamin.poir...@gmail.com wrote: >On 2024-04-22 17:32 +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: J

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

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

[patch net-next v5 repost 4/5] selftests: forwarding: add wait_for_dev() helper

2024-04-23 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: - remo

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

2024-04-23 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 Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools

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

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

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

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

[patch net-next v5 repost 0/5] selftests: virtio_net: introduce initial testing infrastructure

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

Re: [PATCH net-next 1/2] virtio_net: virtnet_send_command supports command-specific-result

2024-04-23 Thread Jiri Pirko
Tue, Apr 23, 2024 at 10:42:25AM CEST, hen...@linux.alibaba.com wrote: >From: Xuan Zhuo > >As the spec >https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 > >The virtnet cvq supports to get result from the device. Is this a statement about current status, cau

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

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

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

2024-04-22 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: - remo

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

2024-04-22 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 Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools

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

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

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

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

Re: [patch net-next v4 2/6] selftests: forwarding: move initial root check to the beginning

2024-04-19 Thread Jiri Pirko
Thu, Apr 18, 2024 at 08:48:20PM CEST, benjamin.poir...@gmail.com wrote: >On 2024-04-18 18:08 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This check can be done at the very beginning of the script. >> As the follow up patch needs to add early code that needs

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

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

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

2024-04-18 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 --- v3->v4: - removed "up" from ip

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

2024-04-18 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 Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 12 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests

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

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

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

2024-04-18 Thread Jiri Pirko
From: Jiri Pirko This check can be done at the very beginning of the script. As the follow up patch needs to add early code that needs to be executed after the check, move it. Signed-off-by: Jiri Pirko --- v3->v4: - removed NUM_NETIFS mode, rephrased the patch subject and descript

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

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

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

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

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

2024-04-18 Thread Jiri Pirko
Thu, Apr 18, 2024 at 10:11:12AM CEST, pe...@nvidia.com wrote: > >Jiri Pirko writes: > >> From: Jiri Pirko >> >> Allow driver tests to work without specifying the netdevice names. >> Introduce a possibility to search for available netdevices according to >>

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

2024-04-18 Thread Jiri Pirko
Thu, Apr 18, 2024 at 10:43:44AM CEST, pe...@nvidia.com wrote: > >Petr Machata writes: > >> Jiri Pirko writes: >> >>> +# Whether to find netdevice according to the specified driver. >>> +: "${NETIF_FIND_DRIVER:=}" >> >> This would be

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

2024-04-18 Thread Jiri Pirko
Thu, Apr 18, 2024 at 10:33:13AM CEST, pe...@nvidia.com wrote: > >Jiri Pirko writes: > >> 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 >> t

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

2024-04-18 Thread Jiri Pirko
Thu, Apr 18, 2024 at 10:39:49AM CEST, pe...@nvidia.com wrote: > >Jiri Pirko writes: > >> From: Jiri Pirko >> >> Introduce initial tests for virtio_net driver. Focus on feature testing >> leveraging previously introduced debugfs feature filtering >> infras

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

2024-04-18 Thread Jiri Pirko
Thu, Apr 18, 2024 at 02:59:41AM CEST, jasow...@redhat.com wrote: >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: >> >> >> >

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

[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

[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

[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

[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

[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

[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

[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

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: >> >> >>

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

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

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 c

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

[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

[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

[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

[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

[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

[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

[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

  1   2   3   4   5   6   7   8   9   10   >