From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Anurag Mandal" <anurag.mandal@intel.com>, <dev@dpdk.org>,
<bruce.richardson@intel.com>, <anatoly.burakov@intel.com>,
<thomas@monjalon.net>, <andrew.rybchenko@oktetlabs.ru>
Subject: RE: [PATCH v2] net/ice: add MAC anti-spoof option
Date: Sun, 16 Nov 2025 08:43:54 +0100 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65562@smartserver.smartshare.dk> (raw)
In-Reply-To: <20251116035749.45922-1-anurag.mandal@intel.com>
+TO: Ethdev maintainers, regarding new Ethdev APIs
> From: Anurag Mandal [mailto:anurag.mandal@intel.com]
> Sent: Sunday, 16 November 2025 04.58
>
> VRRP advertisement packets are dropped as TX-errors upon transmission
> from
> a vsi of ice PF due to MAC anti-spoof check which is enabled by
> default.
> There is no way to disable this check in the Tx direction to avoid
> these packets being dropped.
>
> This patch introduces devargs "mac-anti-spoof" to allow user to
> disable MAC anti-spoof check. Disable MAC Anti-spoof check
> in the Tx direction to avoid getting dropped as TX-errors upon packet
> transmission when their source MAC address matches one of the MAC
> addresses assigned to that same NIC port.
>
> Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
> ---
This is the same story as with Source Prune.
Please disable source-prune filtering by default, and provide an option to enable it.
Also, suggest shortening the devargs name to simply "anti-spoof", like "source-prune"; they both operate on MAC basis.
Let's make something generic instead, to replace those silly devargs.
We have individual Ethdev APIs to enable/disable various Rx filtering, e.g. "promiscuous", "all multicast".
Obviously, we don't want to introduce new APIs for every semi-exotic filter any NIC may offer, like "source prune" and "anti spoof", but we could introduce a set of generic Ethdev APIs to support filters such as these, using a bitfield enum. E.g.:
/* Enable one or more filters. */
int rte_ethdev_filter_enable(uin16_t port_id, uint64_t filter);
/* Disable one or more filters. */
int rte_ethdev_filter_disable(uin16_t port_id, uint64_t filter);
/* Get bit field of filters enabled. */
int64_t rte_ethdev_filter_get(uin16_t port_id);
/* Get bit field of filters supported by device. */
int64_t rte_ethdev_filter_capa(uin16_t port_id); /**/
/** Destination MAC must match NIC's MAC address.
* (This is the inverse of Promiscuous.)
* Default enabled.
*/
#define RTE_ETH_FILTER_RX_NON_PROMISC RTE_BIT64(0)
/** Multicast Hash.
* (This is the inverse of All Multicast.)
* Default enabled.
*/
#define RTE_ETH_FILTER_RX_MULTICAST RTE_BIT64(1)
/** Source Prune.
* [Insert description here.]
*/
#define RTE_ETH_FILTER_RX_SOURCE_PRUNE RTE_BIT64(2)
/* Add new Rx filters here, in increasing order. */
/* Add new Tx filters here, in decreasing order. */
/** Anti-Spoof.
* [Insert description here.]
*/
#define RTE_ETH_FILTER_RX_SOURCE_PRUNE RTE_BIT64(62)
/** Used for error return values which are negative. */
#define RTE_ETH_FILTER_ERROR RTE_BIT64(63)
prev parent reply other threads:[~2025-11-16 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 10:59 [PATCH] net/ice: add MAC anti-spoof disable option Anurag Mandal
2025-11-13 11:35 ` Bruce Richardson
2025-11-16 3:57 ` [PATCH v2] net/ice: add MAC anti-spoof option Anurag Mandal
2025-11-16 7:43 ` Morten Brørup [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=98CBD80474FA8B44BF855DF32C47DC35F65562@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=anatoly.burakov@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=anurag.mandal@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--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;
as well as URLs for NNTP newsgroup(s).