Skip to content

Commit

Permalink
net/cnxk: fix promiscuous mode in multicast enable flow
Browse files Browse the repository at this point in the history
[ upstream commit b922883 ]

When multicast promiscuous was being enabled it caused the unicast
promiscuous to be disabled. This fix resolves this by setting
NIX_RX_MODE_PROMISC when eth_dev->data->promiscuous is set, regardless.

Fixes: 325d79c ("net/cnxk: support all multicast")

Signed-off-by: Asaf Ravid <aravid@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
aravid-marvell authored and kevintraynor committed Feb 21, 2022
1 parent 26a3e3e commit 661587e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/common/cnxk/roc_nix_npc.c
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/cnxk/cnxk_ethdev_ops.c
Expand Up @@ -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
Expand Down

0 comments on commit 661587e

Please sign in to comment.