From: Stephen Hemminger <stephen@networkplumber.org>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org,
Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH v2 2/2] net/bnxt: fix MAC address removal
Date: Mon, 7 Sep 2026 10:17:42 -0700 [thread overview]
Message-ID: <20260907101742.180b035c@phoenix.local> (raw)
In-Reply-To: <20260907111724.3043887-2-david.marchand@redhat.com>
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.
next prev parent reply other threads:[~2026-09-07 17:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20260907101742.180b035c@phoenix.local \
--to=stephen@networkplumber.org \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=kishore.padmanabha@broadcom.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