* [PATCH 1/2] net/i40e: fix MAC address removal
@ 2026-09-04 12:16 David Marchand
2026-09-04 12:16 ` [PATCH 2/2] net/bnxt: " David Marchand
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: David Marchand @ 2026-09-04 12:16 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I could not test the change as my setups are KO atm.
Probably worth squashing in 9de506a6c781 before pulling to main
---
drivers/net/intel/i40e/i40e_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..5bc3c22def 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4513,7 +4513,11 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
macaddr = &(data->mac_addrs[index]);
- pool_sel = dev->data->mac_pool_sel[index];
+ vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = dev->data->mac_pool_sel[index];
for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
if (pool_sel & RTE_BIT64(i)) {
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/2] net/bnxt: fix MAC address removal
2026-09-04 12:16 [PATCH 1/2] net/i40e: fix MAC address removal David Marchand
@ 2026-09-04 12:16 ` David Marchand
2026-09-04 13:08 ` [PATCH 1/2] net/i40e: " David Marchand
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2026-09-04 12:16 UTC (permalink / raw)
To: dev; +Cc: Kishore Padmanabha, Ajit Khaparde, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I could not test the change as I don't have this NIC.
Probably worth squashing in 9de506a6c781 before pulling to main
---
drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c6f566c214..d37e2d16c9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2019,14 +2019,21 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
uint32_t index)
{
struct bnxt *bp = eth_dev->data->dev_private;
- uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
+ uint64_t pool_mask;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
uint32_t i;
+ bool vmdq;
if (is_bnxt_in_error(bp))
return;
+ vmdq = (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = eth_dev->data->mac_pool_sel[index];
+
/*
* Loop through all VNICs from the specified filter flow pools to
* remove the corresponding MAC addr filter
@@ -4540,6 +4547,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
uint64_t pool_mask;
uint32_t pool = 0;
uint32_t i;
+ bool vmdq;
int rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
@@ -4549,6 +4557,8 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
if (rc)
return rc;
+ vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+
/* replay MAC address configuration */
for (i = 1; i < dev_info.max_mac_addrs; i++) {
addr = &dev->data->mac_addrs[i];
@@ -4558,7 +4568,10 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
continue;
pool = 0;
- pool_mask = dev->data->mac_pool_sel[i];
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = dev->data->mac_pool_sel[i];
do {
if (pool_mask & 1ULL) {
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] net/i40e: fix MAC address removal
2026-09-04 12:16 [PATCH 1/2] net/i40e: fix MAC address removal David Marchand
2026-09-04 12:16 ` [PATCH 2/2] net/bnxt: " David Marchand
@ 2026-09-04 13:08 ` David Marchand
2026-09-07 11:17 ` [PATCH v2 " David Marchand
2026-09-08 7:18 ` [PATCH v3 " David Marchand
3 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2026-09-04 13:08 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Andrew Rybchenko
On Fri, 4 Sept 2026 at 14:17, David Marchand <david.marchand@redhat.com> wrote:
> drivers/net/intel/i40e/i40e_ethdev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..5bc3c22def 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -4513,7 +4513,11 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
>
> macaddr = &(data->mac_addrs[index]);
>
> - pool_sel = dev->data->mac_pool_sel[index];
> + vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
> + if (!vmdq)
> + pool_mask = 1;
> + else
> + pool_mask = dev->data->mac_pool_sel[index];
Arf... some git commit -a --amend was missing before sending...
Will send v2 soon.
--
David Marchand
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/2] net/i40e: fix MAC address removal
2026-09-04 12:16 [PATCH 1/2] net/i40e: fix MAC address removal David Marchand
2026-09-04 12:16 ` [PATCH 2/2] net/bnxt: " David Marchand
2026-09-04 13:08 ` [PATCH 1/2] net/i40e: " David Marchand
@ 2026-09-07 11:17 ` David Marchand
2026-09-07 11:17 ` [PATCH v2 2/2] net/bnxt: " David Marchand
2026-09-07 12:57 ` [PATCH v2 1/2] net/i40e: " Bruce Richardson
2026-09-08 7:18 ` [PATCH v3 " David Marchand
3 siblings, 2 replies; 14+ messages in thread
From: David Marchand @ 2026-09-07 11:17 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I could not test the change as my setups are KO atm.
Probably worth squashing in 9de506a6c781 before pulling to main
Changes since v1:
- fixed compilation,
---
drivers/net/intel/i40e/i40e_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..3c01354c39 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4509,11 +4509,16 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
struct rte_ether_addr *macaddr;
int ret;
uint32_t i;
+ bool vmdq;
uint64_t pool_sel;
macaddr = &(data->mac_addrs[index]);
- pool_sel = dev->data->mac_pool_sel[index];
+ vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+ if (!vmdq)
+ pool_sel = 1;
+ else
+ pool_sel = dev->data->mac_pool_sel[index];
for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
if (pool_sel & RTE_BIT64(i)) {
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/2] net/bnxt: fix MAC address removal
2026-09-07 11:17 ` [PATCH v2 " David Marchand
@ 2026-09-07 11:17 ` David Marchand
2026-09-07 17:17 ` Stephen Hemminger
2026-09-07 12:57 ` [PATCH v2 1/2] net/i40e: " Bruce Richardson
1 sibling, 1 reply; 14+ messages in thread
From: David Marchand @ 2026-09-07 11:17 UTC (permalink / raw)
To: dev; +Cc: Kishore Padmanabha, Ajit Khaparde, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
I could not test the change as I don't have this NIC.
Probably worth squashing in 9de506a6c781 before pulling to main
---
drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c6f566c214..d37e2d16c9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2019,14 +2019,21 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
uint32_t index)
{
struct bnxt *bp = eth_dev->data->dev_private;
- uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
+ uint64_t pool_mask;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
uint32_t i;
+ bool vmdq;
if (is_bnxt_in_error(bp))
return;
+ vmdq = (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = eth_dev->data->mac_pool_sel[index];
+
/*
* Loop through all VNICs from the specified filter flow pools to
* remove the corresponding MAC addr filter
@@ -4540,6 +4547,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
uint64_t pool_mask;
uint32_t pool = 0;
uint32_t i;
+ bool vmdq;
int rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
@@ -4549,6 +4557,8 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
if (rc)
return rc;
+ vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+
/* replay MAC address configuration */
for (i = 1; i < dev_info.max_mac_addrs; i++) {
addr = &dev->data->mac_addrs[i];
@@ -4558,7 +4568,10 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
continue;
pool = 0;
- pool_mask = dev->data->mac_pool_sel[i];
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = dev->data->mac_pool_sel[i];
do {
if (pool_mask & 1ULL) {
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/2] net/i40e: fix MAC address removal
2026-09-07 11:17 ` [PATCH v2 " David Marchand
2026-09-07 11:17 ` [PATCH v2 2/2] net/bnxt: " David Marchand
@ 2026-09-07 12:57 ` Bruce Richardson
2026-09-07 13:21 ` David Marchand
1 sibling, 1 reply; 14+ messages in thread
From: Bruce Richardson @ 2026-09-07 12:57 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Andrew Rybchenko
On Mon, Sep 07, 2026 at 01:17:23PM +0200, David Marchand wrote:
> MAC addresses removal was tied with VMDq pools even when not used.
> So if VMDq is not enabled, no address would be ever removed.
>
> Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> I could not test the change as my setups are KO atm.
>
> Probably worth squashing in 9de506a6c781 before pulling to main
>
> Changes since v1:
> - fixed compilation,
>
> ---
> drivers/net/intel/i40e/i40e_ethdev.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..3c01354c39 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -4509,11 +4509,16 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
> struct rte_ether_addr *macaddr;
> int ret;
> uint32_t i;
> + bool vmdq;
> uint64_t pool_sel;
>
> macaddr = &(data->mac_addrs[index]);
>
> - pool_sel = dev->data->mac_pool_sel[index];
> + vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
> + if (!vmdq)
> + pool_sel = 1;
> + else
> + pool_sel = dev->data->mac_pool_sel[index];
>
The explanation makes sense, but do we really need the new temporary
variable, rather than just checking the flag directly in the "if"?
Also, the rest of the code in this function, and the add function about it,
uses "pf->flags & I40E_FLAG_VMDQ" as a check for vmdq support. Is there a
reason we can't use that flag also here, rather than checking the rx
mq_mode flags?
/Bruce
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/2] net/i40e: fix MAC address removal
2026-09-07 12:57 ` [PATCH v2 1/2] net/i40e: " Bruce Richardson
@ 2026-09-07 13:21 ` David Marchand
2026-09-07 13:40 ` Bruce Richardson
0 siblings, 1 reply; 14+ messages in thread
From: David Marchand @ 2026-09-07 13:21 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Andrew Rybchenko
On Mon, 7 Sept 2026 at 14:57, Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Mon, Sep 07, 2026 at 01:17:23PM +0200, David Marchand wrote:
> > MAC addresses removal was tied with VMDq pools even when not used.
> > So if VMDq is not enabled, no address would be ever removed.
> >
> > Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > I could not test the change as my setups are KO atm.
> >
> > Probably worth squashing in 9de506a6c781 before pulling to main
> >
> > Changes since v1:
> > - fixed compilation,
> >
> > ---
> > drivers/net/intel/i40e/i40e_ethdev.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> > index b6b2d291ee..3c01354c39 100644
> > --- a/drivers/net/intel/i40e/i40e_ethdev.c
> > +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> > @@ -4509,11 +4509,16 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
> > struct rte_ether_addr *macaddr;
> > int ret;
> > uint32_t i;
> > + bool vmdq;
> > uint64_t pool_sel;
> >
> > macaddr = &(data->mac_addrs[index]);
> >
> > - pool_sel = dev->data->mac_pool_sel[index];
> > + vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
> > + if (!vmdq)
> > + pool_sel = 1;
> > + else
> > + pool_sel = dev->data->mac_pool_sel[index];
> >
> The explanation makes sense, but do we really need the new temporary
> variable, rather than just checking the flag directly in the "if"?
>
> Also, the rest of the code in this function, and the add function about it,
> uses "pf->flags & I40E_FLAG_VMDQ" as a check for vmdq support. Is there a
> reason we can't use that flag also here, rather than checking the rx
> mq_mode flags?
No, I just did not notice this internal flag and I simply used the
ethdev level config.
What do you think of:
$ git diff next-net/for-main -- drivers/net/intel/i40e
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c
b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..0d914d86ea 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4513,6 +4513,12 @@ i40e_macaddr_remove(struct rte_eth_dev *dev,
uint32_t index)
macaddr = &(data->mac_addrs[index]);
+ if (!(pf->flags & I40E_FLAG_VMDQ)) {
+ if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
+ PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
+ return;
+ }
+
pool_sel = dev->data->mac_pool_sel[index];
for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
@@ -4521,8 +4527,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev,
uint32_t index)
vsi = pf->main_vsi;
else {
/* No VMDQ pool enabled or configured */
- if (!(pf->flags & I40E_FLAG_VMDQ) ||
- (i > pf->nb_cfg_vmdq_vsi)) {
+ if (i > pf->nb_cfg_vmdq_vsi) {
PMD_DRV_LOG(ERR,
"No VMDQ pool
enabled/configured");
return;
--
David Marchand
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/2] net/i40e: fix MAC address removal
2026-09-07 13:21 ` David Marchand
@ 2026-09-07 13:40 ` Bruce Richardson
0 siblings, 0 replies; 14+ messages in thread
From: Bruce Richardson @ 2026-09-07 13:40 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Andrew Rybchenko
On Mon, Sep 07, 2026 at 03:21:27PM +0200, David Marchand wrote:
> On Mon, 7 Sept 2026 at 14:57, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Mon, Sep 07, 2026 at 01:17:23PM +0200, David Marchand wrote:
> > > MAC addresses removal was tied with VMDq pools even when not used.
> > > So if VMDq is not enabled, no address would be ever removed.
> > >
> > > Fixes: 9de506a6c781 ("ethdev: skip VMDq pools unless configured")
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > > I could not test the change as my setups are KO atm.
> > >
> > > Probably worth squashing in 9de506a6c781 before pulling to main
> > >
> > > Changes since v1:
> > > - fixed compilation,
> > >
> > > ---
> > > drivers/net/intel/i40e/i40e_ethdev.c | 7 ++++++-
> > > 1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> > > index b6b2d291ee..3c01354c39 100644
> > > --- a/drivers/net/intel/i40e/i40e_ethdev.c
> > > +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> > > @@ -4509,11 +4509,16 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
> > > struct rte_ether_addr *macaddr;
> > > int ret;
> > > uint32_t i;
> > > + bool vmdq;
> > > uint64_t pool_sel;
> > >
> > > macaddr = &(data->mac_addrs[index]);
> > >
> > > - pool_sel = dev->data->mac_pool_sel[index];
> > > + vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
> > > + if (!vmdq)
> > > + pool_sel = 1;
> > > + else
> > > + pool_sel = dev->data->mac_pool_sel[index];
> > >
> > The explanation makes sense, but do we really need the new temporary
> > variable, rather than just checking the flag directly in the "if"?
> >
> > Also, the rest of the code in this function, and the add function about it,
> > uses "pf->flags & I40E_FLAG_VMDQ" as a check for vmdq support. Is there a
> > reason we can't use that flag also here, rather than checking the rx
> > mq_mode flags?
>
> No, I just did not notice this internal flag and I simply used the
> ethdev level config.
>
> What do you think of:
>
> $ git diff next-net/for-main -- drivers/net/intel/i40e
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c
> b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..0d914d86ea 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -4513,6 +4513,12 @@ i40e_macaddr_remove(struct rte_eth_dev *dev,
> uint32_t index)
>
> macaddr = &(data->mac_addrs[index]);
>
> + if (!(pf->flags & I40E_FLAG_VMDQ)) {
> + if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
> + PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
> + return;
> + }
> +
> pool_sel = dev->data->mac_pool_sel[index];
>
> for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
> @@ -4521,8 +4527,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev,
> uint32_t index)
> vsi = pf->main_vsi;
> else {
> /* No VMDQ pool enabled or configured */
> - if (!(pf->flags & I40E_FLAG_VMDQ) ||
> - (i > pf->nb_cfg_vmdq_vsi)) {
> + if (i > pf->nb_cfg_vmdq_vsi) {
> PMD_DRV_LOG(ERR,
> "No VMDQ pool
> enabled/configured");
> return;
>
>
That looks simpler. Thanks.
/Bruce
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/2] net/bnxt: fix MAC address removal
2026-09-07 11:17 ` [PATCH v2 2/2] net/bnxt: " David Marchand
@ 2026-09-07 17:17 ` Stephen Hemminger
0 siblings, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2026-09-07 17:17 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Kishore Padmanabha, Ajit Khaparde, Andrew Rybchenko
On Mon, 7 Sep 2026 13:17:24 +0200
David Marchand <david.marchand@redhat.com> wrote:
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index c6f566c214..d37e2d16c9 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -2019,14 +2019,21 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
> uint32_t index)
> {
> struct bnxt *bp = eth_dev->data->dev_private;
> - uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
> + uint64_t pool_mask;
> struct bnxt_vnic_info *vnic;
> struct bnxt_filter_info *filter, *temp_filter;
> uint32_t i;
> + bool vmdq;
>
> if (is_bnxt_in_error(bp))
> return;
>
> + vmdq = (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
> + if (!vmdq)
> + pool_mask = 1;
> + else
> + pool_mask = eth_dev->data->mac_pool_sel[index];
> +
Why bother with the vmdq temporary at all here?
if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG)
pool_mask = 1;
else
pool_mask = eth_dev->data->mac_pool_sel[index];
Or use ternary if you want here.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 1/2] net/i40e: fix MAC address removal
2026-09-04 12:16 [PATCH 1/2] net/i40e: fix MAC address removal David Marchand
` (2 preceding siblings ...)
2026-09-07 11:17 ` [PATCH v2 " David Marchand
@ 2026-09-08 7:18 ` David Marchand
2026-09-08 7:18 ` [PATCH v3 2/2] net/bnxt: " David Marchand
` (2 more replies)
3 siblings, 3 replies; 14+ messages in thread
From: David Marchand @ 2026-09-08 7:18 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/intel/i40e/i40e_ethdev.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..0d914d86ea 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4513,6 +4513,12 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
macaddr = &(data->mac_addrs[index]);
+ if (!(pf->flags & I40E_FLAG_VMDQ)) {
+ if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
+ PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
+ return;
+ }
+
pool_sel = dev->data->mac_pool_sel[index];
for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
@@ -4521,8 +4527,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
vsi = pf->main_vsi;
else {
/* No VMDQ pool enabled or configured */
- if (!(pf->flags & I40E_FLAG_VMDQ) ||
- (i > pf->nb_cfg_vmdq_vsi)) {
+ if (i > pf->nb_cfg_vmdq_vsi) {
PMD_DRV_LOG(ERR,
"No VMDQ pool enabled/configured");
return;
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v3 2/2] net/bnxt: fix MAC address removal
2026-09-08 7:18 ` [PATCH v3 " David Marchand
@ 2026-09-08 7:18 ` David Marchand
2026-09-08 14:23 ` Stephen Hemminger
2026-09-08 7:38 ` [PATCH v3 1/2] net/i40e: " Bruce Richardson
2026-09-08 14:23 ` Stephen Hemminger
2 siblings, 1 reply; 14+ messages in thread
From: David Marchand @ 2026-09-08 7:18 UTC (permalink / raw)
To: dev; +Cc: Kishore Padmanabha, Ajit Khaparde, Andrew Rybchenko
MAC addresses removal was tied with VMDq pools even when not used.
So if VMDq is not enabled, no address would be ever removed.
Fixes: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c6f566c214..178814509e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2019,7 +2019,7 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
uint32_t index)
{
struct bnxt *bp = eth_dev->data->dev_private;
- uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
+ uint64_t pool_mask;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
uint32_t i;
@@ -2027,6 +2027,11 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
if (is_bnxt_in_error(bp))
return;
+ if ((eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) == 0)
+ pool_mask = 1;
+ else
+ pool_mask = eth_dev->data->mac_pool_sel[index];
+
/*
* Loop through all VNICs from the specified filter flow pools to
* remove the corresponding MAC addr filter
@@ -4540,6 +4545,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
uint64_t pool_mask;
uint32_t pool = 0;
uint32_t i;
+ bool vmdq;
int rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
@@ -4549,6 +4555,8 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
if (rc)
return rc;
+ vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
+
/* replay MAC address configuration */
for (i = 1; i < dev_info.max_mac_addrs; i++) {
addr = &dev->data->mac_addrs[i];
@@ -4558,7 +4566,10 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
continue;
pool = 0;
- pool_mask = dev->data->mac_pool_sel[i];
+ if (!vmdq)
+ pool_mask = 1;
+ else
+ pool_mask = dev->data->mac_pool_sel[i];
do {
if (pool_mask & 1ULL) {
--
2.54.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] net/i40e: fix MAC address removal
2026-09-08 7:18 ` [PATCH v3 " David Marchand
2026-09-08 7:18 ` [PATCH v3 2/2] net/bnxt: " David Marchand
@ 2026-09-08 7:38 ` Bruce Richardson
2026-09-08 14:23 ` Stephen Hemminger
2 siblings, 0 replies; 14+ messages in thread
From: Bruce Richardson @ 2026-09-08 7:38 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Andrew Rybchenko
On Tue, Sep 08, 2026 at 09:18:52AM +0200, David Marchand wrote:
> MAC addresses removal was tied with VMDq pools even when not used.
> So if VMDq is not enabled, no address would be ever removed.
>
> Fixes: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
> drivers/net/intel/i40e/i40e_ethdev.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..0d914d86ea 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -4513,6 +4513,12 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
>
> macaddr = &(data->mac_addrs[index]);
>
> + if (!(pf->flags & I40E_FLAG_VMDQ)) {
> + if (i40e_vsi_delete_mac(pf->main_vsi, macaddr) != 0)
> + PMD_DRV_LOG(ERR, "Failed to remove MACVLAN filter");
> + return;
> + }
> +
> pool_sel = dev->data->mac_pool_sel[index];
>
> for (i = 0; i < sizeof(pool_sel) * CHAR_BIT; i++) {
> @@ -4521,8 +4527,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
> vsi = pf->main_vsi;
> else {
> /* No VMDQ pool enabled or configured */
> - if (!(pf->flags & I40E_FLAG_VMDQ) ||
> - (i > pf->nb_cfg_vmdq_vsi)) {
> + if (i > pf->nb_cfg_vmdq_vsi) {
> PMD_DRV_LOG(ERR,
> "No VMDQ pool enabled/configured");
> return;
> --
> 2.54.0
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] net/i40e: fix MAC address removal
2026-09-08 7:18 ` [PATCH v3 " David Marchand
2026-09-08 7:18 ` [PATCH v3 2/2] net/bnxt: " David Marchand
2026-09-08 7:38 ` [PATCH v3 1/2] net/i40e: " Bruce Richardson
@ 2026-09-08 14:23 ` Stephen Hemminger
2 siblings, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2026-09-08 14:23 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Bruce Richardson, Andrew Rybchenko
On Tue, 8 Sep 2026 09:18:52 +0200
David Marchand <david.marchand@redhat.com> wrote:
> MAC addresses removal was tied with VMDq pools even when not used.
> So if VMDq is not enabled, no address would be ever removed.
>
> Fixes: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Applied to next-net
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] net/bnxt: fix MAC address removal
2026-09-08 7:18 ` [PATCH v3 2/2] net/bnxt: " David Marchand
@ 2026-09-08 14:23 ` Stephen Hemminger
0 siblings, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2026-09-08 14:23 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Kishore Padmanabha, Ajit Khaparde, Andrew Rybchenko
On Tue, 8 Sep 2026 09:18:53 +0200
David Marchand <david.marchand@redhat.com> wrote:
> MAC addresses removal was tied with VMDq pools even when not used.
> So if VMDq is not enabled, no address would be ever removed.
>
> Fixes: f9ddb36e0065 ("ethdev: skip VMDq pools unless configured")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Applied to next-net
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-09-08 14:26 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 12:16 [PATCH 1/2] net/i40e: fix MAC address removal David Marchand
2026-09-04 12:16 ` [PATCH 2/2] net/bnxt: " David Marchand
2026-09-04 13:08 ` [PATCH 1/2] net/i40e: " David Marchand
2026-09-07 11:17 ` [PATCH v2 " David Marchand
2026-09-07 11:17 ` [PATCH v2 2/2] net/bnxt: " David Marchand
2026-09-07 17:17 ` Stephen Hemminger
2026-09-07 12:57 ` [PATCH v2 1/2] net/i40e: " Bruce Richardson
2026-09-07 13:21 ` David Marchand
2026-09-07 13:40 ` Bruce Richardson
2026-09-08 7:18 ` [PATCH v3 " David Marchand
2026-09-08 7:18 ` [PATCH v3 2/2] net/bnxt: " David Marchand
2026-09-08 14:23 ` Stephen Hemminger
2026-09-08 7:38 ` [PATCH v3 1/2] net/i40e: " Bruce Richardson
2026-09-08 14:23 ` Stephen Hemminger
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).