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 B9CECA0C4C; Wed, 1 Dec 2021 11:30:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 461B84067B; Wed, 1 Dec 2021 11:30:01 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 174FC40140 for ; Wed, 1 Dec 2021 11:29:59 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1B191A0X020504 for ; Wed, 1 Dec 2021 02:29:58 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=MLuOFDJNMWdm6lYrHuYhiso+CKaXmNjpfksmy2qoxQM=; b=cH7I6IW652nG2fpv2nwOWDbWHDDV3GBDaappmxasWhIoedH47VremhHsyuZY4I2LWhth NWebLOmqshGIF7BGyYdqQYI4QypqSLZpub1HxXBbGHteNHpaJJVs3cJu76lsxWCRk2kD mf5AhMkr3oC+mmSy0iSXRlsp80cIVLw6ciKAqEoc5XmHKWsb9iblWtbKzuF4nqDhHIXU rtgOiDXM49m3ZdwMZ3+wNvknkR9zvU9iSHtxAYm1ZRqlIOOfiWGOVX5HkgxWYN3g2nRG UAEQQHGeNvzFb+VaoYffuSPikfbmDbWAWeePvrPVDrLJc7AUvwF1vAtwVAvokGTs8lwp ug== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cp624rakp-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 01 Dec 2021 02:29:58 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Dec 2021 02:29:57 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 1 Dec 2021 02:29:57 -0800 Received: from localhost.localdomain (unknown [10.28.34.25]) by maili.marvell.com (Postfix) with ESMTP id B2D7E5B6932; Wed, 1 Dec 2021 02:29:55 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Asaf Ravid Subject: [PATCH] net/cnxk: fix promiscuous mode in multicast enable flow Date: Wed, 1 Dec 2021 15:59:53 +0530 Message-ID: <20211201102954.2453386-1-skori@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: xYeeEJfHLSKCkw6WBmVqMdYa4W-TmCpw X-Proofpoint-ORIG-GUID: xYeeEJfHLSKCkw6WBmVqMdYa4W-TmCpw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_10,2021-12-01_01,2020-04-07_01 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 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 --- 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