public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [PATCH v1] dts: only sniff inbound packets
@ 2026-03-10 17:10 Patrick Robb
  2026-03-10 17:25 ` Andrew Bailey
  2026-03-11 16:20 ` Luca Vizzarro
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Robb @ 2026-03-10 17:10 UTC (permalink / raw)
  To: luca.vizzarro
  Cc: dev, abailey, dmarx, Paul.Szczepanek, manjunathgouda.hosamani,
	thomas, Patrick Robb

Add a filter to the Scapy traffic generator sniffer which
forces the sniffer to ignore outbound traffic, preventing
double counting of packets. Without this change sniffing
will double count packets when DTS is being run with a
single link topology, because the Scapy packet transmission
and Scapy sniffing is happening on the same port. The
correct behavior is to only count inbound traffic which is
being returned to the traffic generator by the DTS SUT.

Fixes: dfb667368077 ("dts: add Scapy asynchronous sniffer")

Signed-off-by: Patrick Robb <probb@iol.unh.edu>
---
 dts/framework/testbed_model/traffic_generator/scapy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dts/framework/testbed_model/traffic_generator/scapy.py b/dts/framework/testbed_model/traffic_generator/scapy.py
index 9e15a31c00..c6e9006205 100644
--- a/dts/framework/testbed_model/traffic_generator/scapy.py
+++ b/dts/framework/testbed_model/traffic_generator/scapy.py
@@ -203,7 +203,7 @@ def _sniff(self, recv_port: Port) -> None:
         ready_prompt = "Ready."
         self.send_command(
             "sniff("
-            f'iface="{recv_port.logical_name}", quiet=True, store=False, '
+            f'iface="{recv_port.logical_name}", filter="inbound", quiet=True, store=False, '
             "prn=lambda p: bytes_base64(p.build()).decode(), "
             f'started_callback=lambda: print("{ready_prompt}")'
             ")",
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-11 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 17:10 [PATCH v1] dts: only sniff inbound packets Patrick Robb
2026-03-10 17:25 ` Andrew Bailey
2026-03-11 16:20 ` Luca Vizzarro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox