From: Jerin Jacob <jerinjacobk@gmail.com>
To: Rahul Bhansali <rbhansali@marvell.com>
Cc: dev@dpdk.org, Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>,
Harman Kalra <hkalra@marvell.com>,
jerinj@marvell.com, stable@dpdk.org
Subject: Re: [PATCH] net/cnxk: fix promiscuous state after MAC change
Date: Tue, 28 May 2024 23:13:26 +0530 [thread overview]
Message-ID: <CALBAE1Ofmn8-4yCYqMaFYAWt_bgMRavMFmajjMg0CBZ9Y8_erg@mail.gmail.com> (raw)
In-Reply-To: <20240528083246.4016677-1-rbhansali@marvell.com>
On Tue, May 28, 2024 at 2:18 PM Rahul Bhansali <rbhansali@marvell.com> wrote:
>
> If promiscuous mode is enabled and default MAC address is set
> again then promiscuous mode gets disabled in hardware.
>
> This change will restore promiscuous behavior after configuring
> default MAC address.
>
> Fixes: 5fe86db2a0dd ("net/cnxk: support MAC address set")
> Cc: stable@dpdk.org
>
> Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Applied to dpdk-next-net-mrvl/for-main. Thanks
> ---
> drivers/net/cnxk/cnxk_ethdev_ops.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
> index c8260fcb9c..b1093dd584 100644
> --- a/drivers/net/cnxk/cnxk_ethdev_ops.c
> +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
> @@ -451,6 +451,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
> roc_nix_npc_mac_addr_set(nix, dev->mac_addr);
> goto exit;
> }
> +
> + if (eth_dev->data->promiscuous) {
> + rc = roc_nix_mac_promisc_mode_enable(nix, true);
> + if (rc)
> + plt_err("Failed to setup promisc mode in mac, rc=%d(%s)", rc,
> + roc_error_msg_get(rc));
> + }
> }
>
> /* Update mac address to cnxk ethernet device */
> --
> 2.25.1
>
prev parent reply other threads:[~2024-05-28 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 8:32 Rahul Bhansali
2024-05-28 17:43 ` Jerin Jacob [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=CALBAE1Ofmn8-4yCYqMaFYAWt_bgMRavMFmajjMg0CBZ9Y8_erg@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=rbhansali@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
--cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).