Signed-off-by: Joe Damato
---
arch/x86/include/asm/switch_to.h | 30 ++
arch/x86/kernel/process_64.c | 29 ++---
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm
Signed-off-by: Joe Damato
---
arch/x86/include/asm/switch_to.h | 25 +
arch/x86/kernel/process_64.c | 29 ++---
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm
it would be nice to remove the duplicated code and (IMHO) it
makes __switch_to easier to read.
> Joe Damato wrote:
>
>>Signed-off-by: Joe Damato
>>---
>> arch/x86/include/asm/switch_to.h | 30 ++
>> arch/x86/kernel/process_64.c | 29
On Thu, Jul 25, 2024 at 09:31:01AM +0800, Cindy Lu wrote:
> Add support for setting the MAC address using the VDPA tool.
> This feature will allow setting the MAC address using the VDPA tool.
> For example, in vdpa_sim_net, the implementation sets the MAC address
> to the config space. However, for
On Thu, Jul 25, 2024 at 09:31:02AM +0800, Cindy Lu wrote:
[...]
> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
> index 8d391947eb8d..532cf3b52b26 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -1361,6 +1361,81 @@ static int vdpa_nl_cmd_dev_config_get_doit(struct
> sk
On Thu, Jul 25, 2024 at 09:31:04AM +0800, Cindy Lu wrote:
> Add the function to support setting the MAC address.
> For vdpa/mlx5, the function will use mlx5_mpfs_add_mac
> to set the mac address
>
> Tested in ConnectX-6 Dx device
>
> Signed-off-by: Cindy Lu
> ---
> drivers/vdpa/mlx5/net/mlx5_vn
> 1 file changed, 38 insertions(+), 2 deletions(-)
Reviewed-by: Joe Damato
On Mon, Nov 04, 2024 at 10:14:30AM -0800, Stanislav Fomichev wrote:
> Only RX side for now and small message to test the setup.
> In the future, we can extend it to TX side and to testing
> both sides with a couple of megs of data.
>
> make \
> -C tools/testing/selftests \
> TARGETS=
On Mon, Nov 04, 2024 at 10:14:28AM -0800, Stanislav Fomichev wrote:
> This will be used as a 'probe' mode in the selftest to check whether
> the device supports the devmem or not. Use hard-coded queue layout
> (two last queues) and prevent user from passing custom -q and/or -t.
>
> Reviewed-by: Mi
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
---
v5:
- Updated commit message to replace netcat with socat and fixed
misspelling of netdevsim. No functional/code changes.
v4:
- Updated busy_poll_te
s/net/ncdevmem.c | 61 +-
> 1 file changed, 30 insertions(+), 31 deletions(-)
Reviewed-by: Joe Damato
1 file changed, 119 insertions(+), 84 deletions(-)
Reviewed-by: Joe Damato
setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &opt,
>sizeof(opt));
> if (ret)
> - error(errno, errno, "%s: [FAIL, set sock opt]\n", TEST_PREFIX);
> + error(1, errno, "%s: [FAIL, set sock opt]\n", TEST_PREFIX);
A minor nit (definitely not worth re-sending for this on its own):
it might be helpful to add which of the sockopts failed to the error
message REUSEADDR or REUSEPORT.
Reviewed-by: Joe Damato
; tools/testing/selftests/net/ncdevmem.c | 12 +---
> 1 file changed, 9 insertions(+), 3 deletions(-)
Reviewed-by: Joe Damato
s/net/ncdevmem.c | 99 ++
> 1 file changed, 71 insertions(+), 28 deletions(-)
Reviewed-by: Joe Damato
testing/selftests/net/ncdevmem.c | 19 ---
> 1 file changed, 12 insertions(+), 7 deletions(-)
Reviewed-by: Joe Damato
nt
> and cleanup the client invocation a bit to make more readable.
>
> Reviewed-by: Mina Almasry
> Signed-off-by: Stanislav Fomichev
> ---
> tools/testing/selftests/net/ncdevmem.c | 61 --
> 1 file changed, 39 insertions(+), 22 deletions(-)
Reviewed-by: Joe Damato
ools/testing/selftests/net/ncdevmem.c | 57 +-
> 2 files changed, 56 insertions(+), 3 deletions(-)
Reviewed-by: Joe Damato
On Mon, Nov 04, 2024 at 07:50:21PM -0800, Stanislav Fomichev wrote:
> On 11/04, Joe Damato wrote:
> > Add an epoll busy poll test using netdevsim.
> >
> > This test is comprised of:
> > - busy_poller (via busy_poller.c)
> > - busy_poll_test.sh which loads netd
gt; + }
> +
> virtnet_set_queues(vi, vi->curr_queue_pairs);
>
> /* a random MAC address has been assigned, notify the device.
Acked-by: Joe Damato
;
> + err = -EINVAL;
> + goto free;
> + }
I agree that an out of bounds error could occur and a check here
is needed.
I have no idea if returning -EINVAL from probe is the correct
solution (vs say using min()) as I am just a casual observer of
virtio_net and not a maintainer.
Acked-by: Joe Damato
)
> + goto free;
>
> if (vi->has_rss || vi->has_rss_hash_report) {
> vi->rss_key_size =
> @@ -6674,6 +6701,8 @@ static void virtnet_remove(struct virtio_device *vdev)
>
> remove_vq_common(vi);
>
> + rss_indirection_table_free(&vi->rss);
> +
> free_netdev(vi->dev);
> }
>
I'm not an expert on virtio, so I don't feel comfortable giving a
Reviewed-by, but this does seem to fix a potential out of bounds
access in virtnet_init_default_rss if rss_indir_table_size were
larger than VIRTIO_NET_RSS_MAX_TABLE_LEN (128).
Acked-by: Joe Damato
On Mon, Nov 04, 2024 at 04:57:06PM +0800, Philo Lu wrote:
> RSS configuration should be updated with queue number. In particular, it
> should be updated when (1) rss enabled and (2) default rss configuration
> is used without user modification.
>
> During rss command processing, device updates que
On Fri, Nov 01, 2024 at 06:34:26AM -0700, Jakub Kicinski wrote:
> On Fri, 1 Nov 2024 00:48:33 +0000 Joe Damato wrote:
> > + ip netns exec nscl nc -N 192.168.1.1 48675 < $tmp_file
>
> Thanks a lot for adding the test.
Thanks for the review.
> Could you replace nc with
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
---
v4:
- Updated busy_poll_test.sh:
- use socat instead of nc
- drop cli.py usage from the script
- removed check_ynl
- Updated busy_poller.c:
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
---
v5:
- Updated commit message to replace netcat with socat and fixed
misspelling of netdevsim. No functional/code changes.
v4:
- Updated busy_poll_te
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
---
v3:
- New in v3
tools/testing/selftests/net/.gitignore| 1 +
tools/testing/selftests/net/Makefile | 2 +
tools/testing/selftests/net/busy_poll_te
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
Acked-by: Stanislav Fomichev
---
v9:
- Based on feedback from Willem, in busy_poll_test.sh:
- shortened long lines,
- used more reader friendly variable
On Fri, Nov 08, 2024 at 12:47:16PM -0500, Willem de Bruijn wrote:
> Joe Damato wrote:
> > On Fri, Nov 08, 2024 at 09:57:48AM -0500, Willem de Bruijn wrote:
> > > Joe Damato wrote:
[...]
> > >
> > > Nice test.
> > >
> > > Busy polling do
On Fri, Nov 08, 2024 at 09:57:48AM -0500, Willem de Bruijn wrote:
> Joe Damato wrote:
[...]
> > diff --git a/tools/testing/selftests/net/busy_poller.c
> > b/tools/testing/selftests/net/busy_poller.c
> > new file mode 100644
> > index ..8d8aa9e5939a
> &
On Fri, Nov 08, 2024 at 12:47:16PM -0500, Willem de Bruijn wrote:
> Joe Damato wrote:
> > On Fri, Nov 08, 2024 at 09:57:48AM -0500, Willem de Bruijn wrote:
> > > Joe Damato wrote:
> > > > Add an epoll busy poll test using netdevsim.
> > &g
On Fri, Nov 08, 2024 at 09:57:48AM -0500, Willem de Bruijn wrote:
> Joe Damato wrote:
> > Add an epoll busy poll test using netdevsim.
> >
> > This test is comprised of:
> > - busy_poller (via busy_poller.c)
> > - busy_poll_test.sh which loads netd
gt;
> Reviewed-by: Mina Almasry
> Signed-off-by: Stanislav Fomichev
> ---
> .../testing/selftests/drivers/net/hw/Makefile | 1 +
> .../selftests/drivers/net/hw/devmem.py| 45 +++
> 2 files changed, 46 insertions(+)
> create mode 100755 tools/testing/selftests/drivers/net/hw/devmem.py
I'm not a python expert, but the changes make sense to me.
Reviewed-by: Joe Damato
On Thu, Nov 07, 2024 at 10:11:59AM -0800, Stanislav Fomichev wrote:
> The goal of the series is to simplify and make it possible to use
> ncdevmem in an automated way from the ksft python wrapper.
>
> ncdevmem is slowly mutated into a state where it uses stdout
> to print the payload and the pytho
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
Acked-by: Stanislav Fomichev
---
v5:
- Updated commit message to replace netcat with socat and fixed
misspelling of netdevsim. No functional/code changes.
(like defer_hard_irqs)
and suspend.
Signed-off-by: Joe Damato
Co-developed-by: Martin Karsten
Signed-off-by: Martin Karsten
Acked-by: Stanislav Fomichev
---
v5:
- Updated commit message to replace netcat with socat and fixed
misspelling of netdevsim. No functional/code changes.
Fix various integer type conversions by using strtoull and a temporary
variable which is bounds checked before being casted into the
appropriate cfg_* variable for use by the test program.
While here, free the strdup'd cfg string for overall hygenie.
Signed-off-by: Joe Damato
---
tools/te
On Mon, Dec 02, 2024 at 09:14:58PM -0800, Stanislav Fomichev wrote:
> On 12/03, Joe Damato wrote:
> > Fix various integer type conversions by using strtoull and a temporary
> > variable which is bounds checked before being casted into the
> > appropriate cfg_* variable for us
On Tue, Dec 03, 2024 at 08:26:11AM -0800, Joe Damato wrote:
> On Mon, Dec 02, 2024 at 09:14:58PM -0800, Stanislav Fomichev wrote:
> > On 12/03, Joe Damato wrote:
> > > Fix various integer type conversions by using strtoull and a temporary
> > > variable which is bounds
queue to avoid warnings on some
compilers.
Signed-off-by: Joe Damato
---
v2:
- initialize napi_id to 0 in setup_queue to avoid clang warning as
suggested by Stanislav. Tested with clang 10.0.0 and 18.1.8
tools/testing/selftests/net/busy_poller.c | 88 +--
1
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v2:
- Updated the Python test after changes to patch 1 which
ty nest as suggested by Jakub
- Adjusted patch 2 to update the test based on changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (2):
netdev-genl: Add an XSK attribute
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v3:
- Change comment style of helper C program to avoid kdoc
changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (2):
netdev-genl: Add an XSK attribute to queues
selftests: drv-net: Test queue xsk attribute
Documentation/netlink/specs/n
ed patch 1 to include an empty nest as suggested by Jakub
- Adjusted patch 2 to update the test based on changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
ne
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v3:
- Change comment style of helper C program to avoid kdoc
update the test based on changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
selftest
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v3:
- Change comment style of helper C program to avoid kdoc
to update the test based on changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
self
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v3:
- Change comment style of helper C program to avoid kdoc
On Tue, Feb 11, 2025 at 12:00:38PM -0800, Stanislav Fomichev wrote:
> On 02/11, Joe Damato wrote:
> > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote:
> > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote:
> > > > On 2/1
On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote:
> On 2/10/25 8:38 PM, Joe Damato wrote:
> > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None:
> > +test_dir = os.path.dirname(os.path.realpath(__file__))
> > +xdp = subprocess.Popen([f"{test_dir
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
selftests: drv-net: Test queue xsk attribute
Documentation/netlink/specs/netdev.yaml
On Tue, Feb 11, 2025 at 06:37:06PM -0800, Jakub Kicinski wrote:
> On Tue, 11 Feb 2025 15:10:52 -0800 Stanislav Fomichev wrote:
> > > I can't comment on NIPA because I have no idea how it works. Maybe
> > > there is a kernel with some options enabled and other kernels with
> > > various options disa
On Wed, Jan 29, 2025 at 06:07:51PM -0800, Jakub Kicinski wrote:
> On Wed, 29 Jan 2025 17:24:25 +0000 Joe Damato wrote:
> > Test that queues which are used for AF_XDP have the xsk attribute set.
>
> > diff --git a/tools/testing/selftests/drivers/.gitignore
> > b/tools/t
On Wed, Jan 22, 2025 at 02:12:46PM +0800, Jason Wang wrote:
> On Wed, Jan 22, 2025 at 3:11 AM Joe Damato wrote:
> >
> > Slight refactor to prepare the code for NAPI to queue mapping. No
> > functional changes.
> >
> > Signed-off-by: Joe Damato
> > Revie
On Thu, Jan 23, 2025 at 10:40:43AM +0800, Jason Wang wrote:
> On Thu, Jan 23, 2025 at 1:41 AM Joe Damato wrote:
> >
> > On Wed, Jan 22, 2025 at 02:12:46PM +0800, Jason Wang wrote:
> > > On Wed, Jan 22, 2025 at 3:11 AM Joe Damato wrote:
> > > >
> > > &
On Fri, Jan 24, 2025 at 09:14:54AM +0800, Jason Wang wrote:
> On Thu, Jan 23, 2025 at 10:47 AM Joe Damato wrote:
> >
> > On Thu, Jan 23, 2025 at 10:40:43AM +0800, Jason Wang wrote:
> > > On Thu, Jan 23, 2025 at 1:41 AM Joe Damato wrote:
> > > >
> > &g
On Sun, Jan 26, 2025 at 04:04:02PM +0800, Jason Wang wrote:
> On Sat, Jan 25, 2025 at 4:19 AM Joe Damato wrote:
> >
> > On Fri, Jan 24, 2025 at 09:14:54AM +0800, Jason Wang wrote:
> > > On Thu, Jan 23, 2025 at 10:47 AM Joe Damato wrote:
> > > >
> > &g
On Mon, Jan 27, 2025 at 12:52:06PM -0500, Joe Damato wrote:
> On Sun, Jan 26, 2025 at 04:04:02PM +0800, Jason Wang wrote:
> > On Sat, Jan 25, 2025 at 4:19 AM Joe Damato wrote:
> > >
> > > On Fri, Jan 24, 2025 at 09:14:54AM +0800, Jason Wang wrote:
> > > &g
On Mon, Jan 27, 2025 at 01:33:04PM -0800, Jakub Kicinski wrote:
> On Mon, 27 Jan 2025 14:31:21 -0500 Joe Damato wrote:
> > Actually, I missed a patch Jakub submit to net [1], which prevents
> > dumping TX-only NAPIs.
>
> That patch only addresses NAPI ops, here I thin
On Mon, Jan 27, 2025 at 02:24:00PM -0800, Jakub Kicinski wrote:
> On Mon, 27 Jan 2025 17:07:54 -0500 Joe Damato wrote:
> > > Tx NAPIs are one aspect, whether they have ID or not we may want direct
> > > access to the struct somewhere in the core, via txq, at some point, and
On Thu, Jan 16, 2025 at 09:28:07PM +0100, Gerhard Engleder wrote:
> On 16.01.25 17:09, Joe Damato wrote:
> > On Thu, Jan 16, 2025 at 03:53:14PM +0800, Xuan Zhuo wrote:
> > > On Thu, 16 Jan 2025 05:52:58 +, Joe Damato wrote:
> > > > Use netif_queue_set_napi to
ndex': 2, 'napi-id': 8291, 'type': 'rx'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{'id': 1, 'ifindex':
'ifindex': 2, 'type': 'tx'}]
$ sudo ethtool -L ens4 combined 8
$ ./tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/netdev.yaml \
--dump queue-get --json='{"ifindex": 2}'
[{'id': 0, 'ifindex': 2,
Slight refactor to prepare the code for NAPI to queue mapping. No
functional changes.
Signed-off-by: Joe Damato
Reviewed-by: Gerhard Engleder
Tested-by: Lei Yang
---
v2:
- Previously patch 1 in the v1.
- Added Reviewed-by and Tested-by tags to commit message. No
functional changes
re details.
Jakub Kicinski (1):
net: protect queue -> napi linking with netdev_lock()
Joe Damato (3):
virtio_net: Prepare for NAPI to queue mapping
virtio_net: Map NAPIs to queues
virtio_net: Use persistent NAPI config
drivers/net/virtio_net.c | 38 +++--
On Mon, Jan 20, 2025 at 09:58:13AM +0800, Jason Wang wrote:
> On Thu, Jan 16, 2025 at 3:57 PM Xuan Zhuo wrote:
> >
> > On Thu, 16 Jan 2025 05:52:58 +0000, Joe Damato wrote:
> > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> >
On Wed, Jan 29, 2025 at 05:24:23PM +, Joe Damato wrote:
> Greetings:
>
> This is an attempt to followup on something Jakub asked me about [1],
> adding an xsk attribute to queues and more clearly documenting which
> queues are linked to NAPIs...
>
> But:
>
> 1. I
Test that queues which are used for AF_XDP have the xsk attribute set.
Signed-off-by: Joe Damato
---
tools/testing/selftests/drivers/.gitignore| 1 +
tools/testing/selftests/drivers/net/Makefile | 3 +
tools/testing/selftests/drivers/net/queues.py | 32 ++-
.../selftests/drivers/net
s better ways to do things.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250113143109.60afa...@kernel.org/
Joe Damato (2):
netdev-genl: Add an XSK attribute to queues
selftests: drv-net: Test queue xsk attribute
Documentation/netlink/specs/netdev.yaml | 10 ++-
include/uapi/li
On Mon, Jan 13, 2025 at 02:04:46PM -0800, Jakub Kicinski wrote:
> On Mon, 13 Jan 2025 09:30:20 -0800 Joe Damato wrote:
> > > > static void virtnet_napi_enable_lock(struct virtqueue *vq,
> > > > -
On Mon, Jan 13, 2025 at 12:05:51PM +0800, Jason Wang wrote:
> On Sat, Jan 11, 2025 at 4:26 AM Joe Damato wrote:
> >
> > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> > can be accessed by user apps.
> >
> > $ ethtool -i ens4 | g
Tested-by from patch 3.
- patch 4:
- New in v2. Adds persistent NAPI configuration. See commit message
for more details.
Jakub Kicinski (1):
net: protect queue -> napi linking with netdev_lock()
Joe Damato (3):
virtio_net: Prepare for NAPI to queue mapping
virtio_net: Map NAPIs
'ifindex': 2, 'type': 'tx'}]
$ sudo ethtool -L ens4 combined 8
$ ./tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/netdev.yaml \
--dump queue-get --json='{"ifindex": 2}'
[{'id': 0, 'ifindex': 2, 'napi-id
Slight refactor to prepare the code for NAPI to queue mapping. No
functional changes.
Signed-off-by: Joe Damato
Reviewed-by: Gerhard Engleder
Tested-by: Lei Yang
---
v2:
- Previously patch 1 in the v1.
- Added Reviewed-by and Tested-by tags to commit message. No
functional changes
ndex': 2, 'napi-id': 8291, 'type': 'rx'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{'id': 1, 'ifindex':
On Thu, Jan 16, 2025 at 03:53:14PM +0800, Xuan Zhuo wrote:
> On Thu, 16 Jan 2025 05:52:58 +0000, Joe Damato wrote:
> > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> > can be accessed by user apps.
> >
> > $ ethtool -i ens4 | grep dr
Prepare for NAPI to queue mapping by holding RTNL in code paths where
NAPIs will be mapped to queue IDs and RTNL is not currently held.
Signed-off-by: Joe Damato
---
drivers/net/virtio_net.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net
ndex': 2, 'napi-id': 8291, 'type': 'rx'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{'id': 1, 'ifindex': 2
Joe
[1]: https://lore.kernel.org/netdev/20250109084301.2445a...@kernel.org/
Joe Damato (3):
virtio_net: Prepare for NAPI to queue mapping
virtio_net: Hold RTNL for NAPI to queue mapping
virtio_net: Map NAPIs to queues
drivers/net/virtio_net.c | 48
1 f
Slight refactor to prepare the code for NAPI to queue mapping. No
functional changes.
Signed-off-by: Joe Damato
---
drivers/net/virtio_net.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7646ddd9bef7
s to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
selftests: drv-net: Test queue xsk
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
e the test based on changes to patch 1, and
to incorporate some Python feedback from Jakub :)
rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
selftests: drv
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote:
> On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote:
> > On 2/10/25 8:38 PM, Joe Damato wrote:
> > > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None:
> > > +test_dir = os.path.dir
re details.
v1: https://lore.kernel.org/netdev/20250110202605.429475-1-jdam...@fastly.com/
[1]: https://lore.kernel.org/netdev/20250221142650.3c74d...@kernel.org/
[2]: https://lore.kernel.org/netdev/20250127142400.24eca...@kernel.org/
Joe Damato (4):
virtio-net: Refactor napi_enable paths
Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct
receive_queue. Create a helper, virtnet_napi_do_enable, which contains
the logic to enable a NAPI.
Signed-off-by: Joe Damato
---
drivers/net/virtio_net.c | 37 +
1 file changed, 21
{'id': 2, 'ifindex': 2, 'napi-id': 8291, 'type': 'rx'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable
to take a struct send_queue.
Signed-off-by: Joe Damato
---
drivers/net/virtio_net.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net
'ifindex': 2, 'type': 'tx'}]
$ sudo ethtool -L ens4 combined 8
$ ./tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/netdev.yaml \
--dump queue-get --json='{"ifindex": 2}'
[{'id': 0, 'ifindex': 2, &
On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote:
> On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote:
> > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote:
> > >
> > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> &g
On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote:
> On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote:
> >
> > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> > can be accessed by user apps, taking care to hold RTNL as needed.
>
>
es successfully on tg3 and mlx5
(which does have a 'combined-count').
Fixes: 1cf270424218 ("net: selftest: add test for netdev netlink queue-get API")
Signed-off-by: Joe Damato
---
v2:
- Simplify logic and reduce indentation as suggested by David Wei.
Retested on b
On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote:
> On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote:
> > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote:
> > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote:
> > > >
> > >
On Tue, Feb 25, 2025 at 03:11:24PM -0800, David Wei wrote:
> On 2025-02-25 10:14, Joe Damato wrote:
[...]
> > diff --git a/tools/testing/selftests/drivers/net/queues.py
> > b/tools/testing/selftests/drivers/net/queues.py
> > index 38303da957ee..baa8845d9f64 100755
&g
es successfully on tg3 and mlx5
(which does have a 'combined-count').
Fixes: 1cf270424218 ("net: selftest: add test for netdev netlink queue-get API")
Signed-off-by: Joe Damato
---
tools/testing/selftests/drivers/net/queues.py | 9 ++---
1 file changed, 6 insertions(+), 3
On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote:
> On Thu, 27 Feb 2025 18:50:13 +0000 Joe Damato wrote:
> > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work)
> > for (i = 0; i < vi->curr_queue_pairs; i++) {
> > str
1 - 100 of 138 matches
Mail list logo