[PATCH] selftests/net: remove unneeded semicolon

2023-12-18 Thread Jiapeng Chong
No functional modification involved. ./tools/testing/selftests/net/tcp_ao/setsockopt-closed.c:121:2-3: Unneeded semicolon. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7771 Signed-off-by: Jiapeng Chong --- tools/testing/selftests/net/tcp_ao/setsockopt-closed

Re: [PATCH v4 08/11] KVM: riscv: selftests: Add guest helper to get vcpu id

2023-12-18 Thread Haibo Xu
On Wed, Dec 13, 2023 at 10:08 PM Andrew Jones wrote: > > On Tue, Dec 12, 2023 at 05:31:17PM +0800, Haibo Xu wrote: > > Add guest_get_vcpuid() helper to simplify accessing to per-cpu > > private data. The sscratch CSR was used to store the vcpu id. > > > > Signed-off-by: Haibo Xu > > Reviewed-by:

[PATCH net-next] selftest/tcp-ao: Rectify out-of-tree build

2023-12-18 Thread Dmitry Safonov
Trivial fix for out-of-tree build that I wasn't testing previously: 1. Create a directory for library object files, fixes: > gcc lib/kconfig.c -Wall -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -I > ../../../../../usr/include/ -iquote /tmp/kselftest/kselftest/net/tcp_ao/lib > -I ../../../../include

Re: [PATCH v1] selftests/mm: Log run_vmtests.sh results in TAP format

2023-12-18 Thread John Hubbard
On 12/18/23 16:51, John Hubbard wrote: On 12/18/23 03:32, Ryan Roberts wrote: ... I should also point out that some of the subtests already attempt a TAP output. So now we end up with TAP-within-TAP output for those programs. It's actually TAP-in-TAP-in-TAP if you're running from run_kselftest

Re: [PATCH v1] selftests/mm: Log run_vmtests.sh results in TAP format

2023-12-18 Thread John Hubbard
On 12/18/23 03:32, Ryan Roberts wrote: ... I should also point out that some of the subtests already attempt a TAP output. So now we end up with TAP-within-TAP output for those programs. It's actually TAP-in-TAP-in-TAP if you're running from run_kselftest.sh :) For example:     # --

[PATCH] kselftest/arm64: Don't probe the current VL for unsupported vector types

2023-12-18 Thread Mark Brown
The vec-syscfg selftest verifies that setting the VL of the currently tested vector type does not disrupt the VL of the other vector type. To do this it records the current vector length for each type but neglects to guard this with a check for that vector type actually being supported. Add one, us

Re: selftests/livepatch fails on s390

2023-12-18 Thread Joe Lawrence
On Mon, Dec 18, 2023 at 11:44:23AM -0500, Joe Lawrence wrote: > > [ ... snip ... ] > > If we pre-trim the timestamps, the output is what we expect: > > $ comm --nocheck-order -13 \ > <(sed 's/^\[[ 0-9.]*\] //' /tmp/A) \ > <(sed 's/^\[[ 0-9.]*\] //' /tmp/B) > message four > > ho

Re: [PATCH v4] tracing/selftests: Add test to test the trace_marker

2023-12-18 Thread Steven Rostedt
On Mon, 18 Dec 2023 13:49:22 -0700 Shuah Khan wrote: > On 12/13/23 15:59, Masami Hiramatsu (Google) wrote: > > On Wed, 13 Dec 2023 11:15:27 -0500 > > Steven Rostedt wrote: > > > >> From: "Steven Rostedt (Google)" > >> > >> Add a test that writes longs strings, some over the size of the sub b

Re: [PATCH v4] tracing/selftests: Add test to test the trace_marker

2023-12-18 Thread Shuah Khan
On 12/13/23 15:59, Masami Hiramatsu (Google) wrote: On Wed, 13 Dec 2023 11:15:27 -0500 Steven Rostedt wrote: From: "Steven Rostedt (Google)" Add a test that writes longs strings, some over the size of the sub buffer and make sure that the entire content is there. This looks good to me. and

Re: [PATCH v3 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-12-18 Thread Shuah Khan
On 12/15/23 13:36, Joe Lawrence wrote: On 12/11/23 16:53, Shuah Khan wrote: On 12/6/23 07:39, Miroslav Benes wrote: Hi, On Tue, 5 Dec 2023, Shuah Khan wrote: On 12/5/23 05:52, mpdeso...@suse.com wrote: On Fri, 2023-12-01 at 16:38 +, Shuah Khan wrote: 0003-selftests-livepatch-Test-liv

Re: Should I add BPF kfuncs for userspace apps? And how?

2023-12-18 Thread Song Liu
Hi Akihiko, On Tue, Dec 12, 2023 at 12:05 AM Akihiko Odaki wrote: > [...] > --- > > I'm working on a new feature that aids virtio-net implementations using > tuntap virtual network device. You can see [1] for details, but > basically it's to extend BPF_PROG_TYPE_SOCKET_FILTER to report four more

Re: [PATCH][next] selftests/net: Fix various spelling mistakes in TCP-AO tests

2023-12-18 Thread Randy Dunlap
On 12/18/23 05:30, Colin Ian King wrote: > There are a handful of spelling mistakes in test messages in the > TCP-AIO selftests. Fix these. > > Signed-off-by: Colin Ian King Reviewed-by: Randy Dunlap Thanks. > --- > tools/testing/selftests/net/tcp_ao/connect-deny.c | 2 +- > tools/te

Re: [PATCH][next] selftests/net: Fix various spelling mistakes in TCP-AO tests

2023-12-18 Thread Dmitry Safonov
On 12/18/23 13:30, Colin Ian King wrote: > There are a handful of spelling mistakes in test messages in the > TCP-AIO selftests. Fix these. > > Signed-off-by: Colin Ian King Thank you, Colin. The patch looks good to me, my grammar and typos - not so much :-) Reviewed-by: Dmitry Safonov > ---

Re: [PATCH net-next v10 08/10] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode

2023-12-18 Thread Roger Quadros
On 18/12/2023 14:55, Roger Quadros wrote: > From: Grygorii Strashko > > This patch adds MQPRIO Qdisc offload in full 'channel' mode which allows > not only setting up pri:tc mapping, but also configuring TX shapers > (rate-limiting) on external port FIFOs. > > The MQPRIO Qdisc offload is expe

Re: selftests/livepatch fails on s390

2023-12-18 Thread Joe Lawrence
On 12/18/23 05:44, Alexander Gordeev wrote: > Hi all, > > The livepatch selftest somehow fails in -next on s390 due to what > appears to me as 'comm' usage issue. E.g the removal of timestamp- > less line "with link type OSD_10GIG." in the below output forces > 'comm' to produce the correct resul

[PATCH 2/2] kunit: Add example of kunit_activate_static_stub() with pointer-to-function

2023-12-18 Thread Richard Fitzgerald
Adds a variant of example_static_stub_test() that shows use of a pointer-to-function with kunit_activate_static_stub(). A const pointer to the add_one() function is declared. This pointer-to-function is passed to kunit_activate_static_stub() and kunit_deactivate_static_stub() instead of passing ad

[PATCH 1/2] kunit: Allow passing function pointer to kunit_activate_static_stub()

2023-12-18 Thread Richard Fitzgerald
Swap the arguments to typecheck_fn() in kunit_activate_static_stub() so that real_fn_addr can be either the function itself or a pointer to that function. This is useful to simplify redirecting static functions in a module. Having to pass the actual function meant that it must be exported from the

Re: [PATCH net-next v9 08/10] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode

2023-12-18 Thread Roger Quadros
Hi Simon, On 18/12/2023 15:43, Simon Horman wrote: > On Fri, Dec 15, 2023 at 03:20:46PM +0200, Roger Quadros wrote: >> From: Grygorii Strashko >> >> This patch adds MQPRIO Qdisc offload in full 'channel' mode which allows >> not only setting up pri:tc mapping, but also configuring TX shapers >> (

[PATCH] kunit: Fix NULL-dereference in kunit_init_suite() if suite->log is NULL

2023-12-18 Thread Richard Fitzgerald
suite->log must be checked for NULL before passing it to string_stream_clear(). This was done in kunit_init_test() but was missing from kunit_init_suite(). Signed-off-by: Richard Fitzgerald Fixes: 6d696c4695c5 ("kunit: add ability to run tests after boot using debugfs") --- lib/kunit/test.c | 4

Re: [PATCH] KVM: s390: selftest: memop: Fix undefined behavior

2023-12-18 Thread Claudio Imbrenda
On Mon, 18 Dec 2023 13:18:14 +0100 Nina Schoetterl-Glausch wrote: [...] > > > diff --git a/tools/testing/selftests/kvm/s390x/memop.c > > > b/tools/testing/selftests/kvm/s390x/memop.c > > > index bb3ca9a5d731..2eba9575828e 100644 > > > --- a/tools/testing/selftests/kvm/s390x/memop.c > > > +++ b/

[PATCH][next] selftests/net: Fix various spelling mistakes in TCP-AO tests

2023-12-18 Thread Colin Ian King
There are a handful of spelling mistakes in test messages in the TCP-AIO selftests. Fix these. Signed-off-by: Colin Ian King --- tools/testing/selftests/net/tcp_ao/connect-deny.c | 2 +- tools/testing/selftests/net/tcp_ao/lib/proc.c | 4 ++-- tools/testing/selftests/net/tcp_ao/sets

Re: [PATCH net-next v9 08/10] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode

2023-12-18 Thread Simon Horman
On Fri, Dec 15, 2023 at 03:20:46PM +0200, Roger Quadros wrote: > From: Grygorii Strashko > > This patch adds MQPRIO Qdisc offload in full 'channel' mode which allows > not only setting up pri:tc mapping, but also configuring TX shapers > (rate-limiting) on external port FIFOs. > > The MQPRIO Qdi

[PATCH net-next v10 10/10] net: ethernet: ti: am65-cpsw: add sw tx/rx irq coalescing based on hrtimers

2023-12-18 Thread Roger Quadros
From: Grygorii Strashko Add SW IRQ coalescing based on hrtimers for TX and RX data path which can be enabled by ethtool commands: - RX coalescing ethtool -C eth1 rx-usecs 50 - TX coalescing can be enabled per TX queue - by default enables coalesing for TX0 ethtool -C eth1 tx-usecs 50 -

[PATCH net-next v10 09/10] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support

2023-12-18 Thread Roger Quadros
Add driver support for viewing / changing the MAC Merge sublayer parameters and seeing the verification state machine's current state via ethtool. As hardware does not support interrupt notification for verification events we resort to polling on link up. On link up we try a couple of times for ve

[PATCH net-next v10 08/10] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode

2023-12-18 Thread Roger Quadros
From: Grygorii Strashko This patch adds MQPRIO Qdisc offload in full 'channel' mode which allows not only setting up pri:tc mapping, but also configuring TX shapers (rate-limiting) on external port FIFOs. The MQPRIO Qdisc offload is expected to work with or without VLAN/priority tagged packets.

[PATCH net-next v10 07/10] net: ethernet: am65-cpsw: Move register definitions to header file

2023-12-18 Thread Roger Quadros
Move register definitions to header file. No functional change. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean --- drivers/net/ethernet/ti/am65-cpsw-qos.c | 35 - drivers/net/ethernet/ti/am65-cpsw-qos.h | 35 + 2 files changed, 35 inser

[PATCH net-next v10 06/10] net: ethernet: ti: am65-cpsw: Move code to avoid forward declaration

2023-12-18 Thread Roger Quadros
Move this code around to avoid forward declaration. No functional change. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean --- drivers/net/ethernet/ti/am65-cpsw-qos.c | 86 - 1 file changed, 43 insertions(+), 43 deletions(-) v10: no change. v9: no code change.

[PATCH net-next v10 05/10] net: ethernet: am65-cpsw: cleanup TAPRIO handling

2023-12-18 Thread Roger Quadros
Handle offloading commands using switch-case in am65_cpsw_setup_taprio(). Move checks to am65_cpsw_taprio_replace(). Use NL_SET_ERR_MSG_MOD for error messages. Change error message from "Failed to set cycle time extension" to "cycle time extension not supported" Signed-off-by: Roger Quadros Rev

[PATCH net-next v10 04/10] net: ethernet: am65-cpsw: Rename TI_AM65_CPSW_TAS to TI_AM65_CPSW_QOS

2023-12-18 Thread Roger Quadros
We will use this Kconfig option to not only enable TAS/EST offload but also other QoS features like Multiqueue priority descriptors and MAC-Merge/Frame Preemption. TI_AM65_CPSW_QOS seems a more appropriate Kconfig option name than TI_AM65_CPSW_TAS. Signed-off-by: Roger Quadros Reviewed-by: Vladim

[PATCH net-next v10 03/10] net: ethernet: am65-cpsw: Build am65-cpsw-qos only if required

2023-12-18 Thread Roger Quadros
Build am65-cpsw-qos only if CONFIG_TI_AM65_CPSW_TAS is enabled. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean --- drivers/net/ethernet/ti/Makefile| 3 ++- drivers/net/ethernet/ti/am65-cpsw-qos.c | 12 drivers/net/ethernet/ti/am65-cpsw-qos.h | 26 +++

[PATCH net-next v10 02/10] selftests: forwarding: ethtool_mm: fall back to aggregate if device does not report pMAC stats

2023-12-18 Thread Roger Quadros
From: Vladimir Oltean Some devices do not support individual 'pmac' and 'emac' stats. For such devices, resort to 'aggregate' stats. Cc: Shuah Khan Signed-off-by: Vladimir Oltean Tested-by: Roger Quadros Signed-off-by: Roger Quadros --- tools/testing/selftests/net/forwarding/ethtool_mm.sh |

[PATCH net-next v10 01/10] selftests: forwarding: ethtool_mm: support devices with higher rx-min-frag-size

2023-12-18 Thread Roger Quadros
From: Vladimir Oltean Some devices have errata due to which they cannot report ETH_ZLEN (60) in the rx-min-frag-size. This was foreseen of course, and lldpad has logic that when we request it to advertise addFragSize 0, it will round it up to the lowest value that is _actually_ supported by the h

[PATCH net-next v10 00/10] net: ethernet: am65-cpsw: Add mqprio, frame preemption & coalescing

2023-12-18 Thread Roger Quadros
Hi, This series adds mqprio qdisc offload in channel mode, Frame Preemption MAC merge support and RX/TX coalesing for AM65 CPSW driver. In v10 following changes were made - Fix fallback to aggregate stats check - Added Reviewed-by tags Changelog information in each patch file. cheers, -roger G

Re: [PATCH net-next v9 02/10] selftests: forwarding: ethtool_mm: fall back to aggregate if device does not report pMAC stats

2023-12-18 Thread Roger Quadros
On 15/12/2023 19:27, Vladimir Oltean wrote: > On Fri, Dec 15, 2023 at 03:20:40PM +0200, Roger Quadros wrote: >> diff --git a/tools/testing/selftests/net/forwarding/lib.sh >> b/tools/testing/selftests/net/forwarding/lib.sh >> index 8f6ca458af9a..763c262a3453 100755 >> --- a/tools/testing/selftes

Re: [PATCH] KVM: s390: selftest: memop: Fix undefined behavior

2023-12-18 Thread Nina Schoetterl-Glausch
On Fri, 2023-12-15 at 18:02 +0100, Claudio Imbrenda wrote: > On Fri, 15 Dec 2023 17:11:25 +0100 > Nina Schoetterl-Glausch wrote: > > > If an integer's type has x bits, shifting the integer left by x or more > > is undefined behavior. > > This can happen in the rotate function when attempting to d

Re: [PATCH v1] selftests/mm: Log run_vmtests.sh results in TAP format

2023-12-18 Thread Ryan Roberts
On 16/12/2023 02:40, John Hubbard wrote: > On 12/15/23 18:25, John Hubbard wrote: >> On 12/15/23 06:28, Ryan Roberts wrote: >> ... >>> I've kept all the existing "pretty" output and results summary as is, it >>> just >>> gets a hash in front of it when TAP is enabled. >>> >>> so this: >>> >>>

Re: [PATCH 00/12] selftests/net: Add TCP-AO tests

2023-12-18 Thread Hangbin Liu
Hi Dmitry, I just found the patch set has been merged. Sorry for the noise of tested-by replies. Please feel free to ignore the question for unsigned-md5_ipv6. The test passed with 6.7.0-rc5. Thanks Hangbin On Fri, Dec 15, 2023 at 02:36:14AM +, Dmitry Safonov wrote: > Hi, > > An essential p

Re: [PATCH 11/12] selftests/net: Add TCP-AO selfconnect/simultaneous connect test

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:25AM +, Dmitry Safonov wrote: > Check that a rare functionality of TCP named self-connect works with > TCP-AO. This "under the cover" also checks TCP simultaneous connect > (TCP_SYN_RECV socket state), which would be harder to check other ways. > > In order to ver

Re: [PATCH 10/12] selftests/net: Add TCP-AO RST test

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:24AM +, Dmitry Safonov wrote: > Check that both active and passive reset works and correctly sign > segments with TCP-AO or don't send RSTs if not possible to sign. > A listening socket with backlog = 0 gets one connection in accept > queue, another in syn queue. O

Re: [PATCH 09/12] selftests/net: Add SEQ number extension test

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:23AM +, Dmitry Safonov wrote: > Check that on SEQ number wraparound there is no disruption or TCPAOBad > segments produced. > > Sample of expected output: > > # ./seq-ext_ipv4 > > 1..7 > > # 1436[lib/setup.c:254] rand seed 1686611079 > > TAP version 13 > > ok 1 se

Re: [PATCH 08/12] selftests/net: Add TCP_REPAIR TCP-AO tests

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:22AM +, Dmitry Safonov wrote: > The test plan is: > 1. check that TCP-AO connection may be restored on another socket > 2. check restore with wrong send/recv ISN (checking that they are >part of MAC generation) > 3. check restore with wrong SEQ number extension

Re: [PATCH 07/12] selftests/net: Add test/benchmark for removing MKTs

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:21AM +, Dmitry Safonov wrote: > Sample output: > > 1..36 > > # 1106[lib/setup.c:207] rand seed 1660754406 > > TAP version 13 > > ok 1 Worst case connect 512 keys: min=0ms max=1ms mean=0.583329ms > > stddev=0.076376 > > ok 2 Connect random-search 512 k

Re: [PATCH 06/12] selftests/net: Add TCP-AO + TCP-MD5 + no sign listen socket tests

2023-12-18 Thread Hangbin Liu
Hi Dmitry, With 6.7.0-rc3 I always got error # selftests: net/tcp_ao: unsigned-md5_ipv6 # 1..72 # # 1577[lib/setup.c:243] rand seed 1702890409 # TAP version 13 # ok 1 AO server (INADDR_ANY): AO client: counter TCPAOGood increased 0 => 2 # ok 2 AO server (INADDR_ANY): AO client: connected # ok 3 A

Re: [PATCH 05/12] selftests/net: Add test for TCP-AO add setsockopt() command

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:19AM +, Dmitry Safonov wrote: > Verify corner-cases for UAPI. > Sample output: > > # ./setsockopt-closed_ipv4 > > 1..120 > > # 1657[lib/setup.c:254] rand seed 1681938184 > > TAP version 13 > > ok 1 AO add: minimum size > > ok 2 AO add: extended size > > ok 3 AO add

Re: [PATCH 04/12] selftests/net: Add a test for TCP-AO keys matching

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:18AM +, Dmitry Safonov wrote: > Add TCP-AO tests on connect()/accept() pair. > SNMP counters exposed by kernel are very useful here to verify the > expected behavior of TCP-AO. > > Expected output for ipv4 version: > > # ./connect-deny_ipv4 > > 1..19 > > # 1702[li

Re: [PATCH 03/12] selftests/net: Add TCP-AO ICMPs accept test

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:17AM +, Dmitry Safonov wrote: > Reverse to icmps-discard test: the server accepts ICMPs, using > TCP_AO_CMDF_ACCEPT_ICMP and it is expected to fail under ICMP > flood from client. Test that the default pre-TCP-AO behaviour functions > when TCP_AO_CMDF_ACCEPT_ICMP i

Re: [PATCH 02/12] selftests/net: Verify that TCP-AO complies with ignoring ICMPs

2023-12-18 Thread Hangbin Liu
On Fri, Dec 15, 2023 at 02:36:16AM +, Dmitry Safonov wrote: > Hand-crafted ICMP packets are sent to the server, the server checks for > hard/soft errors and fails if any. > > Expected output for ipv4 version: > > # ./icmps-discard_ipv4 > > 1..3 > > # 3164[lib/setup.c:166] rand seed 1642623745

Re: [PATCH v8 23/24] ima: Make it independent from 'integrity' LSM

2023-12-18 Thread Roberto Sassu
On Thu, 2023-12-14 at 18:08 +0100, Roberto Sassu wrote: > From: Roberto Sassu > > Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA > own integrity metadata (ima_iint_cache structure, with IMA-specific fields > from the integrity_iint_cache structure), and by managing it

Re: [PATCH] kselftest: alsa: fixed a print formatting warning

2023-12-18 Thread Takashi Iwai
On Sun, 17 Dec 2023 09:00:19 +0100, Ghanshyam Agrawal wrote: > > A statement used %d print formatter where %s should have > been used. The same has been fixed in this commit. > > Signed-off-by: Ghanshyam Agrawal Thanks, applied now. Takashi