From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0066.outbound.protection.outlook.com [104.47.36.66]) by dpdk.org (Postfix) with ESMTP id 9B7F5FA46 for ; Fri, 3 Mar 2017 08:14:38 +0100 (CET) Received: from BLUPR0301CA0009.namprd03.prod.outlook.com (10.162.113.147) by MWHPR03MB2959.namprd03.prod.outlook.com (10.175.136.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Fri, 3 Mar 2017 07:14:37 +0000 Received: from BN1BFFO11FD037.protection.gbl (2a01:111:f400:7c10::1:133) by BLUPR0301CA0009.outlook.office365.com (2a01:111:e400:5259::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12 via Frontend Transport; Fri, 3 Mar 2017 07:14:36 +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 BN1BFFO11FD037.mail.protection.outlook.com (10.58.144.100) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.947.7 via Frontend Transport; Fri, 3 Mar 2017 07:14:35 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v237D50W005035; Fri, 3 Mar 2017 00:14:33 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Fri, 3 Mar 2017 18:16:46 +0530 Message-ID: <1488545223-25739-30-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1488545223-25739-1-git-send-email-hemant.agrawal@nxp.com> References: <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> <1488545223-25739-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131329988762263431; (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)(7916002)(39410400002)(39860400002)(39850400002)(39400400002)(39450400003)(39840400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(626004)(76176999)(50986999)(8676002)(81166006)(8936002)(5660300001)(36756003)(77096006)(33646002)(305945005)(50466002)(48376002)(189998001)(2351001)(356003)(8656002)(6916009)(2950100002)(50226002)(110136004)(38730400002)(2906002)(106466001)(85426001)(104016004)(54906002)(47776003)(105606002)(4326008)(53936002)(5003940100001)(92566002)(86362001)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2959; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD037; 1:4O4Fat6m8DwSNPX36pyGLw3tFwG/wXi9R/LWfFj+nUCl7daAl+5lnhxGj6ABbFjhVLPoOXLl/EPdGVPW9ebEWvFcyk3PZ93MMqQxx8I7olF5GbmOE+VFS//NDgR6JCbVMpgJt2kiINxbhv8HdIyWnIpqsOE7f44b/ZS27UEt/1WHSXreWbnLq0utdtA5jU5Ck9MgPaCiwFwCAwXz7jdhYb6oYjT8sZhtwLNISUyHXJS/Y2b67AHqF2pQQ5Oj4locWohxwnsVIdDwPe4vQ9STP2ke4l5QGpdm9gULOyV1UanW0fU3mXu/1U2MiralsKynTAHIFx99xYFhBqfeWH2BIR5u6pCqF6rPGYv7EbeAwpHeKzNPa/KZB5VjLyUpf/2Q0+OOXmVfR0u91BO74Tckd8rnRbbfeFuJrxJZW2KoUx9fm5O/lGBwDW8bxsMnbeiBHN+JHT0nrGGqJAFtmG6UDts4eVH0QfM82nRNP33ySoxuOFZf/YkIca5/im0mhKNCFnuUe+ALKH9ySXGsIJRL01TYIFgR0dGKmt6GWbO7WI0+sHmkwrAQUEOHJQQHZmtXmkah5pIQqKm/jLRTC3WUHmsqS2C2cdZs+ij4GP8GvvthMNzDQc0WbvJoNZ9q1vUW54MR+RA/VHRoveIDjVsidg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 89e8a9c8-4ca4-4d55-d48f-08d46204f2eb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2959; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2959; 3:QWirCNEww5I4zoe200CEhXYjt9Ots6KAlL7p+lt+bmWNcktnN/ghxBjXm/QGT+pjmIbk2Qj8dAIyV+n/Pmo2vfE+rtGF+rozM9cuQCICyj29cbiXyTR5R5cI+GIi96AQDqA/FxBpglOsEKGvGTW4rYeh4uke4z/WaH+jqV17/bnk/DjKHIkCYOGfpMsjqsZiy8/rFd6iHoWmKnY9lJKQ4OH7mUGKOKGIa3gGqRC90Apg1me07h0LY+twGFXZe0Z/xbgkchlVht7XSszrVLHqe+asky6u9Yc6AJYaBHv8ed0NKM6IU35BJ9G+Q0b63VGwkHwMpqPUDZ5lUEgbVnz1r13UnGNfxpGQ85uJg10SRVP33HkpRFv2fnoj/f1KSf2Y; 25:mwBK+J22w3IaxzGnQspylUvIv3GCe2Mbk1uY4JwhJwlQOdMqSwc85/FPTKkQNAyoVVHOerdnoe8wab9j0/nvSxTAtiAYE4ZYYATa0bx71mo9eddnetmbV61vtdwXRPq/Wid6On73PMlslf7OCxcL0RIugW49jwnr5FRDbjMdHhlqSe4k80YNu4vS6w8b+Rei3KCRiGJTwUIog43bTBCUr1qAZmQwPSPfW77AuMH+nDZQLqGNKTCPHhMY8USkVZaCcpMHtN6z77R0uLw8Teivu+WoroZQzF/B5Fvq/tDFGEp9KdbORbFNIRARDMiRWZkoc1FDv0RQD0slhuygXP0qXoeCJgNOffljyVtSN32jTf7czVsJCbSEI0WPxLJWOMs/g7x0ytYW8Ml9B+5IO7jAh++inOJvsv7EUJ3pmWpa4SzyPEFcngk1rWHr9MWVz5RsVkNJFmA8j4hQDWusPP0quw== X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2959; 31:4am1URJFm5AMNMNZPB2tAwkrBCNtZ9MKRyWMcDN2oEccWX6Yyl+JBlFbJGcn7lZ3l9vRhKz7pAnA6Icc72w+VR20VCYF4RGHpsRst9yDVsoZtSkJzg+O0jcQH/B7fPJumkaLiu+PqVt+CcaOObpFsL0Z7M+DiAOK56+V4I3OaleoYEh0XIKpxLy9dk1fAsf8O+NXEC7pFwEYjR9uMSVAvnPKyRNZOw3U2c4Hhkt+9bRncIbJoawnH2TAJbLspVO8f7uhjyAxzGY2Ncr35x7A5cgfoMHfF2AvgYELEBGFQ8c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13024025)(13018025)(13017025)(13015025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123556025)(20161123559025)(20161123563025); SRVR:MWHPR03MB2959; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2959; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2959; 4:JQxLC+CsGlSO1UUq/TEtu5eYCxVsUveil0nMWSUZHFQLQfB+fxM2+WR+JzcPFs6AaxqN73YZjt6uLhOkmBjL74n0LmFcH0FgbmPzj5YwBAFejKM2gZIhTB/39GRJEwgDREZbC2BeKodIwWM27XKvg0mdUZON2wQiGL4TWxilz/N5FYnwtNK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WrhNLI0x5D9svJKf/zA2UvAoLX+W0CujugZnyYpxG8QL7HYKmXac+kxHkxFCi8l/ERW1NB+nTylJ8mFJJRNDJMiajja8g0lEk/kNHbwTGLZ1C4oZSuIKt6CLpIiT8b/zuCwGnNiPpl/+8dAC+beUL7dRyO3TT7dCPJdKNy3YTtIs0gqDtpA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 07:14:35.9143 (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: MWHPR03MB2959 Subject: [dpdk-dev] [PATCHv8 29/46] 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: Fri, 03 Mar 2017 07:14:39 -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 763c574..05c7e94 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