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 617BEA0C41; Wed, 23 Jun 2021 06:51:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B37A410F5; Wed, 23 Jun 2021 06:49:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0BE0941151 for ; Wed, 23 Jun 2021 06:49:18 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15N4k9os025587 for ; Tue, 22 Jun 2021 21:49:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=fLeUwRAtg2W4+2deYvq6d06XWrIwmLKSbubEobHs9IM=; b=IqVzRj5eitAVeslUEmUtcGKoOCqNuO+ZazbK8vU9S5mxGajbVfumJLMLJxNwGwowHv9k z0P93x9caIzGU4ZKubSeS6Ynhnq7qqEdT06O0zU94P/uYcOJ/ZSyRuAJvPSj6oh4hi0n BQylCvMMO/JrZAbluSuEpt3prW0RLoVrtznfLDqzmvyeTiH4Bgw1dhtHYkqRsmn1TD8A Q/z1JwJcwN/4Rutk4gDQr86nmlv3EkTyT6OHddUBxj7PL0TyV9UyhZqNT3LuAsBr7Fm5 UY1MB8qA9aDTh+7x9fRZwP5KI7TFqNX7ID1ofu4OGSol3UoyhYPCCxWAJqx/m5AFO2Uu YQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 39bptj1grf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 22 Jun 2021 21:49:18 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 22 Jun 2021 21:49:16 -0700 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.18 via Frontend Transport; Tue, 22 Jun 2021 21:49:16 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 6D3A45B6939; Tue, 22 Jun 2021 21:49:13 -0700 (PDT) From: Nithin Dabilpuram To: CC: , , , , , , , Date: Wed, 23 Jun 2021 10:16:36 +0530 Message-ID: <20210623044702.4240-37-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20210623044702.4240-1-ndabilpuram@marvell.com> References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210623044702.4240-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 5lfTE8NAtqilwosMCLG_jNhykCzsCLCf X-Proofpoint-GUID: 5lfTE8NAtqilwosMCLG_jNhykCzsCLCf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-23_01:2021-06-22, 2021-06-23 signatures=0 Subject: [dpdk-dev] [PATCH v4 36/62] net/cnxk: add all multicast enable/disable ethops 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 Sender: "dev" From: Sunil Kumar Kori L2 multicast packets can be allowed or blocked. Patch implements corresponding ethops. Signed-off-by: Sunil Kumar Kori --- doc/guides/nics/features/cnxk.ini | 1 + doc/guides/nics/features/cnxk_vec.ini | 1 + drivers/net/cnxk/cnxk_ethdev.c | 2 ++ drivers/net/cnxk/cnxk_ethdev.h | 2 ++ drivers/net/cnxk/cnxk_ethdev_ops.c | 17 +++++++++++++++++ 5 files changed, 23 insertions(+) diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini index 20d4d12..b41af2d 100644 --- a/doc/guides/nics/features/cnxk.ini +++ b/doc/guides/nics/features/cnxk.ini @@ -18,6 +18,7 @@ Queue start/stop = Y MTU update = Y TSO = Y Promiscuous mode = Y +Allmulticast mode = Y Unicast MAC filter = Y RSS hash = Y Inner RSS = Y diff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini index e1de8ab..7fe8018 100644 --- a/doc/guides/nics/features/cnxk_vec.ini +++ b/doc/guides/nics/features/cnxk_vec.ini @@ -17,6 +17,7 @@ Free Tx mbuf on demand = Y Queue start/stop = Y MTU update = Y Promiscuous mode = Y +Allmulticast mode = Y Unicast MAC filter = Y RSS hash = Y Inner RSS = Y diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 7b9e37b..516788c 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -1111,6 +1111,8 @@ struct eth_dev_ops cnxk_eth_dev_ops = { .dev_supported_ptypes_get = cnxk_nix_supported_ptypes_get, .promiscuous_enable = cnxk_nix_promisc_enable, .promiscuous_disable = cnxk_nix_promisc_disable, + .allmulticast_enable = cnxk_nix_allmulticast_enable, + .allmulticast_disable = cnxk_nix_allmulticast_disable, }; static int diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index ab94b99..70bc374 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -230,6 +230,8 @@ int cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr); int cnxk_nix_promisc_enable(struct rte_eth_dev *eth_dev); int cnxk_nix_promisc_disable(struct rte_eth_dev *eth_dev); +int cnxk_nix_allmulticast_enable(struct rte_eth_dev *eth_dev); +int cnxk_nix_allmulticast_disable(struct rte_eth_dev *eth_dev); int cnxk_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info); int cnxk_nix_configure(struct rte_eth_dev *eth_dev); diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c index fc60576..61ecbab 100644 --- a/drivers/net/cnxk/cnxk_ethdev_ops.c +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c @@ -267,3 +267,20 @@ cnxk_nix_promisc_disable(struct rte_eth_dev *eth_dev) dev->dmac_filter_enable = false; return 0; } + +int +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); +} + +int +cnxk_nix_allmulticast_disable(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, false, + eth_dev->data->promiscuous); +} -- 2.8.4