Re: [RFC net-next 2/2] selftests: drv-net: Test queue xsk attribute

2025-01-30 Thread Joe Damato
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

Re: [RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues

2025-01-29 Thread Joe Damato
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

[RFC net-next 2/2] selftests: drv-net: Test queue xsk attribute

2025-01-29 Thread Joe Damato
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

[RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues

2025-01-29 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-27 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-27 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-27 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-27 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-24 Thread Joe Damato
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

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-22 Thread Joe Damato
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: > > > > > > > &

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-22 Thread Joe Damato
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

[RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-21 Thread Joe Damato
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

[RFC net-next v3 0/4] virtio_net: Link queues to NAPIs

2025-01-21 Thread Joe Damato
now have their NAPIs linked. 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.kernel.org/netdev/20250

[RFC net-next v3 4/4] virtio_net: Use persistent NAPI config

2025-01-21 Thread Joe Damato
'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, 

[RFC net-next v3 3/4] virtio_net: Map NAPIs to queues

2025-01-21 Thread Joe Damato
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':

Re: [PATCH net-next v2 3/4] virtio_net: Map NAPIs to queues

2025-01-21 Thread Joe Damato
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

Re: [PATCH net-next v2 3/4] virtio_net: Map NAPIs to queues

2025-01-21 Thread Joe Damato
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 +, Joe Damato wrote: > > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > >

Re: [PATCH net-next v2 3/4] virtio_net: Map NAPIs to queues

2025-01-16 Thread Joe Damato
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

[PATCH net-next v2 4/4] virtio_net: Use persistent NAPI config

2025-01-15 Thread Joe Damato
'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

[PATCH net-next v2 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-15 Thread Joe Damato
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

[PATCH net-next v2 3/4] virtio_net: Map NAPIs to queues

2025-01-15 Thread Joe Damato
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':

[PATCH net-next v2 0/4] virtio_net: Link queues to NAPIs

2025-01-15 Thread Joe Damato
are persistent despite queue count changes. Thanks, Joe [1]: https://lore.kernel.org/netdev/20250109084301.2445a...@kernel.org/ v2: - patch 1: - New in the v2 from Jakub. - patch 2: - Previously patch 1, unchanged from v1. - Added Gerhard Engleder's Reviewed-by. - Added

Re: [PATCH v2] selftests: livepatch: test if ftrace can trace a livepatched function

2025-01-15 Thread Joe Lawrence
T: trace livepatched function and check that the live patch > remains in effect ... ok > ok 5 selftests: livepatch: test-ftrace.sh > ... > > I checked and this would be the only one test without using > check_result, so maybe we should add this either way? I'm not sure what > you guys think about it. > > > diff --git a/tools/testing/selftests/livepatch/test-ftrace.sh > b/tools/testing/selftests/livepatch/test-ftrace.sh > index 66af5d726c52..135c0fb17a98 100755 > --- a/tools/testing/selftests/livepatch/test-ftrace.sh > +++ b/tools/testing/selftests/livepatch/test-ftrace.sh > @@ -93,5 +93,18 @@ if [ "$FOUND" -eq 1 ]; then > die "livepatch kselftest(s) failed" > fi > > +check_result "% insmod test_modules/$MOD_LIVEPATCH.ko > +livepatch: enabling patch '$MOD_LIVEPATCH' > +livepatch: '$MOD_LIVEPATCH': initializing patching transition > +livepatch: '$MOD_LIVEPATCH': starting patching transition > +livepatch: '$MOD_LIVEPATCH': completing patching transition > +livepatch: '$MOD_LIVEPATCH': patching complete > +% echo 0 > $SYSFS_KLP_DIR/$MOD_LIVEPATCH/enabled > +livepatch: '$MOD_LIVEPATCH': initializing unpatching transition > +livepatch: '$MOD_LIVEPATCH': starting unpatching transition > +livepatch: '$MOD_LIVEPATCH': completing unpatching transition > +livepatch: '$MOD_LIVEPATCH': unpatching complete > +% rmmod $MOD_LIVEPATCH" > + > Ah good catch, I noticed the newline, too, but didn't notice that the test wasn't using check_result(). For consistency, let's make that change before merging. Thanks, -- Joe

Re: [PATCH net-next 3/3] virtio_net: Map NAPIs to queues

2025-01-13 Thread Joe Damato
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, > > > > -

Re: [PATCH net-next 3/3] virtio_net: Map NAPIs to queues

2025-01-13 Thread Joe Damato
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

Re: [PATCH] selftests: livepatch: test if ftrace can trace a livepatched function

2025-01-11 Thread Joe Lawrence
On 1/10/25 12:13, Filipe Xavier wrote: > Em 07/01/2025 13:23, Joe Lawrence escreveu: > >> On Thu, Jan 02, 2025 at 03:42:10PM -0300, Filipe Xavier wrote: >>> This new test makes sure that ftrace can trace a >>> function that was introduced by a livepatch. >>>

[PATCH net-next 3/3] virtio_net: Map NAPIs to queues

2025-01-10 Thread Joe Damato
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

[PATCH net-next 2/3] virtio_net: Hold RTNL for NAPI to queue mapping

2025-01-10 Thread Joe Damato
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

[PATCH net-next 1/3] virtio_net: Prepare for NAPI to queue mapping

2025-01-10 Thread Joe Damato
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

[PATCH net-next 0/3] virtio_net: Link queues to NAPIs

2025-01-10 Thread Joe Damato
NL when it seemed that the path was not already holding it. Note: It seems virtio_net uses TX-only NAPIs which do not have NAPI IDs. As such, I've left the TX NAPIs unset (as opposed to setting them to 0). See the commit message of patch 3 for example out to see what I mean. Thanks,

Re: [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis

2025-01-09 Thread Joe Perches
time looking for them, and so readers of checkpatch looking for deprecated > APIs don't waste time searching for them. Acked-by: Joe Perches Maybe remove the references from rcupdateup.h one day too. > > Link: > https://lore.kernel.org/all/2018192904.3199-13-paul...@lin

Re: [PATCH] selftests: livepatch: test if ftrace can trace a livepatched function

2025-01-07 Thread Joe Lawrence
g > +echo "nop" > $SYSFS_DEBUG_DIR/tracing/current_tracer > +echo "" > $SYSFS_DEBUG_DIR/tracing/set_ftrace_filter > +echo "" > $TRACE_FILE > + > +if [ "$FOUND" -eq 1 ]; then > + echo -e "FAIL\n\n" > + die "livepatch kselftest(s) failed" > +fi > + > + > exit 0 > > --- > base-commit: fc033cf25e612e840e545f8d5ad2edd6ba613ed5 > change-id: 20250101-ftrace-selftest-livepatch-161fb77dbed8 > > Best regards, > -- > Filipe Xavier > Thanks, -- Joe

[PATCH net-next v2] selftests: net: cleanup busy_poller.c

2024-12-04 Thread Joe Damato
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

Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-03 Thread Joe Damato
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

Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-03 Thread Joe Damato
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

[PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-02 Thread Joe Damato
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

Re: [PATCH net-next v8 5/6] selftests: net: Add busy_poll_test

2024-11-08 Thread Joe Damato
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

[PATCH net-next v9 5/6] selftests: net: Add busy_poll_test

2024-11-08 Thread Joe Damato
(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

Re: [PATCH net-next v8 5/6] selftests: net: Add busy_poll_test

2024-11-08 Thread Joe Damato
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 > &

Re: [PATCH net-next v8 5/6] selftests: net: Add busy_poll_test

2024-11-08 Thread Joe Damato
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

Re: [PATCH net-next v8 5/6] selftests: net: Add busy_poll_test

2024-11-08 Thread Joe Damato
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

[PATCH net-next v8 5/6] selftests: net: Add busy_poll_test

2024-11-07 Thread Joe Damato
(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.

[PATCH net-next v7 5/6] selftests: net: Add busy_poll_test

2024-11-07 Thread Joe Damato
(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.

Re: [PATCH net-next v8 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-11-07 Thread Joe Damato
payload and the python wrapper is added to > make sure the arrived payload matches the expected one. > > v8: > - move error() calls into enable_reuseaddr() (Joe) > - bail out when number of queues is 1 (Joe) Thanks for all the work on the refactor; sorry for the nit-picking on the queu

Re: [PATCH net-next v8 12/12] selftests: ncdevmem: Add automated test

2024-11-07 Thread Joe Damato
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

Re: [PATCH net 4/4] virtio_net: Update rss when set queue

2024-11-05 Thread 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

Re: [PATCH net 3/4] virtio_net: Sync rss config to device when virtnet_probe

2024-11-05 Thread Joe Damato
gt; + } > + > virtnet_set_queues(vi, vi->curr_queue_pairs); > > /* a random MAC address has been assigned, notify the device. Acked-by: Joe Damato

Re: [PATCH net 2/4] virtio_net: Add hash_key_length check

2024-11-05 Thread 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

Re: [PATCH net 1/4] virtio_net: Support dynamic rss indirection table size

2024-11-05 Thread 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

Re: [PATCH net-next v6 6/7] selftests: net: Add busy_poll_test

2024-11-05 Thread 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

Re: [PATCH net-next v7 12/12] selftests: ncdevmem: Add automated test

2024-11-04 Thread 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=

Re: [PATCH net-next v7 09/12] selftests: ncdevmem: Remove hard-coded queue numbers

2024-11-04 Thread Joe Damato
> 1 file changed, 38 insertions(+), 2 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 10/12] selftests: ncdevmem: Run selftest when none of the -s or -c has been provided

2024-11-04 Thread Joe Damato
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

Re: [PATCH net-next v7 08/12] selftests: ncdevmem: Use YNL to enable TCP header split

2024-11-04 Thread Joe Damato
ools/testing/selftests/net/ncdevmem.c | 57 +- > 2 files changed, 56 insertions(+), 3 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 05/12] selftests: ncdevmem: Remove default arguments

2024-11-04 Thread 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

Re: [PATCH net-next v7 07/12] selftests: ncdevmem: Properly reset flow steering

2024-11-04 Thread Joe Damato
testing/selftests/net/ncdevmem.c | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 06/12] selftests: ncdevmem: Switch to AF_INET6

2024-11-04 Thread Joe Damato
s/net/ncdevmem.c | 99 ++ > 1 file changed, 71 insertions(+), 28 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 04/12] selftests: ncdevmem: Make client_ip optional

2024-11-04 Thread Joe Damato
; tools/testing/selftests/net/ncdevmem.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 03/12] selftests: ncdevmem: Unify error handling

2024-11-04 Thread 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

Re: [PATCH net-next v7 02/12] selftests: ncdevmem: Separate out dmabuf provider

2024-11-04 Thread Joe Damato
1 file changed, 119 insertions(+), 84 deletions(-) Reviewed-by: Joe Damato

Re: [PATCH net-next v7 01/12] selftests: ncdevmem: Redirect all non-payload output to stderr

2024-11-04 Thread Joe Damato
s/net/ncdevmem.c | 61 +- > 1 file changed, 30 insertions(+), 31 deletions(-) Reviewed-by: Joe Damato

[PATCH net-next v6 6/7] selftests: net: Add busy_poll_test

2024-11-04 Thread Joe Damato
(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

[PATCH net-next v5 6/7] selftests: net: Add busy_poll_test

2024-11-02 Thread Joe Damato
(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

[PATCH net-next v4 6/7] selftests: net: Add busy_poll_test

2024-11-01 Thread Joe Damato
(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:

Re: [PATCH net-next v3 6/7] selftests: net: Add busy_poll_test

2024-11-01 Thread Joe Damato
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

[PATCH net-next v3 6/7] selftests: net: Add busy_poll_test

2024-10-31 Thread Joe Damato
(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

Re: [PATCH v5 0/3] selftests: livepatch: test livepatching a kprobed function

2024-10-21 Thread Joe Lawrence
+-- > .../selftests/livepatch/test_modules/Makefile | 3 +- > .../livepatch/test_modules/test_klp_kprobe.c | 38 > 11 files changed, 150 insertions(+), 41 deletions(-) > create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh > create mode 100644 > too

Re: [PATCH v5 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR

2024-10-21 Thread Joe Lawrence
d"/enabled > + log "% echo 0 > $SYSFS_KLP_DIR/$mod/enabled" > + echo 0 > "$SYSFS_KLP_DIR"/mod"/enabled Nit: syntax error here, should be (quotation fix and $mod is a variable): echo 0 > "$SYSFS_KLP_DIR/$mod/enabled" With that, the test works for me. -- Joe

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-13 Thread Joe Lawrence
On Thu, Sep 12, 2024 at 09:44:04AM -0400, Joe Lawrence wrote: > On Wed, Sep 11, 2024 at 12:39:42AM -0700, Josh Poimboeuf wrote: > > On Mon, Sep 02, 2024 at 08:59:43PM -0700, Josh Poimboeuf wrote: > > > Hi, > > > > > > Here's a new way to build livepatch

Re: [PATCH v3 0/6] livepatch: klp-convert tool - Minimal version

2024-09-12 Thread Joe Lawrence
ixed all suggested small changes in v2 > > Previous versions > - > > RFC: > https://lore.kernel.org/r/cover.1477578530.git.jpoim...@redhat.com/ > v2: > https://lore.kernel.org/r/f52d29f7-7d1b-ad3d-050b-a9fa8878f...@redhat.com/ > v3: >

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-12 Thread Joe Lawrence
000 0 NOTYPE GLOBAL DEFAULT UND vmw_recv_msg I don't think the config matters (I used the centos-stream-10 config) as long as the driver builds. I only saw this with a rhel-9 gcc version 11.5.0 20240719 (Red Hat 11.5.0-2) and not fedora gcc version 12.3.1 20230508 (Red Hat 12.3.1-1), which kept vmw_recv_msg w/o constprop. -- Joe

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-07 Thread Joe Lawrence
t to build all the .o's, so disregard that build wrinkle. I almost always build objtool by a top-level `make` or `make tools/objtool`, so sorry for any confusion. -- Joe

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-06 Thread Joe Lawrence
On Fri, Sep 06, 2024 at 10:00:08AM -0700, Josh Poimboeuf wrote: > On Fri, Sep 06, 2024 at 09:56:06AM -0400, Joe Lawrence wrote: > > In the case of klp-diff.c, adding #include will provide the > > memmem prototype. For both files, I needed to #define _GNU_SOURCE for > >

Re: [PATH v6 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-25 Thread Joe Damato
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

Re: [PATH v6 1/3] vdpa: support set mac address from vdpa tool

2024-07-25 Thread Joe Damato
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

Re: [PATH v6 0/3] vdpa: support set mac address from vdpa tool

2024-07-25 Thread Joe Damato
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

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-06 Thread Joe Lawrence
handy. -- Joe

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-04 Thread Joe Lawrence
On Tue, Jun 04, 2024 at 04:14:51PM +0800, zhang warden wrote: > > > > On Jun 1, 2024, at 03:16, Joe Lawrence wrote: > > > > Adding these attributes to livepatch sysfs would be expedient and > > probably easier for us to use, but imposes a recurring burden on us t

Re: [PATCH 0/2] livepatch: Add compiler optimization disclaimer/docs

2024-05-31 Thread Joe Lawrence
On 5/31/24 07:23, Miroslav Benes wrote: > Hi, > > On Tue, 21 Jul 2020, Joe Lawrence wrote: > >> In light of [PATCH] Revert "kbuild: use -flive-patching when >> CONFIG_LIVEPATCH is enabled" [1], we should add some loud disclaimers >> and explanation of t

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-31 Thread Joe Lawrence
ned for this exact purpose. Adding these attributes to livepatch sysfs would be expedient and probably easier for us to use, but imposes a recurring burden on us to maintain and test (where is the documentation and kselftest for this new interface?). Or, we could let the other tools handle all of that for us. Perhaps if someone already has an off-the-shelf script that is using ftrace to monitor livepatched code, it could be donated to Documentation/livepatch/? I can ask our QE folks if they have something like this. Regards, -- Joe

Re: [PATCH v2 2/6] livepatch: Add klp-convert tool

2024-05-30 Thread Joe Lawrence
/list.h, which is a list > implementation. > > Update Makefiles to correctly support the compilation of the new tool, > update MAINTAINERS file and add a .gitignore file. > > [jpoim...@redhat.com: initial version] > Signed-off-by: Josh Poimboeuf > [joe.lawre...@redh

Re: [PATCH v2 2/6] livepatch: Add klp-convert tool

2024-05-29 Thread Joe Lawrence
(rela, tmprela, &sec->relas, list) { > + list_del(&rela->list); > + free(rela); > + } > + list_del(&sec->list); > + free(sec); > + } > + if (elf->fd > 0) > + close(elf->fd); Alexy found another ELF coding bug here: "Techically, it is "fd >= 0"." I had coded fixes for these in a v8-devel that I never finished. It shouldn't be too hard to fix these up in the minimal version of the patchset, but lmk if you'd like a patch. That's all for now. My plan is to try and turn off kpatch-build's klp-relocation code and see how passing through to klp-convert fares. That would give us a good comparison of real-world examples that need to be handled and tested. -- Joe

Re: [PATCH] livepatch: Add KLP_IDLE state

2024-04-04 Thread Joe Lawrence
On 4/4/24 11:17, Petr Mladek wrote: > On Tue 2024-04-02 09:52:31, Joe Lawrence wrote: >> On Tue, Apr 02, 2024 at 11:09:54AM +0800, zhangwar...@gmail.com wrote: >>> From: Wardenjohn >>> >>> In livepatch, using KLP_UNDEFINED is seems to be confused. >>>

Re: [PATCH] livepatch: Add KLP_IDLE state

2024-04-02 Thread Joe Lawrence
tate - Introduce KLP_IDLE as synonym of sorts for KLP_UNDEFINED under certain conditions I ask because this patch leaves KLP_UNDEFINED defined and used in other parts of the tree (ie, init/init_task.c), yet KLP_IDLE is added and continues to use the same -1 enumeration. -- Joe

Re: [PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-28 Thread Joe Perches
On Fri, 2023-09-29 at 11:07 +0900, Justin Stitt wrote: > On Fri, Sep 29, 2023 at 12:52 AM Nick Desaulniers > wrote: > > > > On Wed, Sep 27, 2023 at 11:09 PM Joe Perches wrote: > > > > > > On Thu, 2023-09-28 at 14:31 +0900, Justin Stitt wrote: > > >

Re: [PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-27 Thread Joe Perches
On Thu, 2023-09-28 at 14:31 +0900, Justin Stitt wrote: > On Thu, Sep 28, 2023 at 2:01 PM Joe Perches wrote: > > > > On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > > > Changes in v2: > > > - remove formatting pass (thanks Joe) (but seriously the fo

Re: [PATCH v2 1/2] get_maintainer: add patch-only keyword-matching

2023-09-27 Thread Joe Perches
On Thu, 2023-09-28 at 14:03 +0900, Justin Stitt wrote: > On Thu, Sep 28, 2023 at 1:46 PM Joe Perches wrote: > > > > On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > > > Add the "D:" type which behaves the same as "K:" but will only match > &

Re: [PATCH v2 0/2] get_maintainer: add patch-only keyword matching

2023-09-27 Thread Joe Perches
On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > Changes in v2: > - remove formatting pass (thanks Joe) (but seriously the formatting is > bad, is there opportunity to get a formatting pass in here at some > point?) Why? What is it that makes you believe the formatting is bad?

Re: [PATCH v2 2/2] MAINTAINERS: migrate some K to D

2023-09-27 Thread Joe Perches
On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > Let's get the ball rolling with some changes from K to D. > > Ultimately, if it turns out that 100% of K users want to change to D > then really the behavior of K could just be changed. Given my suggestion to 1/2, this would be unnecessary.

Re: [PATCH v2 1/2] get_maintainer: add patch-only keyword-matching

2023-09-27 Thread Joe Perches
On Thu, 2023-09-28 at 04:23 +, Justin Stitt wrote: > Add the "D:" type which behaves the same as "K:" but will only match > content present in a patch file. > > To illustrate: > > Imagine this entry in MAINTAINERS: > > NEW REPUBLIC > M: Han Solo > W: https://www.jointheresistance.org > D: \

Re: [PATCH 3/3] get_maintainer: add patch-only pattern matching type

2023-09-27 Thread Joe Perches
On Wed, 2023-09-27 at 09:15 -0700, Kees Cook wrote: > On Wed, Sep 27, 2023 at 03:19:16AM +, Justin Stitt wrote: > > Add the "D:" type which behaves the same as "K:" but will only match > > content present in a patch file. > > > > To illustrate: > > > > Imagine this entry in MAINTAINERS: > >

Re: [PATCH 3/3] get_maintainer: add patch-only pattern matching type

2023-09-27 Thread Joe Perches
On Wed, 2023-09-27 at 03:19 +, Justin Stitt wrote: > Add the "D:" type which behaves the same as "K:" but will only match > content present in a patch file. Likely it'd be less aggravating just to document that K: is only for patches and add a !$file test.

Re: [PATCH 2/3] get_maintainer: run perltidy

2023-09-26 Thread Joe Perches
On Wed, 2023-09-27 at 03:19 +, Justin Stitt wrote: > I'm a first time contributor to get_maintainer.pl and the formatting is > suspicious. I am not sure if there is a particular reason it is the way > it is but I let my editor format it and submitted the diff here in this > patch. Capital NACK

Re: [PATCH 1/3] MAINTAINERS: add documentation for D:

2023-09-26 Thread Joe Perches
On Wed, 2023-09-27 at 03:19 +, Justin Stitt wrote: > Document what "D:" does. > > This is more or less the same as what "K:" does but only works for patch > files. Nack. I'd rather just add a !$file test to K: patterns.

Re: [PATCH][next] checkpatch: add a couple new alloc functions to alloc with multiplies check

2023-09-12 Thread Joe Perches
On Tue, 2023-09-12 at 11:04 -0600, Gustavo A. R. Silva wrote: > vmalloc() and vzalloc() functions have now 2-factor multiplication > argument forms vmalloc_array() and vcalloc(), correspondingly. > Add alloc-with-multiplies checks for these new functions. > > Link: https://github.com/KSPP/linux/i

Re: [PATCH 1/1] video: hyperv_fb: Add ratelimit on error message

2021-04-20 Thread Joe Perches
On Tue, 2021-04-20 at 08:44 -0700, Michael Kelley wrote: > Due to a full ring buffer, the driver may be unable to send updates to > the Hyper-V host. But outputing the error message can make the problem > worse because console output is also typically written to the frame > buffer. As a result, i

[PATCH] spi: bcm2835: Fix buffer overflow with CS able to go beyond limit.

2021-04-20 Thread Joe Burmeister
It was previoulsy possible to have a device tree with more chips than the driver supports and go off the end of CS arrays. This patches inforces CS limit but sets that limit to the max of the default limit and what is in the device tree when driver is loaded. Signed-off-by: Joe Burmeister

Re: [PATCH v2] iommu/amd: Fix extended features logging

2021-04-19 Thread Joe Perches
On Mon, 2021-04-19 at 22:23 +0300, Alexander Monakov wrote: > On Sun, 11 Apr 2021, Joe Perches wrote: > > > > v2: avoid pr_info(""), change pci_info() to pr_info() for a nicer > > > solution > > > > > >  drivers/iommu/amd/init.c | 4 ++--

[PATCH] spi: Handle SPI device setup callback failure.

2021-04-19 Thread Joe Burmeister
If the setup callback failed, but the controller has auto_runtime_pm and set_cs, the setup failure could be missed. Signed-off-by: Joe Burmeister --- drivers/spi/spi.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index

Re: [PATCH v5] printk: Userspace format enumeration support

2021-04-19 Thread Joe Perches
On Mon, 2021-04-19 at 11:53 +0200, Greg Kroah-Hartman wrote: > Hm, 12734 of the pr_err() calls do live in drivers/, so most of those > should be dev_err(). Might be something good to throw at interns... That depends on how much churn you want to have in old drivers that generally don't have any u

  1   2   3   4   5   6   7   8   9   10   >