On Wed, Dec 1, 2021 at 4:00 PM <sk...@marvell.com> wrote:
>
> From: Asaf Ravid <ara...@marvell.com>
>
> When multicast promisc was being enabled it caused the unicast promisc
> to be disabled. This fix resolves this by setting NIX_RX_MODE_PROMISC
> when eth_dev->data->promiscuous is set, regardless.
>
> ci: skip_checkpatch skip_roc_check
>
> Fixes: 325d79c00a5a ("net/cnxk: support all multicast")
>
> Signed-off-by: Asaf Ravid <ara...@marvell.com>

Acked-by: Jerin Jacob <jer...@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks

Changed the git log to:

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

    Signed-off-by: Asaf Ravid <ara...@marvell.com>
    Acked-by: Jerin Jacob <jer...@marvell.com>


> ---
>  drivers/common/cnxk/roc_nix_npc.c  | 2 +-
>  drivers/net/cnxk/cnxk_ethdev_ops.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_nix_npc.c 
> b/drivers/common/cnxk/roc_nix_npc.c
> index c0666c87d5..ad8839dde8 100644
> --- a/drivers/common/cnxk/roc_nix_npc.c
> +++ b/drivers/common/cnxk/roc_nix_npc.c
> @@ -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);
> diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c 
> b/drivers/net/cnxk/cnxk_ethdev_ops.c
> index ce5f1f7240..34e4809650 100644
> --- a/drivers/net/cnxk/cnxk_ethdev_ops.c
> +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
> @@ -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
> --
> 2.25.1
>

Reply via email to