From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0060.outbound.protection.outlook.com [104.47.36.60]) by dpdk.org (Postfix) with ESMTP id BD0B0D0A5 for ; Fri, 24 Mar 2017 14:36:23 +0100 (CET) Received: from BN6PR03CA0039.namprd03.prod.outlook.com (10.175.124.25) by MWHPR03MB2797.namprd03.prod.outlook.com (10.168.208.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 24 Mar 2017 13:36:21 +0000 Received: from BN1AFFO11FD038.protection.gbl (2a01:111:f400:7c10::157) by BN6PR03CA0039.outlook.office365.com (2603:10b6:404:10c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Fri, 24 Mar 2017 13:36:21 +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 BN1AFFO11FD038.mail.protection.outlook.com (10.58.52.242) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 13:36:20 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2ODZhfw005481; Fri, 24 Mar 2017 06:36:17 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Fri, 24 Mar 2017 19:05:27 +0530 Message-ID: <1490362538-20854-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1490362538-20854-1-git-send-email-hemant.agrawal@nxp.com> References: <1489756124-10805-1-git-send-email-hemant.agrawal@nxp.com> <1490362538-20854-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131348361808938377; (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)(39860400002)(39400400002)(39850400002)(39840400002)(39380400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(2351001)(106466001)(105606002)(86362001)(575784001)(48376002)(50466002)(33646002)(76176999)(50986999)(5003940100001)(8676002)(81166006)(356003)(50226002)(8936002)(38730400002)(110136004)(4326008)(5660300001)(2906002)(305945005)(2950100002)(6916009)(6666003)(36756003)(53936002)(189998001)(104016004)(54906002)(77096006)(8656002)(85426001)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2797; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD038; 1:SMHQ4KY9hwnXGsuu1VwHJ7kfYW11BM7iQmCtd79XExwFSw0YupNS+QM4vGKKYcxz3H3R6mG6eeTAALD2g4D46X+I8sVNso5Oo/5VJKjoo2+Sy9yRRx1ABuzM3Vq33wLCrtIGUOrJHT4rhQwIkoIek8uINmaa7y8AnspGyS4wvXMfrQLufzgEVr7R4i5cYAj8EQLFrJd9JIkZR1ERS85NItKsamoH8ZSdUqrMVFtPgL7J+u+CNFdNave3gQ//nRBSsXTMjy9bnAVXMNzdiSdYT1SVMU+DchJQr2Fd72gO4qfChE+KnfidXtL1+M6+gqyFJZ+gZhXiLD0gKMStGzg91U7L4WgovHkzFruvwa4lOBmNcaSc7FI3Dt/XctCSVQHkkWJNRNDUjBGHHZc1zW5l9fON7xM1cbTcbOX59hZVOu/mVWTO+LyzOARe9cUhYHQ12z5boEWFVZU6iSssZdLbfzPnu8V6y7CYACUzYyynzBfbuB72id2JvM9P6r3GnIvcTuiAi+DoSiqqIGAniPy0nXpe9lR5ODpYWl/+N0A4rk9+LxgDA75hIciR3XuNpfwalC6Y6EEps8CfgmCg3wJTheVnDfCQklQVXJ9CzxcfaYMhD4xxk4rV/JmgYB1e/KtFdkK31A9GzozMj3R7YLQXIw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f74713e1-b7a6-48bc-2428-08d472bac1e8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2797; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2797; 3:JHXcjwE4OA8eWnGS9NZ95tkaYFjjzahO3VXKKJAam7Ce+xjy0/IFsE41M5Ow4crQccW1JjLjmqQoEZar1A/LO5d8qv+1+H/lzra2hDVxLOOm6q5YWV8dqJkXTxm2acKIZS5b1IsHsPG4QOScedJmgz0yseceFa8v3rxdjVLTAA1BCm6f29xPAoGGUaRkUduam68Llino7LUYSPkmk9bPZgqlVIIpWBUNUhXzVW523r+21S3ieuHnNWSTG74ib33ll+j8iw7Ll4nja9q9YICJQD10U1wq9w1szdHz8Qep1h8w187d7JOSgfJgBQR9qiQEsCwXJ77LyRhcXSdKNK3PYtGEoaFctpy/jgmL2j6I0oW39cZI1tZbBAA7VkCTe0w3; 25:kwF+GV9jyFjPDJWsIm4peEiL5drPb0NDwDHMSxRl21C1wJrkHmk+xssYEtINZomW1N+DtssiBXfG5Q/KM/6D8VKhUUu63P7rcAMBlq9HoXxEW4i1FtZ1GTXpYeqAlZyt7UTVrlODBT91Ujgwhqo3tioT6k0JqTlz3GnRbRpqvx3z225cVnaY2f2wzAEUU3U3auGvqk7xca3sTR4C+RtoXbx5IJwwLxDfDowPjV757uFQfOMjmXfo7cIwLvUiXn1C4EDEpZyiU0VCBsOw44R7jxdMyaK+B5bN3Pneo77ehRNfIN7Kuf0Bk++sjRGQmeB4D8wzr7PtpShc9v65nzmUYRtgXCxgPZrPEMyDwfGgC7Oriy9rPb+ijVbU5Wkf693meLzFpw/Lwxw7z8x0wvZ0j+BGX0ksA4ZT93mXKrhguGZup73qFxLu/YHkN4KykMjtbAaIkuAsgaWd42TasF9O+w== X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2797; 31:zMJKMoTSl2bCD3dY+DNyfUrPnObvBXbzUfmWs92Zdr9T1MY3jM/7dmT+tCKFv/V9x6vqY0+ojk5Zo4bCByOCH2BfFZ5ROnwQY8TS0veEDARKq0oZIt34fxUQEK4lz3jR/OL3ro1f2+Lgp7yY8dLVwPVTA1BxjBi+MEAhq3XYQVmfdFakdve/rRdVuGgHNoNzWQ/No6eXNoPGKb3QYyumO9YKKgED4kCdTm8RopigN5xOTIMn3VD1aeqxnc7medVksNOvBIjgOC7ccRGBWSnbGOYmrAqnExJ/KQLb1qUuF88= 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)(8121501046)(13024025)(13018025)(13023025)(13015025)(13017025)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123556025)(20161123559025)(20161123561025)(20161123565025); SRVR:MWHPR03MB2797; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2797; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2797; 4:1gv81vnY5arksKDpAeEKJ1ithmpUeEOlIcM5zQRbkp129+Bg7GRgFQaYxVmF5XszLtX4Vw2xfSDmR33ER6OWoL+HZHZt4q6J1hpIwNb6NCRDHshYdDOBNbhqBZezMuIvP0XgXu8vcMGBiWsPY2Me0ScArVrukyar0vdXtTOPP2JDRLRGxA3aiO84GkSy/Mf+0VI9bJl1QA5S/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= =?us-ascii?Q?o0NzPO8N9GJSDlLrCk=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2797; 6:oZg5YbfeZ9C5S1WQtLV53ZtI3HkCX9FYCVas+k1Ngot5HxGFfFUzUM7zb+jNfrwGUGLSUBQy3cPN08wOEpJkzSh5reRgW51S6KgCxhmdAc+WoG7RYb/KDaZnbIYE58cSvDjnTP5hNgkxguQYn57/8heLZR7m37bw8oW4ol/j9pGMObGcxlLtcjpOqPkf56HNNHSvpz5PjVSetNEO8/zkR8rzvFQjFB72hDHNsp8L4g2GdzbkPgBULf6gjx+9CMG7u24IykEgTS9nEDmppP2lJrut5nPMWi7rhKLTnBkAdaBJuxwWOBQPygahXuLNw+hKpL+RAvbaKQMN7qKtwQnacp5icVgNiHp2eTyXabFai7HZrYUDH6ccHrtWoJ9NQeq0ntR3q4NewDrajgrYYb330bHBVL16dwwM5VRL/etcNcc=; 5:onufRQLsP7c9CqaBuksaN6H2+FfwXGfnmWYcWGNhnnjP5W6DCA+5v9mhKyd2nXe1gFLAoln5bHRyxoXdW0IFapTpldXiuy9r7HeUZtR4JG9EDbtdetG6NnuBS8296tV3HYeWsSxiZG/OajPNDCMVoDqQ+xeveeP95G+efDhpBdsDoBtE4Dr4ME/e5p/VR5WV; 24:I56gYIlitVWpnoH3Lv1ZI8ba9xFIUgbgVX0JKV98UnbweCYMCe96YVlN9pNUJbRna9vGeTQs32KcVxiEbEztzLW44JgDCMbfAWkSXaQ8OyI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2797; 7:bdb/mQIluLCEN1cjq5TxCJ1ONvpGOotWDi8N511r1TjEoVnwy7AtjUQMFoVR6FhX/yTbnVAKGbf9FjqY24ygzF0A54xUAal4+Gun5uMiQNqbaUJwW0OG9MnWvdGueklzwAjQuiGh9g9YnxSbXo+EwoqDn0N3TMczhJ4BkBf8rbMINHxTKLGXspLwMyOGX5+Wbvf8lypyziDLWpzJENKXybTllXH+psmxeRKi4nLsP5Z7N2sJFZfQ7++sAYG/uqH8Q7pmBi1zxY2mpDe6GIfgks583noVwtKizDVSZPnpARnOpQ3z+2+zCOi6X2769KSLVuqZURoAP2G9Aul5H2uVBg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 13:36:20.7066 (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: MWHPR03MB2797 Subject: [dpdk-dev] [PATCH v10 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: Fri, 24 Mar 2017 13:36:24 -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 5328ed9..fc46c0b 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