gt; multiple dropped packets at once, such as when dropping entire queues.
>
> Signed-off-by: Breno Leitao
> ---
> include/linux/netdevice.h | 10 ++
> 1 file changed, 10 insertions(+)
>
Reviewed-by: Joe Damato
he
> TX path.
>
> Signed-off-by: Breno Leitao
> ---
> drivers/net/netdevsim/netdev.c | 12 ++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
Thanks for moving the RX accounting around.
Reviewed-by: Joe Damato
n reverted.
> - [[ -d "$SRC/.git" ]] && (cd "$SRC" && git update-index -q --refresh)
> }
>
> validate_patches() {
>
Ah yes, even better.
--
Joe
atches() call
- for --help, at the cleanup() -> revert_patches() call
So if you don't like the conditional change above, should
revert_patches() end with `true` to eat the [[ -d "$SRC/.git" ]] status?
Or does that interfere with other calls to that function throughout the
script?
FWIW, with either adjustment, the script seems happy to operate on a
plain ol' kernel source tree without git.
--
Joe
On 6/11/25 3:08 PM, Josh Poimboeuf wrote:
> On Wed, Jun 11, 2025 at 02:44:35PM -0400, Joe Lawrence wrote:
>>> +get_patch_files() {
>>> + local patch="$1"
>>> +
>>> + grep0 -E '^(--- |\+\+\+ )' "
ir/b"
> +
> + # Find all source files affected by the patch
> + grep0 -E '^(--- |\+\+\+ )[^ /]+' "$patch" |
> + sed -E 's/(--- |\+\+\+ )[^ /]+\///' |
> + sort | uniq | mapfile -t files
> +
Should just call `get_patch_files() here?
--
Joe
On 6/9/25 7:21 PM, Josh Poimboeuf wrote:
> On Mon, Jun 09, 2025 at 02:32:19PM -0400, Joe Lawrence wrote:
>> On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
>>> +static int validate_ffunction_fdata_sections(struct elf *elf)
>>> +{
>>> + struct
On Fri, May 09, 2025 at 01:17:23PM -0700, Josh Poimboeuf wrote:
> +revert_patch() {
> + local patch="$1"
> + shift
> + local extra_args=("$@")
> + local tmp=()
> +
> + ( cd "$SRC" && git apply --reverse "${extra_args[@]}" "$patch" )
> + git_refresh "$patch"
> +
> + for p
On Mon, Jun 09, 2025 at 10:05:53PM -0400, Joe Lawrence wrote:
> + # Copy symbol namespace
> + readelf -p .modinfo "$ORIG_DIR/$rel_file" | \
> + gawk -F= '/\ namespaces
Errr, that is $PATCHED_DIR/$rel_file if we want to pic
On Mon, Jun 09, 2025 at 04:59:37PM -0700, Josh Poimboeuf wrote:
> On Mon, Jun 09, 2025 at 05:20:53PM -0400, Joe Lawrence wrote:
> > If you touch sound/soc/sof/intel/, klp-build will error out with:
> >
> > Building patch module: livepatch-unCVE-2024-58012.ko
> &g
ith:
Building patch module: livepatch-unCVE-2024-58012.ko
ERROR: modpost: module livepatch-unCVE-2024-58012 uses symbol hda_dai_config
from namespace SND_SOC_SOF_INTEL_HDA_COMMON, but does not import it.
ERROR: modpost: module livepatch-unCVE-2024-58012 uses symbol
hdac_bus_eml_sdw_map_s
y
[91] .rodata.nft_tunnel_policy
I believe there are others like this, drivers/firmware/iscsi_ibft.o for
one, so even though validate_ffunction_fdata_sections() only needs to
find one .text. and one .data., not all objects may be
able to provide that.
At the same time, while we're here, what about other .text.* section
prefixes?
--
Joe
cp -f "$file" "$patched_file"
> + found=1
> + done
> + xtrace_restore
> +
> + [[ -n "$found" ]] || die "no changes detected"
> +
Minor nit here, I gave it a patch for files that didn't compile and
because because files() was presumably empty:
./scripts/livepatch/klp-build: line 564: found: unbound variable
since found was only declared local, but never set inside the loop.
--
Joe
On 6/6/25 4:28 PM, Josh Poimboeuf wrote:
> On Fri, Jun 06, 2025 at 12:03:45PM -0700, Josh Poimboeuf wrote:
>> On Fri, Jun 06, 2025 at 09:05:59AM -0400, Joe Lawrence wrote:
>>> Should the .cmd file copy come from the reference SRC and not original
>>> ORIG director
files
Fixing patches
Building patched kernel
Copying patched object files
Diffing objects
vmlinux.o: changed function: cmdline_proc_show
Building patch module: livepatch-test.ko
<...>/klp-tmp/kmod/.vmlinux.o.cmd: No such file or directory
make[2]: *** [scripts/Makefile.modpost:145:
<...>/klp-tmp/kmod/Module.symvers] Error 1
make[1]: *** [<...>/Makefile:1936: modpost] Error 2
make: *** [Makefile:236: __sub-make] Error 2
The above edit worked for both your upstream branch and my downstream
backport.
--
Joe
against `.text'+173ecc
* Note: I dropped ("[PATCH v2 45/62] x86/extable: Define ELF section
entry size for exception tables") since it doesn't build as per the
comment I left on that patch.
--
Joe
t; + BUILD_BUG_ON(EXTABLE_SIZE != sizeof(struct exception_table_entry));
> +
but referenced in kernel/ where a non-x86 build like ppc64le build won't
know what EXTABLE_SIZE is :(
--
Joe
if (dest_sym->return_thunk) {
> add_return_call(file, insn, true);
> continue;
> - } else if (func) {
> - /*
> - * External sibling call or internal sibling call with
> - * STT_FUNC reloc.
> - */
> - ret = add_call_dest(file, insn, reloc->sym, true);
> - if (ret)
> - return ret;
> - continue;
> - } else if (reloc->sym->sec->idx) {
> - dest_sec = reloc->sym->sec;
> - dest_off = reloc->sym->sym.st_value +
> -arch_dest_reloc_offset(reloc_addend(reloc));
Way back in ("[PATCH v2 18/62] objtool: Fix x86 addend calculation"),
arch_dest_reloc_offset() was replaced with arch_insn_adjusted_addend(),
so I think that patch missed this callsite and breaks bisectability.
--
Joe
On Thu, Apr 24, 2025 at 06:32:18PM -0700, Jakub Kicinski wrote:
> On Thu, 24 Apr 2025 00:27:32 +0000 Joe Damato wrote:
> > +++ b/tools/testing/selftests/drivers/net/ksft.h
> > +static void ksft_ready(void)
>
> > +static void ksft_wait(void)
>
> These need to be s
Test that the SO_INCOMING_NAPI_ID of a network file descriptor is
non-zero. This ensures that either the core networking stack or, in some
cases like netdevsim, the driver correctly sets the NAPI ID.
Signed-off-by: Joe Damato
---
.../testing/selftests/drivers/net/.gitignore | 1 +
tools
Factor ksft C helpers to a header so they can be used by other C-based
tests.
Signed-off-by: Joe Damato
---
tools/testing/selftests/drivers/net/ksft.h| 56 +++
.../selftests/drivers/net/xdp_helper.c| 49 +---
2 files changed, 58 insertions(+), 47
IDs. The test itself (patch 3)
introduces a C helper because apparently python doesn't have
socket.SO_INCOMING_NAPI_ID.
Thanks,
Joe
v4:
- Updated the macro guard in patch 2
- Removed the remote deploy from patch 3
v3: https://lore.kernel.org/netdev/20250418013719.12094-1-jdam...@f
On Wed, Apr 23, 2025 at 04:16:12PM -0700, Jakub Kicinski wrote:
> On Fri, 18 Apr 2025 01:37:05 +0000 Joe Damato wrote:
> > +bin_remote = cfg.remote.deploy(cfg.test_dir / "napi_id_helper")
> > +listen_cmd = f"{bin_remote} {cfg.addr_v['4']} {p
Test that the SO_INCOMING_NAPI_ID of a network file descriptor is
non-zero. This ensures that either the core networking stack or, in some
cases like netdevsim, the driver correctly sets the NAPI ID.
Signed-off-by: Joe Damato
---
.../testing/selftests/drivers/net/.gitignore | 1 +
tools
Factor ksft C helpers to a header so they can be used by other C-based
tests.
Signed-off-by: Joe Damato
---
tools/testing/selftests/drivers/net/ksft.h| 56 +++
.../selftests/drivers/net/xdp_helper.c| 49 +---
2 files changed, 58 insertions(+), 47
test itself (patch 4)
introduces a C helper because apparently python doesn't have
socket.SO_INCOMING_NAPI_ID.
Thanks,
Joe
v2:
- No longer an RFC
- Minor whitespace change in patch 1 (no functional change).
- Patches 2-4 new in v2
rfcv1: https://lore.kernel.org/netdev/2025032930.39
Test that the SO_INCOMING_NAPI_ID of a network file descriptor is
non-zero. This ensures that either the core networking stack or, in some
cases like netdevsim, the driver correctly sets the NAPI ID.
Signed-off-by: Joe Damato
---
.../testing/selftests/drivers/net/.gitignore | 1 +
tools
Factor ksft C helpers to a header so they can be used by other C-based
tests.
Signed-off-by: Joe Damato
---
tools/testing/selftests/drivers/net/ksft.h| 56 +++
.../selftests/drivers/net/xdp_helper.c| 49 +---
2 files changed, 58 insertions(+), 47
IDs. The test itself (patch 4)
introduces a C helper because apparently python doesn't have
socket.SO_INCOMING_NAPI_ID.
Thanks,
Joe
v3:
- Dropped patch 3 from v2 as it is no longer necessary.
- Patch 3 from this series (which was patch 4 in the v2)
- Sorted .gitignore alphabetically
On Thu, Apr 17, 2025 at 09:53:10AM -0700, Jakub Kicinski wrote:
> On Thu, 17 Apr 2025 09:43:23 -0700 Joe Damato wrote:
> > I think the main outstanding thing is Paolo's feedback which maybe
> > (?) is due to a Python version difference? If you have any guidance
> > on h
On Thu, Apr 17, 2025 at 06:46:15AM -0700, Jakub Kicinski wrote:
> On Thu, 17 Apr 2025 01:32:42 +0000 Joe Damato wrote:
> > Test that the SO_INCOMING_NAPI_ID of a network file descriptor is
> > non-zero. This ensures that either the core networking stack or, in some
> > case
On Thu, Apr 17, 2025 at 09:26:22AM +0200, Paolo Abeni wrote:
> On 4/17/25 3:32 AM, Joe Damato wrote:
> > diff --git a/tools/testing/selftests/drivers/net/napi_id.py
> > b/tools/testing/selftests/drivers/net/napi_id.py
> > new file mode 100755
> > index ..aee
Extend NetNSEnter to allow custom paths in order to support, for
example, /proc/self/ns/net.
Signed-off-by: Joe Damato
---
tools/testing/selftests/net/lib/py/netns.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/lib/py/netns.py
b/tools
On Fri, Mar 21, 2025 at 09:36:34AM -0700, Joe Damato wrote:
> On Fri, Mar 21, 2025 at 05:14:59AM -0600, Jens Axboe wrote:
> > On 3/20/25 11:56 PM, Christoph Hellwig wrote:
> > >> I don't know the entire historical context, but I presume sendmsg
> > >> did tha
On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> happened had I t
On Tue, 2025-04-01 at 21:23 -0700, Paul E. McKenney wrote:
> On Tue, Apr 01, 2025 at 08:48:44PM -0700, Joe Perches wrote:
> > On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> > > On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > > > On
On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
>
> https://lore.kernel.org/r/20250318-ftrace-sftest-livepatch-v2-0-60cb0aa95...@gmail.com
>
For both patches:
Acked-by: Joe Lawrence
Thanks,
-- Joe
quot;selftests: livepatch: rename
KLP_SYSFS_DIR to SYSFS_KLP_DIR") tweaked the functions.sh::SYSFS_KLP_DIR
and then updated all of the test-*.sh scripts to use the variable
instead of the spelled out "/sys/kernel/livepatch" string.
So if there if there is another patchset version,
s/\/sys\/kernel\/livepatch/$SYSFS_KLP_DIR/g
-- Joe
from certain whether which order is better than the
other. The only reason for bringing it up is that shellcheck warns on
this patch's usage.
[1] https://www.shellcheck.net/
-- Joe
ot;$SYSFS_TRACING_DIR/tracing_on"
> +}
> +
> +# check_traced_functions(functions...) - check whether each function
> appeared in the trace log
> +#functions - list of functions to be checked
> +function check_traced_functions() {
> + local function
> +
> + for function in "$@"; do
> + if ! grep -q "$function" "$SYSFS_TRACING_DIR/trace" ; then
Small suggestion here: grep on "$function" may find partial string
matches, like:
$ echo 'hamburger' | grep 'ham'
hamburger
so it's probably safer to user --word-regexp to avoid longer function
names inadvertently matching:
$ echo 'hamburger' | grep -w 'ham'
$ echo 'ham' | grep -w 'ham'
ham
Also, maybe also --fixed-strings for the extra paranoid? Off the top of
my head, I don't think any C function characters are special regex (like
$ ^ [ ] etc.) so it's probably safe w/o.
-- Joe
On Fri, Mar 21, 2025 at 02:33:16PM -0600, Jens Axboe wrote:
> On 3/21/25 2:30 PM, Joe Damato wrote:
> > On Fri, Mar 21, 2025 at 09:36:34AM -0700, Joe Damato wrote:
> >> On Fri, Mar 21, 2025 at 05:14:59AM -0600, Jens Axboe wrote:
> >>> On 3/20/25 11:56 PM, Christoph
On Thu, Mar 20, 2025 at 10:56:15PM -0700, Christoph Hellwig wrote:
> On Thu, Mar 20, 2025 at 11:23:57AM -0700, Joe Damato wrote:
> > In my other message to Jens I proposed:
> > - SPLICE_F_ZC for splice to generate zc completion notifications
> > to the error queue
>
osed and extending sendfile based on the SO_ZEROCOPY
sock flag being set are both unacceptable solutions.
If you happen to have a suggestion of some piece of code that I
should read (other than the iouring implementation) to inform how I
might build an RFCv2, I would appreciate the pointer.
Thanks for your time and energy,
Joe
On Wed, Mar 19, 2025 at 10:57:29PM -0700, Christoph Hellwig wrote:
> On Wed, Mar 19, 2025 at 10:45:22AM -0700, Joe Damato wrote:
> > I don't disagree; I just don't know if app developers:
> > a.) know that this is possible to do, and
> > b.) know how to do it
>
On Wed, Mar 19, 2025 at 10:50:18PM -0700, Christoph Hellwig wrote:
> On Wed, Mar 19, 2025 at 08:32:19AM -0700, Joe Damato wrote:
> > See the docs on MSG_ZEROCOPY [1], but in short when a user app calls
> > sendmsg and passes MSG_ZEROCOPY a completion notification is added
> &g
On Wed, Mar 19, 2025 at 10:07:27AM -0600, Jens Axboe wrote:
> On 3/19/25 9:32 AM, Joe Damato wrote:
> > On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote:
> >> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote:
> >>> One way to fix this is to
On Wed, Mar 19, 2025 at 10:07:27AM -0600, Jens Axboe wrote:
> On 3/19/25 9:32 AM, Joe Damato wrote:
> > On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote:
> >> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote:
> >>> One way to fix this is to
On Wed, Mar 19, 2025 at 12:37:29PM -0600, Jens Axboe wrote:
> On 3/19/25 11:45 AM, Joe Damato wrote:
> > On Wed, Mar 19, 2025 at 11:20:50AM -0600, Jens Axboe wrote:
> >> On 3/19/25 11:04 AM, Joe Damato wrote:
> >>> On Wed, Mar 19, 2025 at 10:07:27AM -0600, Jens Axboe
On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote:
> On Wed, Mar 19, 2025 at 12:15:11AM +0000, Joe Damato wrote:
> > One way to fix this is to add zerocopy notifications to sendfile similar
> > to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to th
On Wed, Mar 19, 2025 at 11:20:50AM -0600, Jens Axboe wrote:
> On 3/19/25 11:04 AM, Joe Damato wrote:
> > On Wed, Mar 19, 2025 at 10:07:27AM -0600, Jens Axboe wrote:
> >> On 3/19/25 9:32 AM, Joe Damato wrote:
> >>> On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christop
splice_socket becomes a wrapper around splice_socket_generic which takes
a ubuf pointer to prepare for zerocopy notifications.
Signed-off-by: Joe Damato
---
fs/splice.c | 40 +---
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git a/fs/splice.c b
Add the SPLICE_F_ZC flag and when it is set, allocate a ubuf and attach
it to generate zerocopy notifications.
Signed-off-by: Joe Damato
---
fs/splice.c| 20
include/linux/splice.h | 3 ++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/fs
Update struct splice_desc to include ubuf_info to prepare splice for
zero copy notifications.
Signed-off-by: Joe Damato
---
include/linux/splice.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 9dec4861d09f..7477df3916e2 100644
--- a
Introduce splice_write_sd to file operations and export a new helper for
sockets splice_to_socket_sd to pass through the splice_desc context
allowing the allocated ubuf to be attached.
Signed-off-by: Joe Damato
---
fs/splice.c| 22 ++
include/linux/fs.h | 2
Extend the existing the msg_zerocopy test to allow testing sendfile to
ensure that notifications are generated.
Signed-off-by: Joe Damato
---
tools/testing/selftests/net/msg_zerocopy.c | 54 -
tools/testing/selftests/net/msg_zerocopy.sh | 5 ++
2 files changed, 58
Add a default flag (SENDFILE_DEFAULT) and a flag for requesting zerocopy
notifications (SENDFILE_ZC). do_sendfile is updated to pass through the
corresponding splice flag to enable zerocopy notifications.
Signed-off-by: Joe Damato
---
fs/read_write.c | 5 +
include/linux
The sendfile2 system call is similar to sendfile64, but takes a flags
argument allowing the user to select either a default sendfile or for
sendfile to generate zerocopy notifications similar to MSG_ZEROCOPY and
sendmsg.
Signed-off-by: Joe Damato
---
arch/alpha/kernel/syscalls/syscall.tbl
Add sendfile2 which is similar to sendfile64, but takes a flags
argument.
Signed-off-by: Joe Damato
---
fs/read_write.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/fs/read_write.c b/fs/read_write.c
index 03d2a93c3d1b..057e5f37645d 100644
--- a/fs/read_write.c
+++ b/fs
Extend the internal do_sendfile to take a flags argument, which will be
used in future commits to signal that userland wants zerocopy
notifications.
This commit does not change anything about sendfile or sendfile64.
Signed-off-by: Joe Damato
---
fs/read_write.c | 18 +-
1 file
Add do_splice_from_sd which takes splice_desc as an argument. This
helper is just a wrapper around splice_write but will be extended. Use
the helper from existing splice code.
Signed-off-by: Joe Damato
---
fs/splice.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff
dback. I based my
code on the vfs/for-next tree, but am happy to rebase on another tree if
desired. The cc-list got a little out of control, so I manually trimmed
it down quite a bit; sorry if I missed anyone I should have CC'd in the
process.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/
On 3/7/25 07:26, Petr Mladek wrote:
> On Thu 2025-03-06 17:54:41, Joe Lawrence wrote:
>>
>> With that in mind, a livepatch state could be thought of as an
>> indication of "a context needing special handling in a (versioned) way".
>
> I am not sure abou
x'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{'id': 1, 'ifindex': 2, 'type': 'tx'},
{'id': 2,
'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-
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable
to take a struct send_queue.
Signed-off-by: Joe Damato
Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
Tested-by: Lei Yang
---
drivers/net/virtio_net.c | 25 +
1 file changed, 17 insertions
In a perfect world, we could describe livepatching states absent
callbacks and shadow variables. The documentation is a bit circular as
one needs to understand them before fully grasping the purpose of the
states. But to use them, you will first need to understand how to set
them up in the states. :) Maybe there is no better way, but first I
need to correct my understanding.
Thanks,
--
Joe
as been left as suggested by Jakub [5] for future work.
See the commit message of patch 3 for an example of how to get the NAPI
to queue mapping information.
See the commit message of patch 4 for an example of how NAPI IDs are
persistent despite queue count changes.
Thanks,
Joe
[1]: https://lore.ke
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
Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
Tested-by: Lei Yang
---
drivers/net
On Wed, Mar 05, 2025 at 06:21:18PM -0800, Jakub Kicinski wrote:
> On Wed, 5 Mar 2025 17:42:35 -0800 Joe Damato wrote:
> > Two spots that come to mind are:
> > - in virtnet_probe where all the other netdev ops are plumbed
> >through, or
> > - above virtnet_disable_
On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote:
> On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote:
> >
> > How about we don't use the API at all from refill_work?
> >
> > Patch 4 adds consistent NAPI config state and refill_work isn't a
&g
On Wed, Mar 05, 2025 at 01:11:55PM +0800, Jason Wang wrote:
> On Tue, Mar 4, 2025 at 11:09 PM Joe Damato wrote:
> >
> > On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote:
> > > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote:
[...]
> > > Midd
On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote:
> On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote:
> > > > @@ -2880,6 +2880,13 @@ static void refill_work(struct work_struct *work)
> > > > bool still_empty;
> > > > int i;
On Mon, Mar 03, 2025 at 12:00:10PM -0500, Joe Damato wrote:
> On Mon, Mar 03, 2025 at 11:46:10AM -0500, Joe Damato wrote:
> > On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote:
> > > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote:
> > > > @@ -
On Mon, Mar 03, 2025 at 11:46:10AM -0500, Joe Damato wrote:
> On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote:
> > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote:
> > > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work)
> >
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
'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-
, 'napi-id': 8291, 'type': 'rx'},
{'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
{'id': 0, 'ifindex': 2, 'type': 'tx'},
{'id': 1, 'ifindex': 2,
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable
to take a struct send_queue.
Signed-off-by: Joe Damato
Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
Tested-by: Lei Yang
---
drivers/net/virtio_net.c | 25 +
1 file changed, 17 insertions
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
Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
Tested-by: Lei Yang
---
drivers/net
for an example of how to get the NAPI
to queue mapping information.
See the commit message of patch 4 for an example of how NAPI IDs are
persistent despite queue count changes.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250221142650.3c74d...@kernel.org/
[2]: https://lore.ke
On Thu, Feb 27, 2025 at 12:18:33PM +0800, Jason Wang wrote:
> On Thu, Feb 27, 2025 at 6:13 AM Michael S. Tsirkin wrote:
> >
> > On Wed, Feb 26, 2025 at 03:27:42PM -0500, Joe Damato wrote:
> > > On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote:
> > > >
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:
> > > >
> > >
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: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.
>
>
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
'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, &
{'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
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
mit message of patch 4 for an example of how NAPI IDs are
persistent despite queue count changes.
Thanks,
Joe
v4:
- Dropped Jakub's patch (previously patch 1).
- Significant refactor from v3 affecting patches 1-3.
- Patch 4 added tags from Jason and Gerhard.
rfcv3:
https
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
d for AF_XDP do not have the xsk
attribute present.
I've run the included test on:
- my mlx5 machine (via NETIF=)
- without setting NETIF
And the test seems to pass in both cases.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250113143109.60afa...@kernel.org/
[2]: https://lore.kernel.
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
ve run the included test on:
- my mlx5 machine (via NETIF=)
- without setting NETIF
And the test seems to pass in both cases.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250113143109.60afa...@kernel.org/
[2]: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
v7:
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
F
And the test seems to pass in both cases.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250113143109.60afa...@kernel.org/
[2]: https://lore.kernel.org/netdev/20250129172431.65773-1-jdam...@fastly.com/
v7:
- Added CONFIG_XDP_SOCKETS to selftests/driver/net/config as suggested
by
t; > I'd keep your test as is (fail hard if XSK is not there), but
> > let's see if Paolo/Jakub have any other suggestions.
>
> No strong preference. Stan is right that validating the environment
> is definitely a non-goal for the upstream tests. But if you already
> added and tested the checks Joe you can keep them, up to you.
OK. I guess I'll just leave them? They are as described earlier in
the thread.
1 - 100 of 6927 matches
Mail list logo