[PATCH v1] dts: only sniff inbound packets
Andrew Bailey
abailey at iol.unh.edu
Tue Mar 10 18:25:42 CET 2026
Tested-by: Andrew Bailey <abailey at iol.unh.edu>
Reviewed-by: Andrew Bailey <abailey at iol.unh.edu>
On Tue, Mar 10, 2026 at 1:13 PM Patrick Robb <probb at iol.unh.edu> wrote:
> 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 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20260310/31c4b657/attachment.htm>
More information about the dev
mailing list