DPDK patches and discussions
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, Paul Szczepanek <paul.szczepanek@arm.com>
Subject: Re: [PATCH] dts: add ICMP to packet filter config
Date: Thu, 17 Apr 2025 08:46:57 -0400	[thread overview]
Message-ID: <CAJvnSUB7-HRHNKC7YGqhyMo9tBN7X-qC4+P8kzgaUSS1c-GKhA@mail.gmail.com> (raw)
In-Reply-To: <20250415094923.487014-1-luca.vizzarro@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]

On Tue, Apr 15, 2025 at 5:51 AM Luca Vizzarro <luca.vizzarro@arm.com> wrote:

> NICs like the Intel E810-C often produce ICMP packets. These packets
> are stray and can interfere with testing. Therefore, add an ICMP
> filtering option in the packet filter.
>

Okay, this sounds harmless. But, is Paul okay with this approach? My
understanding is that he wants the testsuites to be written such that they
don't require that the wire is "quiet" from LLDP, ICMP etc.


>
>
> @@ -234,10 +237,23 @@ def _set_packet_filter(self, filter_config:
> PacketFilteringConfig):
>
>          def _filter(packet: Packet) -> bool:
>              if ether := packet.getlayer(Ether):
> -                if filter_config.no_arp and ether.type == 0x0806:
> +                if filter_config.no_arp and ether.type == ETHER_TYPES.ARP:
>                      return False
>
> -                if filter_config.no_lldp and ether.type == 0x88CC:
> +                if filter_config.no_lldp and ether.type ==
> ETHER_TYPES.LLDP:
> +                    return False
> +
> +            if ipv4 := packet.getlayer(IP):
> +                if filter_config.no_icmp and ipv4.proto == IP_PROTOS.icmp:
> +                    return False
> +
> +            if ipv6 := packet.getlayer(IPv6):
> +                next_header = ipv6.nh
> +
> +                if next_header == IP_PROTOS.hopopt:
> +                    next_header = ipv6.payload.nh
> +
> +                if filter_config.no_icmp and next_header ==
> IP_PROTOS.ipv6_icmp:
>                      return False
>
>              return True
> --
> 2.43.0
>
>
^Looks good, thanks.

Reviewed-By: Patrick Robb <probb@iol.unh.edu>

[-- Attachment #2: Type: text/html, Size: 2508 bytes --]

      reply	other threads:[~2025-04-17 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15  9:48 Luca Vizzarro
2025-04-17 12:46 ` Patrick Robb [this message]

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=CAJvnSUB7-HRHNKC7YGqhyMo9tBN7X-qC4+P8kzgaUSS1c-GKhA@mail.gmail.com \
    --to=probb@iol.unh.edu \
    --cc=dev@dpdk.org \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).