From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F05143866; Mon, 8 Jan 2024 17:40:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E382406B8; Mon, 8 Jan 2024 17:40:15 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id EED95406B7 for ; Mon, 8 Jan 2024 17:40:13 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6daf9d5f111so798648b3a.0 for ; Mon, 08 Jan 2024 08:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704732013; x=1705336813; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5/FFxN7WmRyiSPHEix1JPqscd4xaXI0ijrW8nvCOAIE=; b=FK9ZFJNHf03p6rIf410Lev2LoTKplLufmx9Kt+ft8PFJ5nnQR+do7YGII0aHKG9GIh rEZ848/kZ/nzt+8YXNjLvseD6gequ84ljLfzeVhEH0VAspZR+fZSIy/hBuMVlIkMNyMR ODx2ja9cJBWpz4VGLDtMTQuGjszK5dvGG5FP4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704732013; x=1705336813; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5/FFxN7WmRyiSPHEix1JPqscd4xaXI0ijrW8nvCOAIE=; b=q2gfWWBDJGHyOci8cQCWRB4J6ECJi9etKbLKocvi70KncdnQpZEyc1igYIS/IOmkwv zCSevYZAH7mnpSUjbG3JYqQOYD61AUObU5Nab/4+kLLoHFmUzKtpx8v/cG4qVTI8UzDb sVXHd0iiMduMBFbI44trZMASovA+gpLDv5e1VVqtWcbVSp4b+5wPjH65ciAFdJ1aVag6 MWX94DrOYHQzlQLpSgaD1rytmvMUPNrLIEMQ4Z/XkS8LsRbyBAscSOPAyAJw0yGIfEKZ tPend4Lf3R1i5uqxX8dC5K2ZBcIM4461xycj6T0Fpa6a3SK3bYf4KKx7M/jU4GWktG+v BldQ== X-Gm-Message-State: AOJu0YxYr2dUPO1Us0Of+Cp5zjCePR9aJzHnG5IDnAJV4jjDbspHLIue GUZgZTyrb/3ZN0yDdOb/vPiBXa2QAoGJPQXn2v1d497fMNJR/g== X-Google-Smtp-Source: AGHT+IFMrT88rrXfRqsecfaTVS7RxgW/lxpIfsllTjsIbMemKZXX+BQDXbHkuke32QLOMdmpa3jlq7JJFYjXB403y94= X-Received: by 2002:a05:6a20:3955:b0:199:4625:e24e with SMTP id r21-20020a056a20395500b001994625e24emr4431067pzg.29.1704732013194; Mon, 08 Jan 2024 08:40:13 -0800 (PST) MIME-Version: 1.0 References: <20240103221217.18954-1-jspewock@iol.unh.edu> <20240103223206.23129-1-jspewock@iol.unh.edu> <20240103223206.23129-4-jspewock@iol.unh.edu> In-Reply-To: From: Jeremy Spewock Date: Mon, 8 Jan 2024 11:40:02 -0500 Message-ID: Subject: Re: [PATCH v6 3/7] dts: add optional packet filtering to scapy sniffer To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net, wathsala.vithanage@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, lylavoie@iol.unh.edu, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000015817d060e71da59" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --00000000000015817d060e71da59 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 8, 2024 at 11:39=E2=80=AFAM Jeremy Spewock wrote: > > > On Mon, Jan 8, 2024 at 7:01=E2=80=AFAM Juraj Linke=C5=A1 > wrote: > >> On Wed, Jan 3, 2024 at 11:33=E2=80=AFPM wrote: >> > >> > From: Jeremy Spewock >> > >> > 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 te= st >> > cases. >> > >> > Signed-off-by: Jeremy Spewock >> > --- >> > 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(-) >> > >> >> >> >> > diff --git >> a/dts/framework/testbed_model/traffic_generator/capturing_traffic_genera= tor.py >> b/dts/framework/testbed_model/traffic_generator/capturing_traffic_genera= tor.py >> > index 0246590333..c1c9facedd 100644 >> > --- >> a/dts/framework/testbed_model/traffic_generator/capturing_traffic_genera= tor.py >> > +++ >> b/dts/framework/testbed_model/traffic_generator/capturing_traffic_genera= tor.py >> >> > @@ -26,6 +27,19 @@ def _get_default_capture_name() -> str: >> > return str(uuid.uuid4()) >> > >> > >> > +@dataclass(slots=3DTrue) >> >> 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. --00000000000015817d060e71da59 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jan 8, 2024 at 11:39=E2=80=AFA= M Jeremy Spewock <jspewock@iol.u= nh.edu> wrote:


On Mon, Jan 8, 2024 at 7:01=E2=80=AFAM Juraj Linke=C5=A1= <juraj.linkes@pantheon.tech> wrote:
On Wed, Jan 3, 2024 at 11:33=E2=80=AFPM <jspewock@iol.unh.edu<= /a>> wrote:
>
> From: Jeremy Spewock <
jspewock@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 te= st
> cases.
>
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> ---
>=C2=A0 dts/framework/test_suite.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 15 +++++++++--
>=C2=A0 dts/framework/testbed_model/tg_node.py=C2=A0 =C2=A0 =C2=A0 =C2= =A0 | 14 ++++++++--
>=C2=A0 .../traffic_generator/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 7 ++++-
>=C2=A0 .../capturing_traffic_generator.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 | 22 ++++++++++++++-
>=C2=A0 .../testbed_model/traffic_generator/scapy.py=C2=A0 | 27 ++++++++= +++++++++++
>=C2=A0 5 files changed, 79 insertions(+), 6 deletions(-)
>

<snip>

> diff --git a/dts/framework/testbed_model/traffic_generator/capturing_t= raffic_generator.py b/dts/framework/testbed_model/traffic_generator/capturi= ng_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:
>=C2=A0 =C2=A0 =C2=A0 return str(uuid.uuid4())
>
>
> +@dataclass(slots=3DTrue)

This should also be frozen. If we need a different filter, it's better<= br> to create a new object I think.

This is also a good point, I'l= l make this change as well.
--00000000000015817d060e71da59--