From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0070.outbound.protection.outlook.com [104.47.33.70]) by dpdk.org (Postfix) with ESMTP id 147F9D1F8 for ; Tue, 11 Apr 2017 15:50:27 +0200 (CEST) Received: from BN6PR03CA0041.namprd03.prod.outlook.com (10.175.124.27) by DM2PR0301MB1294.namprd03.prod.outlook.com (10.160.222.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 11 Apr 2017 13:50:26 +0000 Received: from BY2FFO11OLC004.protection.gbl (2a01:111:f400:7c0c::150) by BN6PR03CA0041.outlook.office365.com (2603:10b6:404:10c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Tue, 11 Apr 2017 13:50:25 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none; caviumnetworks.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11OLC004.mail.protection.outlook.com (10.1.15.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Tue, 11 Apr 2017 13:50:25 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v3BDnjG0000706; Tue, 11 Apr 2017 06:50:21 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Tue, 11 Apr 2017 19:19:27 +0530 Message-ID: <1491918578-4902-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491918578-4902-1-git-send-email-hemant.agrawal@nxp.com> References: <1491725483-6619-1-git-send-email-hemant.agrawal@nxp.com> <1491918578-4902-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131363922257402079; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39410400002)(39850400002)(39840400002)(39400400002)(39450400003)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(8656002)(97736004)(4326008)(2906002)(53936002)(50986999)(189998001)(76176999)(5660300001)(54906002)(50226002)(47776003)(85426001)(305945005)(106466001)(105606002)(50466002)(33646002)(110136004)(38730400002)(86362001)(2351001)(5003940100001)(104016004)(8936002)(356003)(8676002)(81166006)(36756003)(2950100002)(6916009)(77096006)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB1294; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC004; 1:O1UvJMap1d35mzRdoGxUHtXzavDvKtrHWajnA7Da8R3PKUEBpsi/3cRwSnxL5SqNpg6QDlgkES4UYEychVd1kUAx9Kch9/ZSjwtKKs4NSKEdvNcTHzKrGw7JxzLzDhe1cP4Uv1yqY7okoGv+GuGmnhfmvaGWFXg1GIsuFVrV0eCmTYbdILzwKC352D2u9GyE2J3TrmqvABMMw9VITmhNrSxMbiLTDEu7HbOR59JWbboRoalN/vnmUc6P/UQlIv20Dips4BKzRm7TzeaP8rFHEeGnAlai3NbC5JxCBLZkKr9gTIsRWUegeffMkYCbMFv9yFlckCAS79L17VEPNnlDh/ReqqJd7KVNdfG3yt7FP/AAYPTJbu5SSPh7C6HxoHU03JyDupsrb/B/WvV40p15xrqGcCPrBclX3aNsNXP269VzV6HReGZ2whnm1Qyyxb6+tKYXkoggr8YoWEV9YLu0oK7xcTx9dN4IEB9ALmOrIeV1rUXP9tS0/TApZYkUkyL74goeECDM1JPxtqswOw1Itggzm7/wDAIq7mOIRu50O65XLBcvUFD12gKf7DepSTk09W2MXaSMlm4/1gqapA0KL9J/dAaaW9++izeAixEvwGxcoB4jk/AApEFhSBkPSS0prur3iiV6xEbrESU+QIxOqOl84hQLsAprX2wQbFOoQvk= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: be6bbb74-0939-469e-ec88-08d480e1b4d5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030255120)(201703131430075)(201703131517081); SRVR:DM2PR0301MB1294; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1294; 3:/p3nCNpbwKuNMp1l40LZ6YyeJGxCHnRRpaxq1UQ/EOcdxvpt3avXFWy7e1tPshyQoVOlg55L6+q/uGVBDpoCLZ6wM/O1QvMZhLQQWhgjqtq64aKSe0ZKvgyoa9J9dT3cT9FZaqTXaXMWS/UMKN2c8DjZVee+nr/3cGJHe0auaajVVD5FDXPg+LjEqxI/C9v7XiQqO/oAFLeVWmQw9UBcZB6K3Se2MH9fht991TsrOnTlRdH+WvRKyfYlFSHNNJ7/KS2ARBqcXPFHoU38V2UXBP1llXHEv6yBmqjW/XWcNuRbrtO8Y8jeI6joeeqS+lIR8Dx3MxmILVF6aQIN9f25NbvfQrkpuWDKGDL7PMMyteVXuqFBSmmnEeqCMmNHPzp6sO/Uov4Ymg/toomUYv76x2czAzZ9VFQRVPfO80bxsihZ8gEgjRWfTTh5sI/tO3PcjPp5lwrd+eHDf28yihQ8uQ== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1294; 25:nQrmT3nXZJupRK14aZH+j0WG01AqL1cePbdiuG6/A4dOD+Qo24NnOqqWsu69vxojiEhWxCi6A8fZTyzWMDtiNk7av6MZmn/etYi1wgqi3FI7FK3bkjJ/pbqcs+w8mrzUCOZJFe9cBhUHsJROEY9maMZ1BGJySmzFKmlrqVHSkYdfG83SSubX27eNydNVZTQsxWGUALg9evfpydQ5tuqAa1zlSOzB26T6tdQB7GNBWaYdR5EAVE/Pv2HJOFu8Nx75NbsUuesxpfl8KghJJ7jeUjGgDjK0HBqDV2ldRmXWj9ywZ+O1aQgwziMuQKDR0BU2KoGR8bD6jH39MxBt8OqzCOZy7XD0ez8fIomPakqxg6FevxNIZ2fUzElakuB2esw9hmYHpdUQ/8zsVltcSfPgU5qhbFs4PLYXMnrWzNV/EdtapWdBmPb3M8RUkgs/crXFaQQ6UP4jljNZVLEHnovLkQ==; 31:Xy7XWEyWa4SnK16jJ+HnbXsTia18wZmdWk1zWadnzDwc8BXnB0IuqQOxWJplNbtKg/oVRvIM1W6AenopwV8MWEgtgaJCcixBGzRPt3xM+Ld+OENeV0eD5uFcFVB6FTGCSrbvHiMq4bekbjEq0NOC0iDZXXkzo5F/ToC4enALiMRZrxI/W3bIvGMmm25xGokklS1Xe9a/zktigxJnPW16DoB2cWgqTcOy3ke91xjV3LpO1k+R96eCWCkr536IqJ0j9ozqS/zKny8pHEruLn9Y0A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(8121501046)(5005006)(13017025)(13018025)(13024025)(13023025)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123561025)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123556025)(20161123565025); SRVR:DM2PR0301MB1294; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB1294; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1294; 4:9cdWJlds/f1HSbPvgdcf3t/LmC6UnnyNpzNVod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r98dn12z9cZ+FNDwCZFHibottkCRjQ/kd+4ex9JwVVPIyOTzqktjxB3skDynN4NuteXdObSfPIQY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1294; 7:VPqzH3GTSk1tX2jokDUC80R8oMvkrgXOwTSxMOUUrbklCHUkqyn991TliqReFI2jfHjIdfIsuHvBI0snEJDyBj9F/HMUsqyP2pb8Dbi2NwnVOhtZ8NwWIShai6CPUYwof+4gaCZmbKVVc3NGQsmEXE90lms55BXG3xMxflJEOvU4XbJCBfgq8rtrqNQZxxy7VFuOfOkjkM2BJXtepdH+RVQGek3tBfyFrr3au7EWhXrK+w/iH6cDQdVPn/G1XqiTOgdSBiNIvEz9ytaDFFZB0rwPZYgaZ7MI09NjDAqM3zWyFVV4+pWDujxrF+yWYPXsNpvUOssOvo81fPhiDekrxA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2017 13:50:25.4126 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1294 Subject: [dpdk-dev] [PATCH v12 11/22] net/dpaa2: add support for promiscuous mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 13:50:28 -0000 Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa2.ini | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini index d50c62e..b7c274a 100644 --- a/doc/guides/nics/features/dpaa2.ini +++ b/doc/guides/nics/features/dpaa2.ini @@ -5,6 +5,7 @@ ; [Features] Queue start/stop = Y +Promiscuous mode = Y RSS hash = Y L3 checksum offload = Y L4 checksum offload = Y diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index f4565b6..a3b7020 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -437,11 +437,52 @@ } } +static void +dpaa2_dev_promiscuous_enable( + struct rte_eth_dev *dev) +{ + int ret; + struct dpaa2_dev_priv *priv = dev->data->dev_private; + struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; + + PMD_INIT_FUNC_TRACE(); + + if (dpni == NULL) { + RTE_LOG(ERR, PMD, "dpni is NULL"); + return; + } + + ret = dpni_set_unicast_promisc(dpni, CMD_PRI_LOW, priv->token, true); + if (ret < 0) + RTE_LOG(ERR, PMD, "Unable to enable promiscuous mode %d", ret); +} + +static void +dpaa2_dev_promiscuous_disable( + struct rte_eth_dev *dev) +{ + int ret; + struct dpaa2_dev_priv *priv = dev->data->dev_private; + struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; + + PMD_INIT_FUNC_TRACE(); + + if (dpni == NULL) { + RTE_LOG(ERR, PMD, "dpni is NULL"); + return; + } + + ret = dpni_set_unicast_promisc(dpni, CMD_PRI_LOW, priv->token, false); + if (ret < 0) + RTE_LOG(ERR, PMD, "Unable to disable promiscuous mode %d", ret); +} static struct eth_dev_ops dpaa2_ethdev_ops = { .dev_configure = dpaa2_eth_dev_configure, .dev_start = dpaa2_dev_start, .dev_stop = dpaa2_dev_stop, .dev_close = dpaa2_dev_close, + .promiscuous_enable = dpaa2_dev_promiscuous_enable, + .promiscuous_disable = dpaa2_dev_promiscuous_disable, .dev_infos_get = dpaa2_dev_info_get, .rx_queue_setup = dpaa2_dev_rx_queue_setup, .rx_queue_release = dpaa2_dev_rx_queue_release, -- 1.9.1