public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: luca.vizzarro@arm.com
Cc: dev@dpdk.org, abailey@iol.unh.edu, dmarx@iol.unh.edu,
	Paul.Szczepanek@arm.com, manjunathgouda.hosamani@intel.com,
	thomas@monjalon.net, Patrick Robb <probb@iol.unh.edu>
Subject: [PATCH v1] dts: only sniff inbound packets
Date: Tue, 10 Mar 2026 13:10:28 -0400	[thread overview]
Message-ID: <20260310171028.15441-1-probb@iol.unh.edu> (raw)

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


             reply	other threads:[~2026-03-10 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 17:10 Patrick Robb [this message]
2026-03-10 17:25 ` [PATCH v1] dts: only sniff inbound packets Andrew Bailey
2026-03-11 16:20 ` Luca Vizzarro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260310171028.15441-1-probb@iol.unh.edu \
    --to=probb@iol.unh.edu \
    --cc=Paul.Szczepanek@arm.com \
    --cc=abailey@iol.unh.edu \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=luca.vizzarro@arm.com \
    --cc=manjunathgouda.hosamani@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox