|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6 |
|
| #
0922cb68 |
| 07-Mar-2025 |
Willem de Bruijn <[email protected]> |
selftests/net: expand cmsg_ip with MSG_MORE
UDP send with MSG_MORE takes a slightly different path than the lockless fast path.
For completeness, add coverage to this case too.
Pass MSG_MORE on th
selftests/net: expand cmsg_ip with MSG_MORE
UDP send with MSG_MORE takes a slightly different path than the lockless fast path.
For completeness, add coverage to this case too.
Pass MSG_MORE on the initial sendmsg, then follow up with a zero byte write to unplug the cork.
Unrelated: also add two missing endlines in usage().
Signed-off-by: Willem de Bruijn <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc5 |
|
| #
2e5584e0 |
| 25-Feb-2025 |
Willem de Bruijn <[email protected]> |
selftests/net: expand cmsg_ipv6.sh with ipv4
Expand IPV6_TCLASS to also cover IP_TOS. Expand IPV6_HOPLIMIT to also cover IP_TTL.
Expand csmg_sender.c to allow setting IPv4 setsockopts. Also rename
selftests/net: expand cmsg_ipv6.sh with ipv4
Expand IPV6_TCLASS to also cover IP_TOS. Expand IPV6_HOPLIMIT to also cover IP_TTL.
Expand csmg_sender.c to allow setting IPv4 setsockopts. Also rename struct v6 to cmsg to match its expanded scope. Don't bother updating all occurrences of tclass and hoplimit.
Rename cmsg_ipv6.sh to cmsg_ip.sh to match the expanded scope.
Be careful around the subtle API difference between TCLASS and TOS. IP_TOS includes ECN bits. Add a test to verify that these are masked when making routing decisions.
Diff is more concise with --word-diff
Signed-off-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3 |
|
| #
cda7d5ab |
| 13-Dec-2024 |
Anna Emese Nyiri <[email protected]> |
selftests: net: test SO_PRIORITY ancillary data with cmsg_sender
Extend cmsg_sender.c with a new option '-Q' to send SO_PRIORITY ancillary data.
cmsg_so_priority.sh script added to validate SO_PRIO
selftests: net: test SO_PRIORITY ancillary data with cmsg_sender
Extend cmsg_sender.c with a new option '-Q' to send SO_PRIORITY ancillary data.
cmsg_so_priority.sh script added to validate SO_PRIORITY behavior by creating VLAN device with egress QoS mapping and testing packet priorities using flower filters. Verify that packets with different priorities are correctly matched and counted by filters for multiple protocols and IP versions.
Reviewed-by: Willem de Bruijn <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Suggested-by: Ido Schimmel <[email protected]> Signed-off-by: Anna Emese Nyiri <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9 |
|
| #
b9d5f571 |
| 10-May-2024 |
Jakub Kicinski <[email protected]> |
selftests: net: increase the delay for relative cmsg_time.sh test
Slow machines can delay scheduling of the packets for milliseconds. Increase the delay to 8ms if KSFT_MACHINE_SLOW. Try to limit the
selftests: net: increase the delay for relative cmsg_time.sh test
Slow machines can delay scheduling of the packets for milliseconds. Increase the delay to 8ms if KSFT_MACHINE_SLOW. Try to limit the variability by moving setsockopts earlier (before we read time).
This fixes the "TXTIME rel" failures on debug kernels, like:
Case ICMPv4 - TXTIME rel returned '', expected 'OK'
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
2d3b8dfd |
| 10-May-2024 |
Jakub Kicinski <[email protected]> |
selftests: net: fix timestamp not arriving in cmsg_time.sh
On slow machines the SND timestamp sometimes doesn't arrive before we quit. The test only waits as long as the packet delay, so it's easy f
selftests: net: fix timestamp not arriving in cmsg_time.sh
On slow machines the SND timestamp sometimes doesn't arrive before we quit. The test only waits as long as the packet delay, so it's easy for a race condition to happen.
Double the wait but do a bit of polling, once the SND timestamp arrives there's no point to wait any longer.
This fixes the "TXTIME abs" failures on debug kernels, like:
Case ICMPv4 - TXTIME abs returned '', expected 'OK'
Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3 |
|
| #
7b29828c |
| 24-Nov-2023 |
Willem de Bruijn <[email protected]> |
selftests/net: fix a char signedness issue
Signedness of char is signed on x86_64, but unsigned on arm64.
Fix the warning building cmsg_sender.c on signed platforms or forced with -fsigned-char:
selftests/net: fix a char signedness issue
Signedness of char is signed on x86_64, but unsigned on arm64.
Fix the warning building cmsg_sender.c on signed platforms or forced with -fsigned-char:
msg_sender.c:455:12: error: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion] buf[0] = ICMPV6_ECHO_REQUEST;
constant ICMPV6_ECHO_REQUEST is 128.
Link: https://lwn.net/Articles/911914 Fixes: de17e305a810 ("selftests: net: cmsg_sender: support icmp and raw sockets") Signed-off-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc2 |
|
| #
a0bc96c0 |
| 16-Nov-2023 |
Willem de Bruijn <[email protected]> |
selftests: net: verify fq per-band packet limit
Commit 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") introduces multiple traffic bands, and per-band maximum packet count.
Per-b
selftests: net: verify fq per-band packet limit
Commit 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") introduces multiple traffic bands, and per-band maximum packet count.
Per-band limits ensures that packets in one class cannot fill the entire qdisc and so cause DoS to the traffic in the other classes.
Verify this behavior: 1. set the limit to 10 per band 2. send 20 pkts on band A: verify that 10 are queued, 10 dropped 3. send 20 pkts on band A: verify that 0 are queued, 20 dropped 4. send 20 pkts on band B: verify that 10 are queued, 10 dropped
Packets must remain queued for a period to trigger this behavior. Use SO_TXTIME to store packets for 100 msec.
The test reuses existing upstream test infra. The script is a fork of cmsg_time.sh. The scripts call cmsg_sender.
The test extends cmsg_sender with two arguments:
* '-P' SO_PRIORITY There is a subtle difference between IPv4 and IPv6 stack behavior: PF_INET/IP_TOS sets IP header bits and sk_priority PF_INET6/IPV6_TCLASS sets IP header bits BUT NOT sk_priority
* '-n' num pkts Send multiple packets in quick succession. I first attempted a for loop in the script, but this is too slow in virtualized environments, causing flakiness as the 100ms timeout is reached and packets are dequeued.
Also do not wait for timestamps to be queued unless timestamps are requested.
Signed-off-by: Willem de Bruijn <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2 |
|
| #
1573c688 |
| 29-Dec-2022 |
Po-Hsu Lin <[email protected]> |
selftests: net: fix cmsg_so_mark.sh test hang
This cmsg_so_mark.sh test will hang on non-amd64 systems because of the infinity loop for argument parsing in cmsg_sender.
Variable "o" in cs_parse_arg
selftests: net: fix cmsg_so_mark.sh test hang
This cmsg_so_mark.sh test will hang on non-amd64 systems because of the infinity loop for argument parsing in cmsg_sender.
Variable "o" in cs_parse_args() for taking getopt() should be an int, otherwise it will be 255 when getopt() returns -1 on non-amd64 system and thus causing infinity loop.
Link: https://lore.kernel.org/lkml/CA+G9fYsM2k7mrF7W4V_TrZ-qDauWM394=8yEJ=-t1oUg8_40YA@mail.gmail.com/t/ Signed-off-by: Po-Hsu Lin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5 |
|
| #
dbdd9a28 |
| 01-Jul-2022 |
Li kunyu <[email protected]> |
net/cmsg_sender: Remove a semicolon
Remove the repeated ';' from code.
Signed-off-by: Li kunyu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
|
|
Revision tags: v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17 |
|
| #
1abea24a |
| 16-Mar-2022 |
Guo Zhengkui <[email protected]> |
selftests: net: fix array_size.cocci warning
Fix array_size.cocci warning in tools/testing/selftests/net.
Use `ARRAY_SIZE(arr)` instead of forms like `sizeof(arr)/sizeof(arr[0])`.
It has been test
selftests: net: fix array_size.cocci warning
Fix array_size.cocci warning in tools/testing/selftests/net.
Use `ARRAY_SIZE(arr)` instead of forms like `sizeof(arr)/sizeof(arr[0])`.
It has been tested with gcc (Debian 8.3.0-6) 8.3.0.
Signed-off-by: Guo Zhengkui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5 |
|
| #
a22982c3 |
| 17-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: basic test for IPV6_2292*
Add a basic test to make sure ping sockets don't crash with IPV6_2292* options.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Mil
selftests: net: basic test for IPV6_2292*
Add a basic test to make sure ping sockets don't crash with IPV6_2292* options.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
05ae83d5 |
| 17-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: test IPV6_HOPLIMIT
Test setting IPV6_HOPLIMIT via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case HOPLIMIT ICMP cmsg - packet data
selftests: net: test IPV6_HOPLIMIT
Test setting IPV6_HOPLIMIT via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case HOPLIMIT ICMP cmsg - packet data returned 1, expected 0 Case HOPLIMIT ICMP diff - packet data returned 1, expected 0
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
9657ad09 |
| 17-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: test IPV6_TCLASS
Test setting IPV6_TCLASS via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case TCLASS ICMP cmsg - packet data return
selftests: net: test IPV6_TCLASS
Test setting IPV6_TCLASS via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case TCLASS ICMP cmsg - packet data returned 1, expected 0 Case TCLASS ICMP cmsg - rejection returned 0, expected 1 Case TCLASS ICMP diff - pass returned 1, expected 0 Case TCLASS ICMP diff - packet data returned 1, expected 0 Case TCLASS ICMP diff - rejection returned 0, expected 1
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
6f97c7c6 |
| 17-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: test IPV6_DONTFRAG
Test setting IPV6_DONTFRAG via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case DONTFRAG ICMP setsock returned
selftests: net: test IPV6_DONTFRAG
Test setting IPV6_DONTFRAG via setsockopt and cmsg across socket types.
Output without the kernel support (this series):
Case DONTFRAG ICMP setsock returned 0, expected 1 Case DONTFRAG ICMP cmsg returned 0, expected 1 Case DONTFRAG ICMP both returned 0, expected 1 Case DONTFRAG ICMP diff returned 0, expected 1 FAIL - 4/24 cases failed
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
12d8c111 |
| 14-Feb-2022 |
Colin Ian King <[email protected]> |
selftests: net: cmsg_sender: Fix spelling mistake "MONOTINIC" -> "MONOTONIC"
There is a spelling mistake in an error message. Fix it.
Signed-off-by: Colin Ian King <[email protected]> Signed-o
selftests: net: cmsg_sender: Fix spelling mistake "MONOTINIC" -> "MONOTONIC"
There is a spelling mistake in an error message. Fix it.
Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc4 |
|
| #
eb8f3116 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: cmsg_sender: support Tx timestamping
Support requesting Tx timestamps:
$ ./cmsg_sender -p i -t -4 $tgt 123 -d 1000 SCHED ts0 61us SND ts0 1071us
Signed-off-by: Jakub Kicinski
selftests: net: cmsg_sender: support Tx timestamping
Support requesting Tx timestamps:
$ ./cmsg_sender -p i -t -4 $tgt 123 -d 1000 SCHED ts0 61us SND ts0 1071us
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
4d397424 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: cmsg_sender: support setting SO_TXTIME
Add ability to send delayed packets.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
|
| #
9bbfbc92 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: cmsg_so_mark: test with SO_MARK set by setsockopt
Test if setting SO_MARK with setsockopt works and if cmsg takes precedence over it.
Signed-off-by: Jakub Kicinski <[email protected]>
selftests: net: cmsg_so_mark: test with SO_MARK set by setsockopt
Test if setting SO_MARK with setsockopt works and if cmsg takes precedence over it.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
de17e305 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: cmsg_sender: support icmp and raw sockets
Support sending fake ICMP(v6) messages and UDP via RAW sockets.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Mil
selftests: net: cmsg_sender: support icmp and raw sockets
Support sending fake ICMP(v6) messages and UDP via RAW sockets.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
49b78613 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: make cmsg_so_mark ready for more options
Parametrize the code so that it can support UDP and ICMP sockets in the future, and more cmsg types.
Signed-off-by: Jakub Kicinski <kuba@ker
selftests: net: make cmsg_so_mark ready for more options
Parametrize the code so that it can support UDP and ICMP sockets in the future, and more cmsg types.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
a086ee24 |
| 10-Feb-2022 |
Jakub Kicinski <[email protected]> |
selftests: net: rename cmsg_so_mark
Rename the file in prep for generalization.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
|