From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A5D5DA00C4; Thu, 13 Jan 2022 05:06:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26B734067E; Thu, 13 Jan 2022 05:06:21 +0100 (CET) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by mails.dpdk.org (Postfix) with ESMTP id 9953B40150 for ; Thu, 13 Jan 2022 05:06:19 +0100 (CET) Received: by mail-io1-f52.google.com with SMTP id n137so723681iod.4 for ; Wed, 12 Jan 2022 20:06:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qfi5+jQTQa4QZr9tGL2rXMVcor2ETKgn6v2ULu8pEVU=; b=Ke3KqOX2NmigPLe70+NRCxaHOJgYq5Xgpsz5lyGCinFSkeAquEj0eb3gZfzw0mkyyn kYRrhToqUcR39iNKcP32YX0flaWTRR6u830nSDhEXBX4sV5y66FR/v+8HbveNBCt3q8A KvBbpsw1o4G8PmKKMd57YJkwkCJcUCM5W2wGNv6RRtc7Qg9NwA4gyHIHoQcarV7KgJWa D/hFE/3qtkOY0Q46I5dfvHlE1Pg4ceyQm1D7vGHSCVVOj9JFnrA5ZeoSZlzrifcAGdJM 0Oi1Wesuqkg42J6+8xswISE57/zAqCNj8xlGHG3WRdtOiFQytipp5rcpB7itBBKx87fd 0LcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qfi5+jQTQa4QZr9tGL2rXMVcor2ETKgn6v2ULu8pEVU=; b=jhrldhW9FtYpNWbRUDiEvQGKYmSmbOZcUeVKc9BRTB/8wWJdWtdhi1wOU0ruIUe+K1 rLy94aVJcYnbTx6Lzxb9E4uZr9fM0K6n6n53DPiqwGMx3jGZ6Ic3vy4+G5NO+/mYr/D2 JoMBrv5hVU4wDFigoOg2Zeww+/nMVSTc3buYS3MZ9lGwiVK4eKMiTQhC8VSsbXT7A3na 2ZpkSN9GQe5FDBCc+eCdmiu6tbAPntUdwUacNge803C1iwuNk36yxTVGF/ESw+1uiE89 TAgaJL8cQXs1r1OLlsKkDrQAjp2qKrV/OU69Cn8h1H8TCisDaQbAAUE9o6DwP8iTnjdx VmYw== X-Gm-Message-State: AOAM5307/TTh/9D1UWUzaG4T87GRAMLsZjqcpQ6IfqxjHv46zj5KVFP1 7tTeHMa0zRWq+LucqQB7YU1VCR2kCp5fygP+3mwD/njXuxU= X-Google-Smtp-Source: ABdhPJysjVDCpYzoQxXcq6cRvVTK6Le/iiJPYHFWqW+kxg7xO+rMN5NtId1MS+u2dWsIshZcmT65sOHEdnnM4ORQFc4= X-Received: by 2002:a02:cdd0:: with SMTP id m16mr1256635jap.158.1642046778906; Wed, 12 Jan 2022 20:06:18 -0800 (PST) MIME-Version: 1.0 References: <20211201102954.2453386-1-skori@marvell.com> In-Reply-To: <20211201102954.2453386-1-skori@marvell.com> From: Jerin Jacob Date: Thu, 13 Jan 2022 09:35:52 +0530 Message-ID: Subject: Re: [PATCH] net/cnxk: fix promiscuous mode in multicast enable flow To: Sunil Kumar Kori , Ferruh Yigit Cc: Nithin Dabilpuram , Kiran Kumar K , Satha Rao , dpdk-dev , Asaf Ravid Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Dec 1, 2021 at 4:00 PM wrote: > > From: Asaf Ravid > > 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 Acked-by: Jerin Jacob 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: stable@dpdk.org Signed-off-by: Asaf Ravid Acked-by: Jerin Jacob > --- > 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 >