net/cnxk: fix promiscuous mode in multicast enable flow

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: 325d79c00a ("net/cnxk: support all multicast")
Cc: stable@dpdk.org

Signed-off-by: Asaf Ravid <aravid@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Asaf Ravid 2021-12-01 15:59:53 +05:30 committed by Jerin Jacob
parent f30622542c
commit b922883be9
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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