[PATCH v6 3/7] dts: add optional packet filtering to scapy sniffer

Jeremy Spewock jspewock at iol.unh.edu
Mon Jan 8 17:40:02 CET 2024


On Mon, Jan 8, 2024 at 11:39 AM Jeremy Spewock <jspewock at iol.unh.edu> wrote:

>
>
> On Mon, Jan 8, 2024 at 7:01 AM Juraj Linkeš <juraj.linkes at pantheon.tech>
> wrote:
>
>> On Wed, Jan 3, 2024 at 11:33 PM <jspewock at iol.unh.edu> wrote:
>> >
>> > From: Jeremy Spewock <jspewock at iol.unh.edu>
>> >
>> > Added the options to filter out LLDP and ARP packets when
>> > sniffing for packets with scapy. This was done using BPF filters to
>> > ensure that the noise these packets provide does not interfere with test
>> > cases.
>> >
>> > Signed-off-by: Jeremy Spewock <jspewock at iol.unh.edu>
>> > ---
>> >  dts/framework/test_suite.py                   | 15 +++++++++--
>> >  dts/framework/testbed_model/tg_node.py        | 14 ++++++++--
>> >  .../traffic_generator/__init__.py             |  7 ++++-
>> >  .../capturing_traffic_generator.py            | 22 ++++++++++++++-
>> >  .../testbed_model/traffic_generator/scapy.py  | 27 +++++++++++++++++++
>> >  5 files changed, 79 insertions(+), 6 deletions(-)
>> >
>>
>> <snip>
>>
>> > diff --git
>> a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
>> b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
>> > index 0246590333..c1c9facedd 100644
>> > ---
>> a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
>> > +++
>> b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
>> <snip>
>> > @@ -26,6 +27,19 @@ def _get_default_capture_name() -> str:
>> >      return str(uuid.uuid4())
>> >
>> >
>> > + at dataclass(slots=True)
>>
>> This should also be frozen. If we need a different filter, it's better
>> to create a new object I think.
>>
>> This is also a good point, I'll make this change as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20240108/38e96bbc/attachment-0001.htm>


More information about the dev mailing list