public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
	"Robin Jarry" <rjarry@redhat.com>
Cc: <dev@dpdk.org>
Subject: RE: [PATCH dpdk v2] net/tap: add software MAC address filtering
Date: Sat, 21 Mar 2026 06:48:38 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F657AC@smartserver.smartshare.dk> (raw)
In-Reply-To: <20260320195824.341323ae@phoenix.local>

> On Fri, 20 Mar 2026 17:45:24 +0100
> Robin Jarry <rjarry@redhat.com> wrote:
> 
> > +	dst = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
> > +
> > +	if (likely(rte_is_unicast_ether_addr(dst))) {

The NULL addr check should go here:
    if (unlikely(rte_is_zero_ether_addr(dst)))
        return false; /* Invalid destination address in packet */

> > +		for (i = 0; i < TAP_MAX_MAC_ADDRS; i++) {
> > +			if (rte_is_same_ether_addr(dst, &data->mac_addrs[i]))
> > +				return true;
> > +		}
> > +		return false;
> > +	}
> 
> Since unused slots are zero, probably need to drop packets with all
> zero dest.

You should drop packets with NULL dst addr; it is not allowed on the wire.

Alternatively, you can put the broadcast address in the unused entries in the mac_addrs table; it will not match any unicast ether addr.


  reply	other threads:[~2026-03-21  5:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 22:10 [PATCH dpdk] net/tap: add software MAC address filtering Robin Jarry
2026-03-19 22:43 ` Stephen Hemminger
2026-03-20  8:26   ` Robin Jarry
2026-03-20 10:10 ` Morten Brørup
2026-03-20 16:45 ` [PATCH dpdk v2] " Robin Jarry
2026-03-21  2:58   ` Stephen Hemminger
2026-03-21  5:48     ` Morten Brørup [this message]
2026-03-21 14:48 ` [PATCH dpdk v3] " Robin Jarry
2026-03-21 17:06   ` Stephen Hemminger
2026-03-21 23:20   ` Stephen Hemminger
2026-03-23  8:42 ` [PATCH dpdk v4] " Robin Jarry
2026-03-23 18:52   ` Stephen Hemminger
2026-03-24 19:09 ` [PATCH dpdk v5] " Robin Jarry
2026-03-25 16:40   ` Stephen Hemminger
2026-03-26  9:15     ` Robin Jarry

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=98CBD80474FA8B44BF855DF32C47DC35F657AC@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=rjarry@redhat.com \
    --cc=stephen@networkplumber.org \
    /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