From: Monendra Singh Kushwaha <kmonendra@marvell.com>
This patch enables allmulti mode on rpm/cgx vf devices.
Signed-off-by: Monendra Singh Kushwaha <kmonendra@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(-)
@@ -1050,6 +1050,7 @@ Mohammed Gamal <mgamal@redhat.com>
Mohsin Kazmi <mohsin.kazmi14@gmail.com>
Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
Mohsin Shaikh <mohsinshaikh@niometrics.com>
+Monendra Singh Kushwaha <kmonendra@marvell.com>
Morten Brørup <mb@smartsharesystems.com>
Moti Haimovsky <motih@mellanox.com>
Muhammad Ahmad <muhammad.ahmad@emumba.com>
@@ -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;
};
@@ -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);