[PATCH 28/34] common/cnxk: enable allmulti mode on rpm/cgx VF
Nithin Dabilpuram
ndabilpuram at marvell.com
Fri Jan 31 09:05:23 CET 2025
From: Monendra Singh Kushwaha <kmonendra at marvell.com>
This patch enables allmulti mode on rpm/cgx vf devices.
Signed-off-by: Monendra Singh Kushwaha <kmonendra at marvell.com>
---
.mailmap | 1 +
drivers/common/cnxk/roc_mbox.h | 1 +
drivers/common/cnxk/roc_nix_npc.c | 10 +++++++---
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index e2486bf7b5..05b581e0b0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1050,6 +1050,7 @@ Mohammed Gamal <mgamal at redhat.com>
Mohsin Kazmi <mohsin.kazmi14 at gmail.com>
Mohsin Mazhar Shaikh <mohsinmazhar_shaikh at trendmicro.com>
Mohsin Shaikh <mohsinshaikh at niometrics.com>
+Monendra Singh Kushwaha <kmonendra at marvell.com>
Morten Brørup <mb at smartsharesystems.com>
Moti Haimovsky <motih at mellanox.com>
Muhammad Ahmad <muhammad.ahmad at emumba.com>
diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index df9a629403..b87ddf872a 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -1848,6 +1848,7 @@ struct nix_rx_mode {
#define NIX_RX_MODE_UCAST BIT(0)
#define NIX_RX_MODE_PROMISC BIT(1)
#define NIX_RX_MODE_ALLMULTI BIT(2)
+#define NIX_RX_MODE_USE_MCE BIT(3)
uint16_t __io mode;
};
diff --git a/drivers/common/cnxk/roc_nix_npc.c b/drivers/common/cnxk/roc_nix_npc.c
index 8c4a5753ee..1d445c0d92 100644
--- a/drivers/common/cnxk/roc_nix_npc.c
+++ b/drivers/common/cnxk/roc_nix_npc.c
@@ -101,7 +101,7 @@ roc_nix_npc_mcast_config(struct roc_nix *roc_nix, bool mcast_enable,
struct nix_rx_mode *req;
int rc = -ENOSPC;
- if (roc_nix_is_vf_or_sdp(roc_nix)) {
+ if (roc_nix_is_sdp(roc_nix) || roc_nix_is_lbk(roc_nix)) {
rc = 0;
goto exit;
}
@@ -110,9 +110,13 @@ roc_nix_npc_mcast_config(struct roc_nix *roc_nix, bool mcast_enable,
if (req == NULL)
goto exit;
- if (mcast_enable)
+ if (mcast_enable) {
req->mode = NIX_RX_MODE_ALLMULTI;
- if (prom_enable)
+ if (dev_is_vf(&nix->dev))
+ req->mode |= NIX_RX_MODE_USE_MCE;
+ }
+
+ if (prom_enable && !dev_is_vf(&nix->dev))
req->mode = NIX_RX_MODE_PROMISC;
rc = mbox_process(mbox);
--
2.34.1
More information about the dev
mailing list