From: Monendra Singh Kushwaha <kmonen...@marvell.com>

This patch enables allmulti mode on rpm/cgx vf devices.

Signed-off-by: Monendra Singh Kushwaha <kmonen...@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 <mga...@redhat.com>
 Mohsin Kazmi <mohsin.kazm...@gmail.com>
 Mohsin Mazhar Shaikh <mohsinmazhar_sha...@trendmicro.com>
 Mohsin Shaikh <mohsinsha...@niometrics.com>
+Monendra Singh Kushwaha <kmonen...@marvell.com>
 Morten Br??rup <m...@smartsharesystems.com>
 Moti Haimovsky <mo...@mellanox.com>
 Muhammad Ahmad <muhammad.ah...@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

Reply via email to