selftests: net: test SO_PRIORITY ancillary data with cmsg_sender
authorAnna Emese Nyiri <annaemesenyiri@gmail.com>
Fri, 13 Dec 2024 08:44:56 +0000 (09:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Dec 2024 02:14:12 +0000 (18:14 -0800)
commitcda7d5abe089cc8bd6d623cd6577627d8125d155
tree3422f7fd5f941de058f133fec9af9a157a323e3e
parenta32f3e9d1ed146f81162702605d65447a319eb76
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 <willemb@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Suggested-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com>
Link: https://patch.msgid.link/20241213084457.45120-4-annaemesenyiri@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/cmsg_sender.c
tools/testing/selftests/net/cmsg_so_priority.sh [new file with mode: 0755]