Re: [PATCH net 1/4] selftests/net: ipsec: fix constant out of range

2023-11-27 Thread Dmitry Safonov
es: bc2652b7ae1e ("selftest/net/xfrm: Add test for ipsec tunnel") > Cc: Dmitry Safonov <0x7f454...@gmail.com> > Signed-off-by: Willem de Bruijn LGTM, thanks! Reviewed-by: Dmitry Safonov <0x7f454...@gmail.com> > --- > tools/testing/selftests/net/ipsec.c | 4 ++--

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

2023-12-14 Thread Dmitry Safonov
al-test.sh/nettest.c separately. [1]: https://github.com/checkpoint-restore/criu/tree/criu-dev/test/zdtm/static Signed-off-by: Dmitry Safonov --- Dmitry Safonov (12): selftests/net: Add TCP-AO library selftests/net: Verify that TCP-AO complies with ignoring ICMPs selftests/net

[PATCH 01/12] selftests/net: Add TCP-AO library

2023-12-14 Thread Dmitry Safonov
scenarios, that are hard to put in bash script that uses one binary. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/net/tcp_ao/.gitignore| 2 + tools/testing/selftests/net/tcp_ao/Makefile | 45 ++ tools/testing/selftests

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

2023-12-14 Thread Dmitry Safonov
; # 3277[lib/proc.c:207] TcpExt TCPAOGood: 3 => 23 > ok 1 Icmp6InDestUnreachs delivered 5 > ok 2 server failed with -13: Permission denied > ok 3 TCPAODroppedIcmps counter didn't change: 0 >= 0 > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 With

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

2023-12-14 Thread Dmitry Safonov
0 => 200 > # 3186[lib/proc.c:207] TcpExt TCPDelivered: 0 => 199 > # 3186[lib/proc.c:207] TcpExt TCPAOGood: 2 => 203 > # 3186[lib/proc.c:207] TcpExt TCPAODroppedIcmps: 0 => 360 > ok 1 Icmp6InDestUnreachs delivered 360 > ok 2 Server surviv

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

2023-12-14 Thread Dmitry Safonov
k 13 Client: Wrong addr: connect() was prevented > ok 14 rcv id != snd id: connected > ok 15 rcv id != snd id: counter TCPAOGood increased 1 => 3 > ok 16 Server: prefix match: connected > ok 17 Server: prefix match: counter TCPAOGood increased 5 => 7 > ok 18 Client: prefix ma

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

2023-12-14 Thread Dmitry Safonov
l + current > ok 112 get keys: get_all + rnext > ok 113 get keys: current + rnext > ok 114 key add: duplicate: full copy > ok 115 key add: duplicate: any addr key on the socket > ok 116 key add: duplicate: add any addr key > ok 117 key add: duplicate: add any addr for t

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

2023-12-14 Thread Dmitry Safonov
key (l3index=N) + TCP-MD5 key (l3index=0) > ok 70 VRF: TCP-MD5 key (l3index=0) + TCP-AO key (l3index=N) > ok 71 VRF: TCP-AO key (l3index=N) + TCP-MD5 key (l3index=N): prefailed as > expected: Key was rejected by service > ok 72 VRF: TCP-MD5 key (l3index=N) + TCP-AO key (l3index=

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

2023-12-14 Thread Dmitry Safonov
ified approach with linked-list of MKTs scales quite fine even for thousands of keys. And that also means that the majority of the time for delete is eaten by synchronize_rcu() [which I can confirm separately by tracing]. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/Makefile

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

2023-12-14 Thread Dmitry Safonov
ext number: server couldn't serve > ok 19 TCP-AO with wrong receive SEQ ext number: counter TCPAOBad increased 10 > => 18 > ok 20 TCP-AO with wrong receive SEQ ext number: counter TCPAOBad increased 20 > => 23 > # Totals: pass:20 fail:0 xfail:0 xpass:0 skip:0 error:0

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

2023-12-14 Thread Dmitry Safonov
k 3 TCPAOGood counter increased 1002 => 3002 > ok 4 TCPAOGood counter increased 1003 => 3003 > ok 5 TCPAOBad counter didn't increase > ok 6 TCPAOBad counter didn't increase > ok 7 SEQ extension incremented: 1/1999, 1/998999 > # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:

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

2023-12-14 Thread Dmitry Safonov
Signed AO segments (client): 0 => 30 > ok 15 No segments with bad AO sign (client) > # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/Makefile | 1 + tools/testing/selftests/net/tcp_ao/lib/sock.c | 2 +- tool

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

2023-12-14 Thread Dmitry Safonov
PAOGood 26 => 50 > ok 3 self-connect(restore): connect TCPAOGood 52 => 97 > ok 4 self-connect(restore, different keyids): connect TCPAOGood 99 => 144 > # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/Makefile

[PATCH 12/12] selftests/net: Add TCP-AO key-management test

2023-12-14 Thread Dmitry Safonov
=> established key matching: server alive > ok 115 server: Check accept() => established key matching: passed counters > checks > ok 116 client: Check connect() => established key matching: current key 0 as > expected > ok 117 client: Check connect() => establish

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

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

2023-12-18 Thread Dmitry Safonov
endency") Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312190645.q76mmhyq-...@intel.com/ Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/Makefile | 9 +++-- 1 file cha

[PATCH net-next 0/2] selftest/net: Some more TCP-AO selftest post-merge fixups

2023-12-21 Thread Dmitry Safonov
Note that there's another post-merge fix for TCP-AO selftests, but that doesn't conflict with these, so I don't resend that: https://lore.kernel.org/all/20231219-b4-tcp-ao-selftests-out-of-tree-v1-1-0fff92d26...@arista.com/T/#u Signed-off-by: Dmitry Safonov --- Dm

[PATCH net-next 1/2] selftest/tcp-ao: Set routes in a proper VRF table id

2023-12-21 Thread Dmitry Safonov
ing unsigned-md5 tests debugging. That also explains, why ip_route_add_vrf() ignored EEXIST, returned by fib6. Yet, keep EEXIST ignoring in bench-lookups selftests as it's expected that those selftests may add the same (duplicate) routes. Reported-by: Hangbin Liu Signed-off-by: Dmitry

[PATCH net-next 2/2] selftest/tcp-ao: Work on namespace-ified sysctl_optmem_max

2023-12-21 Thread Dmitry Safonov
there is a test that checks that optmem_max limit applies to TCP-AO keys and a little benchmark that measures linked-list TCP-AO keys scaling, those are fixed by this. Cc: Eric Dumazet Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/setup.c | 35

[PATCH] selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS

2024-01-10 Thread Dmitry Safonov
the LDFLAGS variable. [1]: https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401011151.veyytjzq-...@intel.com/ Signed-off

Re: [PATCH 12/12] selftests/net: Add TCP-AO key-management test

2024-01-15 Thread Dmitry Safonov
Hi Mohammad, On 1/12/24 18:57, Nassiri, Mohammad wrote: >> -Original Message- >> From: Dmitry Safonov >> Sent: Thursday, December 14, 2023 9:36 PM > >> + >> +static void end_server(const char *tst_name, int sk, >> + struct t

Re: [PATCH] selftests/net: argument value mismatch when calling verify_counters()

2024-01-17 Thread Dmitry Safonov
Hi Mohammad, On 1/16/24 21:48, Mohammad Nassiri wrote: > The end_server() function only operates in the server thread > and always takes an accept socket instead of a listen socket as > its input argument. To align with this, invert the boolean values > used when calling verify_counters() within t

[PATCH 0/3] selftests/net: A couple of typos fixes in key-management test

2024-01-17 Thread Dmitry Safonov
Two typo fixes, noticed by Mohammad's review. And a fix for an issue that got uncovered. Signed-off-by: Dmitry Safonov --- Dmitry Safonov (2): selftests/net: Rectify key counters checks selftests/net: Clean-up double assignment Mohammad Nassiri (1): selftests/net: Arg

[PATCH 1/3] selftests/net: Argument value mismatch when calling verify_counters()

2024-01-17 Thread Dmitry Safonov
: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Mohammad Nassiri Link: https://lore.kernel.org/all/934627c5-eebb-4626-be23-cfb134c01...@arista.com/ [amended 'Fixes' tag and carried-over to lkml] Signed-off-by: Dmitry Safonov --- tools/testing/self

[PATCH 2/3] selftests/net: Rectify key counters checks

2024-01-17 Thread Dmitry Safonov
ammad Nassiri Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Dmitry Safonov --- .../testing/selftests/net/tcp_ao/key-management.c | 44 -- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/tools/testing/selftests/

[PATCH 3/3] selftests/net: Clean-up double assignment

2024-01-17 Thread Dmitry Safonov
Yeah, copy'n'paste typo. Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/dm6pr04mb4202bc58a9fd5bdd24a16e8ec5...@dm6pr04mb4202.namprd04.prod.outlook.com/ Signed-off-by: Dmitry Safonov

Re: [PATCH 0/3] selftests/net: A couple of typos fixes in key-management test

2024-01-18 Thread Dmitry Safonov
On 1/18/24 16:51, Jakub Kicinski wrote: > On Thu, 18 Jan 2024 02:51:33 +0000 Dmitry Safonov wrote: >> Two typo fixes, noticed by Mohammad's review. >> And a fix for an issue that got uncovered. > > Somewhat unrelated to these fixes but related to the tcp_ao selftest

Re: [PATCH 1/3] selftests/net: Argument value mismatch when calling verify_counters()

2024-01-19 Thread Dmitry Safonov
Hi Simon, On 1/19/24 16:26, Simon Horman wrote: > On Thu, Jan 18, 2024 at 02:51:34AM +0000, Dmitry Safonov wrote: >> From: Mohammad Nassiri >> >> The end_server() function only operates in the server thread >> and always takes an accept socket instead of a listen sock

Re: [PATCH 3/3] selftests/net: Clean-up double assignment

2024-01-19 Thread Dmitry Safonov
Hi Simon, On 1/19/24 16:25, Simon Horman wrote: > On Thu, Jan 18, 2024 at 02:51:36AM +0000, Dmitry Safonov wrote: >> Yeah, copy'n'paste typo. >> >> Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") >> Reported-by: Nassiri, Moham

Re: [PATCH 0/3] selftests/net: A couple of typos fixes in key-management test

2024-01-19 Thread Dmitry Safonov
On 1/18/24 17:13, Jakub Kicinski wrote: > On Thu, 18 Jan 2024 17:04:25 +0000 Dmitry Safonov wrote: >>> Somewhat unrelated to these fixes but related to the tcp_ao selftests >>> in general - could you please also add a config file so that it's >>> easy to bui

Re: [PATCH 0/3] selftests/net: A couple of typos fixes in key-management test

2024-01-24 Thread Dmitry Safonov
Hi Jakub, On 1/24/24 15:12, Jakub Kicinski wrote: > On Fri, 19 Jan 2024 18:39:14 +0000 Dmitry Safonov wrote: >>> You probably want something smaller to be honest. >>> tools/testing/selftests/net/config has a lot of stuff in it >>> and it's actually missing

Re: [PATCH 0/3] selftests/net: A couple of typos fixes in key-management test

2024-01-24 Thread Dmitry Safonov
On 1/24/24 19:04, Jakub Kicinski wrote: > On Wed, 24 Jan 2024 17:46:10 +0000 Dmitry Safonov wrote: >>>> Thanks! >>>> >>>> I'll send a patch for it in version 2 (as I anyway need to address >>>> Simon's feedback). >>> >>

Re: [PATCH net] selftests: tcp_ao: add a config file

2024-01-24 Thread Dmitry Safonov
kups_ipv6. > other 21 pass. > > Fixes: d11301f65977 ("selftests/net: Add TCP-AO ICMPs accept test") > Signed-off-by: Jakub Kicinski Reviewed-by: Dmitry Safonov <0x7f454...@gmail.com> Thanks again! > --- > CC: sh...@kernel.org > CC: 0x7f454...@gmail.com &g

Re: [PATCH net] selftests: tcp_ao: set the timeout to 2 minutes

2024-01-24 Thread Dmitry Safonov
Add test/benchmark for removing MKTs") > Signed-off-by: Jakub Kicinski Thanks! Reviewed-by: Dmitry Safonov <0x7f454...@gmail.com> > --- > Long story short I looked at the output for bench-lookups_ipv6 > and it seems to be a trivial timeout problem. With this we're at

[PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-01-29 Thread Dmitry Safonov
noticed by Mohammad's review. And a fix for an issue that got uncovered. Signed-off-by: Dmitry Safonov --- Dmitry Safonov (2): selftests/net: Rectify key counters checks selftests/net: Repair RST passive reset selftest Mohammad Nassiri (1): selftests/net: Argument valu

[PATCH v2 1/3] selftests/net: Argument value mismatch when calling verify_counters()

2024-01-29 Thread Dmitry Safonov
ts/net: Add TCP-AO key-management test") Signed-off-by: Mohammad Nassiri Link: https://lore.kernel.org/all/934627c5-eebb-4626-be23-cfb134c01...@arista.com/ [amended 'Fixes' tag, added the issue description and carried-over to lkml] Signed-off-by: Dmitry Safonov --- tools/testing/self

[PATCH v2 2/3] selftests/net: Rectify key counters checks

2024-01-29 Thread Dmitry Safonov
ammad Nassiri Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Dmitry Safonov --- .../testing/selftests/net/tcp_ao/key-management.c | 44 -- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/tools/testing/selftests/

[PATCH v2 3/3] selftests/net: Repair RST passive reset selftest

2024-01-29 Thread Dmitry Safonov
this moment I want it to run on netdev/patchwork selftests dashboard. It also slightly changes tcp_ao-lib in order to get SO_ERROR propagated to test_client_verify() return value. Fixes: c6df7b2361d7 ("selftests/net: Add TCP-AO RST test") Signed-off-by: Dmitry Safonov --- tools/testin

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-01-31 Thread Dmitry Safonov
On 2/1/24 00:36, Jakub Kicinski wrote: > On Tue, 30 Jan 2024 03:51:51 +0000 Dmitry Safonov wrote: >> Two typo fixes, noticed by Mohammad's review. >> And a fix for an issue that got uncovered. > > I can confirm that all tests pass now :) > Thank you! Thanks Jakub!

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
Hi Jakub, On 2/1/24 21:21, Jakub Kicinski wrote: > On Thu, 1 Feb 2024 00:50:46 +0000 Dmitry Safonov wrote: >> Please, let me know if there will be other issues with tcp-ao tests :) >> >> Going to work on tracepoints and some other TCP-AO stuff for net-next. > >

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
On 2/1/24 22:25, Dmitry Safonov wrote: > Hi Jakub, > > On 2/1/24 21:21, Jakub Kicinski wrote: >> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: >>> Please, let me know if there will be other issues with tcp-ao tests :) >>> >>> Going to work on t

[PATCH] selftests/net: Amend per-netns counter checks

2024-02-01 Thread Dmitry Safonov
inski Closes: https://lore.kernel.org/all/20240201132153.4d68f...@kernel.org/T/#u Fixes: 6f0c472a6815 ("selftests/net: Add TCP-AO + TCP-MD5 + no sign listen socket tests") Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/unsigned-md5.c | 12 ++-- 1 file changed

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
On 2/1/24 23:37, Dmitry Safonov wrote: > On 2/1/24 22:25, Dmitry Safonov wrote: >> Hi Jakub, >> >> On 2/1/24 21:21, Jakub Kicinski wrote: >>> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: >>>> Please, let me know if there will be other issues wi

[PATCH net-next 00/10] net/tcp: TCP-AO and TCP-MD5 tracepoints

2024-02-24 Thread Dmitry Safonov
under CONFIG_TCP_..., making it disabled by default and with a warning of deprecated, scheduled for removal. Maybe this won't cause any problems for anybody and I'm just too cautious of breaking others. Anyways, version 1, thanks for any reviews! Signed-off-by: Dmitry Safonov --- Dmitry Safonov

[PATCH net-next 01/10] net/tcp: Use static_branch_tcp_{md5,ao} to drop ifdefs

2024-02-24 Thread Dmitry Safonov
It's possible to clean-up some ifdefs by hiding that tcp_{md5,ao}_needed static branch is defined and compiled only under related configs, since commit 4c8530dc7d7d ("net/tcp: Only produce AO/MD5 logs if there are any keys"). Signed-off-by: Dmitry Safonov --- include/n

[PATCH net-next 02/10] net/tcp: Add a helper tcp_ao_hdr_maclen()

2024-02-24 Thread Dmitry Safonov
It's going to be used more in TCP-AO tracepoints. Signed-off-by: Dmitry Safonov --- include/net/tcp_ao.h | 5 + net/ipv4/tcp_ao.c| 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/net/tcp_ao.h b/include/net/tcp_ao.h index 471e177362b4..6501ed1dfa1e 1

[PATCH net-next 03/10] net/tcp: Move tcp_inbound_hash() from headers

2024-02-24 Thread Dmitry Safonov
Two reasons: 1. It's grown up enough 2. In order to not do header spaghetti by including , which is necessary for TCP tracepoints. Signed-off-by: Dmitry Safonov --- include/net/tcp.h | 65 - net/ipv4/tcp.c

[PATCH net-next 04/10] net/tcp: Add tcp-md5 and tcp-ao tracepoints

2024-02-24 Thread Dmitry Safonov
cises net_dev_xmit_timeout, devlink_health_report, but it'll be trivial to teach it to deal with failed hashes. Otherwise, BGP may trace/log them itself. Especially exciting for possible investigations is key rotation (RNext_key requests). Suggested-by: Jakub Kicinski Signed-off-by: Dmit

[PATCH net-next 05/10] net/tcp: Remove tcp_hash_fail()

2024-02-24 Thread Dmitry Safonov
ns in reality. Signed-off-by: Dmitry Safonov --- include/net/tcp_ao.h | 37 - net/ipv4/tcp.c | 25 - net/ipv4/tcp_ao.c| 9 - 3 files changed, 71 deletions(-) diff --git a/include/net/tcp_ao.h b/include/net/tcp_ao.h

[PATCH net-next 06/10] selftests/net: Clean-up double assignment

2024-02-24 Thread Dmitry Safonov
Yeah, copy'n'paste typo. Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/dm6pr04mb4202bc58a9fd5bdd24a16e8ec5...@dm6pr04mb4202.namprd04.prod.outlook.com/ Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/sock.c | 1 - 1 file changed,

[PATCH net-next 07/10] selftests/net: Provide test_snprintf() helper

2024-02-24 Thread Dmitry Safonov
Re-invented std::stringstream :-) No need for buffer array - malloc() it. It's going to be helpful of path concat printings. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/aolib.h | 56 ++ 1 file changed, 49 insertions(+), 7 deletions(-)

[PATCH net-next 08/10] selftests/net: Be consistnat in kconfig checks

2024-02-24 Thread Dmitry Safonov
negative return code, rather than libc-style errno. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/kconfig.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/net/tcp_ao/lib/kconfig.c b/tools/testing

[PATCH net-next 09/10] selftests/net: Don't forget to close nsfd after switch_save_ns()

2024-02-24 Thread Dmitry Safonov
The switch_save_ns() helper suppose to help switching to another namespace for some action and to return back to original namespace. The fd should be closed. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/lib/setup.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[PATCH net-next 10/10] selftest/net: Add trace events matching to tcp_ao

2024-02-24 Thread Dmitry Safonov
dependency that one would have to bring into VM or DUT (Device Under Test). Please, don't copy it over into any real world programs, that aren't tests. Signed-off-by: Dmitry Safonov --- tools/testing/selftests/net/tcp_ao/Makefile| 2 +- tools/testing/selftests/net/tcp_ao/bench-

Re: [PATCH net-next 03/10] net/tcp: Move tcp_inbound_hash() from headers

2024-02-24 Thread Dmitry Safonov
On 2/24/24 09:30, Eric Dumazet wrote: > On Sat, Feb 24, 2024 at 10:04 AM Dmitry Safonov wrote: >> >> Two reasons: >> 1. It's grown up enough >> 2. In order to not do header spaghetti by including >>, which is necessary for TCP tracepoints. >> >

Re: [PATCH net-next 03/10] net/tcp: Move tcp_inbound_hash() from headers

2024-02-26 Thread Dmitry Safonov
On Mon, Feb 26, 2024 at 8:43 PM Simon Horman wrote: > > On Sat, Feb 24, 2024 at 09:04:11AM +, Dmitry Safonov wrote: [..] > > + if (req) { > > + if (tcp_rsk_used_ao(req) != !!aoh) { > > + u8 keyid, rnext, maclen; > > + >

Re: [PATCH net-next 0/7] net/selftests: TCP-AO selftests updates

2024-07-30 Thread Dmitry Safonov
On Tue, 30 Jul 2024 at 11:51, Paolo Abeni wrote: [..] > It looks like this is not well digested by the CI, e.g.: > > https://netdev.bots.linux.dev/flakes.html?tn-needle=tcp-ao > > https://netdev-3.bots.linux.dev/vmksft-tcp-ao-dbg/results/705502/8-restore-ipv4/stdout Thanks Paolo! I see the 2 issu

Re: [PATCH net-next v2 0/7] net/selftests: TCP-AO selftests updates

2024-08-02 Thread Dmitry Safonov
Hi Jakub, On Fri, 2 Aug 2024 at 16:18, Jakub Kicinski wrote: > > On Fri, 02 Aug 2024 10:23:24 +0100 Dmitry Safonov via B4 Relay wrote: > > First 4 patches are more-or-less cleanups/preparations. > > > > Patch 5 was sent to me/contributed off-list by Mohammad, who wants 3

Re: [PATCH net 3/4] selftests/tcp_ao: Fix fscanf() call for format-security

2024-04-12 Thread Dmitry Safonov
On Sat, 13 Apr 2024 at 02:43, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces: > > lib/proc.c: In function ‘netstat_read_type’: > > lib/proc.c:89:9: erro

Re: [PATCH net 4/4] selftests/tcp_ao: Printing fixes to confirm with format-security

2024-04-12 Thread Dmitry Safonov
On Sat, 13 Apr 2024 at 02:43, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces > > lib/setup.c: In function ‘__test_msg’: > > lib/setup.c:20:9: error: form

Re: [PATCH net 0/4] selftests/net/tcp_ao: A bunch of fixes for TCP-AO selftests

2024-04-17 Thread Dmitry Safonov
On Tue, 16 Apr 2024 at 15:28, Jakub Kicinski wrote: > > On Sat, 13 Apr 2024 02:42:51 +0100 Dmitry Safonov via B4 Relay wrote: > > Started as addressing the flakiness issues in rst_ipv*, that affect > > netdev dashboard. > > Thank you! :) Jakub, you are very welcome :)

Re: [PATCH net 0/4] selftests/net/tcp_ao: A bunch of fixes for TCP-AO selftests

2024-04-17 Thread Dmitry Safonov
On Wed, 17 Apr 2024 at 22:28, Jakub Kicinski wrote: > > On Wed, 17 Apr 2024 13:46:36 -0700 Jakub Kicinski wrote: > > > I can spend some time on them after I verify that my fix for -stable > > > is actually fixing an issue I think it fixes. > > > Seems like your automation + my selftests are giving

Re: [PATCH] selftest/timerns: fix clang build failures for abs() calls

2024-05-03 Thread Dmitry Safonov
s-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/ > > Signed-off-by: John Hubbard LGTM, even potentially fixes the testing post-2038. Reviewed-by: Dmitry Safonov > --- > tools/testing/selftests/timens/exec.c | 6 +++--- > tools/testing/selftests/timens/timer.c | 2 +- >

Re: [PATCH net-next v2 6/7] selftests/net: Synchronize client/server before counters checks

2024-08-06 Thread Dmitry Safonov
On Sun, 4 Aug 2024 at 10:47, Simon Horman wrote: > > On Fri, Aug 02, 2024 at 10:23:30AM +0100, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > > > On tests that are expecting failure the timeout value is > > TEST_RETR

Re: [PATCH net-next v3 0/8] net/selftests: TCP-AO selftests updates

2024-08-19 Thread Dmitry Safonov
Going to update with v4, I see some netdev failures on non-appeared trace events. I need to review the synchronization on the tracer thread. pw-bot: changes-requested On Thu, 15 Aug 2024 at 22:32, Dmitry Safonov via B4 Relay wrote: > > First 3 patches are more-or-less cleanups/prepar

Re: [PATCH net-next v3 2/8] selftests/net: Provide test_snprintf() helper

2024-08-21 Thread Dmitry Safonov
Hi Simon, On Wed, 21 Aug 2024 at 20:10, Simon Horman wrote: > > On Thu, Aug 15, 2024 at 10:32:27PM +0100, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > > > Instead of pre-allocating a fixed-sized buffer of TEST_MSG_BUFFER

Re: [PATCH net-next v3 4/8] selftests/net: Open /proc/thread-self in open_netns()

2024-08-21 Thread Dmitry Safonov
On Wed, 21 Aug 2024 at 20:11, Simon Horman wrote: > > On Thu, Aug 15, 2024 at 10:32:29PM +0100, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > > > It turns to be that open_netns() is called rarely from the child-thread > &g

Re: [PATCH net-next v3 2/8] selftests/net: Provide test_snprintf() helper

2024-08-23 Thread Dmitry Safonov
On Thu, 22 Aug 2024 at 11:13, Simon Horman wrote: > > On Wed, Aug 21, 2024 at 10:35:10PM +0100, Dmitry Safonov wrote: > > Hi Simon, > > > > On Wed, 21 Aug 2024 at 20:10, Simon Horman wrote: > > > [..] > > > Hi Dmitry, > > > > &g

Re: [PATCH net-next v4 0/8] net/selftests: TCP-AO selftests updates

2024-08-27 Thread Dmitry Safonov
On Tue, 27 Aug 2024 at 22:17, Jakub Kicinski wrote: > > On Fri, 23 Aug 2024 23:04:50 +0100 Dmitry Safonov via B4 Relay wrote: > > First 3 patches are more-or-less cleanups/preparations. > > > > Patches 4/5 are fixes for netns file descriptors leaks/open. > > > >

[PATCH net-next 1/7] selftests/net: Clean-up double assignment

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Yeah, copy'n'paste typo. Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/dm6pr04mb4202bc58a9fd5bdd24a16e8ec5...@dm6pr04mb4202.namprd04.prod.outlook.com/ Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com&

[PATCH net-next 0/7] net/selftests: TCP-AO selftests updates

2024-07-29 Thread Dmitry Safonov via B4 Relay
-v1-0-15f31b7f3...@arista.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=33700a0c9b56 Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- Dmitry Safonov (6): selftests/net: Clean-up double assignment selftests/net: Provide test_snprintf() helpe

[PATCH net-next 2/7] selftests/net: Provide test_snprintf() helper

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Re-invented std::stringstream :-) No need for buffer array - malloc() it. It's going to be helpful of path concat printings. Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/selftests/net/tcp_ao

[PATCH net-next 6/7] selftests/net: Synchronize client/server before counters checks

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> On tests that are expecting failure the timeout value is TEST_RETRANSMIT_SEC == 1 second. Which is big enough for most of devices under tests. But on a particularly slow machine/VM, 1 second might be not enough for another thread to be schedul

[PATCH net-next 4/7] selftests/net: Don't forget to close nsfd after switch_save_ns()

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> The switch_save_ns() helper suppose to help switching to another namespace for some action and to return back to original namespace. The fd should be closed. Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/selftest

[PATCH net-next 3/7] selftests/net: Be consistent in kconfig checks

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Most of the functions in tcp-ao lib/ return negative errno or -1 in case of a failure. That creates inconsistencies in lib/kconfig, which saves what was the error code. As well as the uninitialized kconfig value is -1, which also may be the resul

[PATCH net-next 5/7] selftests/tcp_ao: Fix printing format for uint64_t

2024-07-29 Thread Dmitry Safonov via B4 Relay
tem architecture. Signed-off-by: Mohammad Nassiri [Added missing spaces in fail/ok messages and uint64_t cast in setsockopt-closed, as otherwise it was giving warnings on 64bit. And carried it to netdev ml] Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/self

[PATCH net-next 7/7] selftests/net: Add trace events matching to tcp_ao

2024-07-29 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Setup trace points, add a new ftrace instance in order to not interfere with the rest of the system, filtering by net namespace cookies. Raise a new background thread that parses trace_pipe, matches them with the list of expected events. Wir

[PATCH net-next v2 0/7] net/selftests: TCP-AO selftests updates

2024-08-02 Thread Dmitry Safonov via B4 Relay
-v1-0-15f31b7f3...@arista.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=33700a0c9b56 Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- Changes in v2: - Fixed two issues with parsing TCP-AO events: the socket state and TCP segment flags. Hopefully, won

[PATCH net-next v2 3/7] selftests/net: Be consistent in kconfig checks

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Most of the functions in tcp-ao lib/ return negative errno or -1 in case of a failure. That creates inconsistencies in lib/kconfig, which saves what was the error code. As well as the uninitialized kconfig value is -1, which also may be the resul

[PATCH net-next v2 1/7] selftests/net: Clean-up double assignment

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Correct copy'n'paste typo: the previous line already initialises get_all to 1. Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/dm6pr04mb4202bc58a9fd5bdd24a16e8ec5...@dm6pr04mb4202.namprd04.prod.outlook.com/ Signe

[PATCH net-next v2 5/7] selftests/tcp_ao: Fix printing format for uint64_t

2024-08-02 Thread Dmitry Safonov via B4 Relay
tem architecture. Signed-off-by: Mohammad Nassiri [Added missing spaces in fail/ok messages and uint64_t cast in setsockopt-closed, as otherwise it was giving warnings on 64bit. And carried it to netdev ml] Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/self

[PATCH net-next v2 2/7] selftests/net: Provide test_snprintf() helper

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Instead of pre-allocating a fixed-sized buffer of TEST_MSG_BUFFER_SIZE and printing into it, call vsnprintf() with str = NULL, which will return the needed size of the buffer. This hack is documented in man 3 vsnprintf. Essentially, in C++ terms,

[PATCH net-next v2 4/7] selftests/net: Don't forget to close nsfd after switch_save_ns()

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> The switch_save_ns() helper suppose to help switching to another namespace for some action and to return back to original namespace. The fd should be closed. Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/selftest

[PATCH net-next v2 6/7] selftests/net: Synchronize client/server before counters checks

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> On tests that are expecting failure the timeout value is TEST_RETRANSMIT_SEC == 1 second. Which is big enough for most of devices under tests. But on a particularly slow machine/VM, 1 second might be not enough for another thread to be schedul

[PATCH net-next v2 7/7] selftests/net: Add trace events matching to tcp_ao

2024-08-02 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Setup trace points, add a new ftrace instance in order to not interfere with the rest of the system, filtering by net namespace cookies. Raise a new background thread that parses trace_pipe, matches them with the list of expected events. Wir

[PATCH net 1/4] selftests/tcp_ao: Make RST tests less flaky

2024-04-12 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Currently, "active reset" cases are flaky, because select() is called for 3 sockets, while only 2 are expected to receive RST. The idea of the third socket was to get into request_sock_queue, but the test mistakenly attempted to con

[PATCH net 4/4] selftests/tcp_ao: Printing fixes to confirm with format-security

2024-04-12 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces > lib/setup.c: In function ‘__test_msg’: > lib/setup.c:20:9: error: format not a string literal and no format arguments > [-Werror=format-security] >20 |

[PATCH net 0/4] selftests/net/tcp_ao: A bunch of fixes for TCP-AO selftests

2024-04-12 Thread Dmitry Safonov via B4 Relay
Started as addressing the flakiness issues in rst_ipv*, that affect netdev dashboard. Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- Dmitry Safonov (4): selftests/tcp_ao: Make RST tests less flaky selftests/tcp_ao: Zero-init tcp_ao_info_opt selftests/tcp_ao: Fix

[PATCH net 2/4] selftests/tcp_ao: Zero-init tcp_ao_info_opt

2024-04-12 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> The structure is on the stack and has to be zero-initialized as the kernel checks for: > if (in.reserved != 0 || in.reserved2 != 0) > return -EINVAL; Fixes: b26660531cf6 ("selftests/net: Add test for TCP-AO add sets

[PATCH net 3/4] selftests/tcp_ao: Fix fscanf() call for format-security

2024-04-12 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces: > lib/proc.c: In function ‘netstat_read_type’: > lib/proc.c:89:9: error: format not a string literal and no format arguments > [-Werror=format-security] >

[PATCH net-next v3 0/8] net/selftests: TCP-AO selftests updates

2024-08-15 Thread Dmitry Safonov via B4 Relay
ps://lore.kernel.org/lkml/20240224-tcp-ao-tracepoints-v1-0-15f31b7f3...@arista.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=33700a0c9b56 Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- Changes in v3: - Corrected the selftests printing of tcp h

[PATCH net-next v3 2/8] selftests/net: Provide test_snprintf() helper

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Instead of pre-allocating a fixed-sized buffer of TEST_MSG_BUFFER_SIZE and printing into it, call vsnprintf() with str = NULL, which will return the needed size of the buffer. This hack is documented in man 3 vsnprintf. Essentially, in C++ terms,

[PATCH net-next v3 1/8] selftests/net: Clean-up double assignment

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Correct copy'n'paste typo: the previous line already initialises get_all to 1. Reported-by: Nassiri, Mohammad Closes: https://lore.kernel.org/all/dm6pr04mb4202bc58a9fd5bdd24a16e8ec5...@dm6pr04mb4202.namprd04.prod.outlook.com/ Signe

[PATCH net-next v3 6/8] selftests/tcp_ao: Fix printing format for uint64_t

2024-08-15 Thread Dmitry Safonov via B4 Relay
tem architecture. Signed-off-by: Mohammad Nassiri [Added missing spaces in fail/ok messages and uint64_t cast in setsockopt-closed, as otherwise it was giving warnings on 64bit. And carried it to netdev ml] Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/self

[PATCH net-next v3 3/8] selftests/net: Be consistent in kconfig checks

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Most of the functions in tcp-ao lib/ return negative errno or -1 in case of a failure. That creates inconsistencies in lib/kconfig, which saves what was the error code. As well as the uninitialized kconfig value is -1, which also may be the resul

[PATCH net-next v3 4/8] selftests/net: Open /proc/thread-self in open_netns()

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> It turns to be that open_netns() is called rarely from the child-thread and more often from parent-thread. Yet, on initialization of kconfig checks, either of threads may reach kconfig_lock mutex first. VRF-related checks do create a temprary ksft

[PATCH net-next v3 8/8] selftests/net: Add trace events matching to tcp_ao

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Setup trace points, add a new ftrace instance in order to not interfere with the rest of the system, filtering by net namespace cookies. Raise a new background thread that parses trace_pipe, matches them with the list of expected events. Wir

[PATCH net-next v3 5/8] selftests/net: Don't forget to close nsfd after switch_save_ns()

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> The switch_save_ns() helper suppose to help switching to another namespace for some action and to return back to original namespace. The fd should be closed. Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com> --- tools/testing/selftest

[PATCH net-next v3 7/8] selftests/net: Synchronize client/server before counters checks

2024-08-15 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> On tests that are expecting failure the timeout value is TEST_RETRANSMIT_SEC == 1 second. Which is big enough for most of devices under tests. But on a particularly slow machine/VM, 1 second might be not enough for another thread to be schedul

[PATCH net-next v4 2/8] selftests/net: Provide test_snprintf() helper

2024-08-23 Thread Dmitry Safonov via B4 Relay
From: Dmitry Safonov <0x7f454...@gmail.com> Instead of pre-allocating a fixed-sized buffer of TEST_MSG_BUFFER_SIZE and printing into it, call vsnprintf() with str = NULL, which will return the needed size of the buffer. This hack is documented in man 3 vsnprintf. Essentially, in C++ terms,

  1   2   >