On 6/25/24 22:51, Adrian Moreno wrote:
Add a test to verify sampling packets via psample works.
In order to do that, create a subcommand in ovs-dpctl.py to listen to on the psample multicast group and print samples.
Signed-off-by: Adrian Moreno amorenoz@redhat.com
.../selftests/net/openvswitch/openvswitch.sh | 114 +++++++++++++++++- .../selftests/net/openvswitch/ovs-dpctl.py | 73 ++++++++++- 2 files changed, 181 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 15bca0708717..aeb9bee772be 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -20,7 +20,8 @@ tests=" nat_related_v4 ip4-nat-related: ICMP related matches work with SNAT netlink_checks ovsnl: validate netlink attrs and settings upcall_interfaces ovs: test the upcall interfaces
- drop_reason drop: test drop reasons are emitted"
- drop_reason drop: test drop reasons are emitted
- emit_sample emit_sample: Sampling packets with psample"
There is an extra space character right after emit_sample word. This makes './openvswitch.sh emit_sample' to not run the test, because 'emit_sample' != 'emit_sample '.
Best regards, Ilya Maximets.