From: <skori@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, Asaf Ravid <aravid@marvell.com>
Subject: [PATCH] net/cnxk: fix promiscuous mode in multicast enable flow
Date: Wed, 1 Dec 2021 15:59:53 +0530 [thread overview]
Message-ID: <20211201102954.2453386-1-skori@marvell.com> (raw)
From: Asaf Ravid <aravid@marvell.com>
When multicast promisc was being enabled it caused the unicast promisc
to be disabled. This fix resolves this by setting NIX_RX_MODE_PROMISC
when eth_dev->data->promiscuous is set, regardless.
ci: skip_checkpatch skip_roc_check
Fixes: 325d79c00a5a ("net/cnxk: support all multicast")
Signed-off-by: Asaf Ravid <aravid@marvell.com>
---
drivers/common/cnxk/roc_nix_npc.c | 2 +-
drivers/net/cnxk/cnxk_ethdev_ops.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_npc.c b/drivers/common/cnxk/roc_nix_npc.c
index c0666c87d5..ad8839dde8 100644
--- a/drivers/common/cnxk/roc_nix_npc.c
+++ b/drivers/common/cnxk/roc_nix_npc.c
@@ -96,7 +96,7 @@ roc_nix_npc_mcast_config(struct roc_nix *roc_nix, bool mcast_enable,
if (mcast_enable)
req->mode = NIX_RX_MODE_ALLMULTI;
- else if (prom_enable)
+ if (prom_enable)
req->mode = NIX_RX_MODE_PROMISC;
return mbox_process(mbox);
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index ce5f1f7240..34e4809650 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -517,7 +517,8 @@ cnxk_nix_allmulticast_enable(struct rte_eth_dev *eth_dev)
{
struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
- return roc_nix_npc_mcast_config(&dev->nix, true, false);
+ return roc_nix_npc_mcast_config(&dev->nix, true,
+ eth_dev->data->promiscuous);
}
int
--
2.25.1
next reply other threads:[~2021-12-01 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 10:29 skori [this message]
2022-01-13 4:05 ` Jerin Jacob
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=20211201102954.2453386-1-skori@marvell.com \
--to=skori@marvell.com \
--cc=aravid@marvell.com \
--cc=dev@dpdk.org \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skoteshwar@marvell.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;
as well as URLs for NNTP newsgroup(s).