From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0043.outbound.protection.outlook.com [104.47.36.43]) by dpdk.org (Postfix) with ESMTP id 66833F94C for ; Thu, 29 Dec 2016 06:15:36 +0100 (CET) Received: from BN6PR03CA0028.namprd03.prod.outlook.com (10.175.124.14) by DM5PR03MB2474.namprd03.prod.outlook.com (10.168.233.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Thu, 29 Dec 2016 05:15:35 +0000 Received: from BY2FFO11FD003.protection.gbl (2a01:111:f400:7c0c::168) by BN6PR03CA0028.outlook.office365.com (2603:10b6:404:10c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD003.mail.protection.outlook.com (10.1.14.125) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:31 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBT5DOI5010218; Wed, 28 Dec 2016 22:15:28 -0700 From: Shreyansh Jain To: CC: , , , , , Hemant Agrawal Date: Thu, 29 Dec 2016 10:46:42 +0530 Message-ID: <1482988612-6638-24-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> References: <1482180853-18823-1-git-send-email-hemant.agrawal@nxp.com> <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131274621345558461; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39860400002)(39380400002)(39850400002)(39840400002)(39450400003)(39410400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(2906002)(92566002)(4326007)(8656002)(48376002)(50466002)(50226002)(38730400001)(8676002)(76176999)(33646002)(68736007)(50986999)(81166006)(81156014)(77096006)(8936002)(5003940100001)(6916009)(5660300001)(189998001)(6666003)(2950100002)(110136003)(69596002)(106466001)(305945005)(105606002)(47776003)(626004)(85426001)(104016004)(2351001)(356003)(97736004)(86362001)(36756003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2474; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD003; 1:RLVzfArxK8uAfTDyQy5DmenKM0L2BE4Aib+LbpPYS2m5Z+Ns+bKIznmHuZTomlrBFyP9FWCAD278gU2oTx2OvBrkb81PnRGzVeKatxZKcQrPTx5cu+5kabqjyp/QT7GPY+wRc7atj25pqZ8OxFVV09HJ8omBKnWMfwtC9f1WKDGDqx1kWCSPE0+pYS3pyAS5Os4Ax6RRvea8VjHG9wXTbggOB72c3Re1wBeP1JRvmgmV1BLUKrG4yRunM0OkYaN30dCsulQvsixZsBUt0uQQXHjgtvMV1tyH7lE1Qp4bIfcCiPUCnjUpNQfKK6bEUN7lbIhfA/EeJpTXG+PjPl9SykCAMzaKLXh8pvt9UlO77pUYkIZfksYkgIu4zkY+DAVEmsQZOON0j4Z71TpC87hMAVLwgIWq/28NkaoDbhcaKcSOke40uipRAhAQPJzPbTAX26CQTcU0/pzoBWA6WA1M7tfR5HyILoBLSo8kzF09oqtrLCxonVyCi147szROksdjCnQ6szEM0YTKR5oRc49vtBvstLCmM9kmbvCFOn+EM0tVToecSx9qHfM82ApLNwb9z/yQZ3fOJMju5vEjvqmpaaacj5SMIR3uFVvH3OAmmeVi5HY/StSyaS8ilkcbzKr/BsCcDr9yvSBD5nSrpGtR0Tg4+ADruc5v2J9OVb3RJZUkJ7X5CWVa2gVIMiSS+Z85SJdS3ZwSo5gmspMAas78hJAeEmuOya81ql/zlj5Mh4bTgJmrN18ckBYAa9xdnm/NM1uusqJGMdjBoQBD6pXWqw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: d53ed900-3649-4356-64b5-08d42fa9b7b7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2474; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 3:PKf78CV4bYsiKIdPd4dMMyoRcNmlteqR38CLg2BM/A3kSAmqicqJsm2Du7WfVd4Ga7fE82DVShSvt/ErMw7F0stzTIPRB7eFLI/Gzdm9UyVhfTK6mWaFT33PaGuBPKdYatEquwInhFt7ClAv2xMsG5qQTQ7ocEIHxhXBCSjnBBRbpu9XgYwUg9WJahMBpGFSAPh7BcURu/4pobmBzujgdTCPP+BeLvouPDkX/5E+wbNLqaDtrgjLGR7+rQkXJQQ7fpkCi1Bvb0KLH2uTESysV8liFIF0W0OtJdKMc0RGA93yQJsrGxv+OyP6fOzwsyAhxgt/B9oV/TyFNFyeLTq8MZgjhVKmF/5zBcOkqBx068M= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 25:+pn+g+w3YgfHkwiDwihhTd2m3e1QSc7tixkXbBcp1/kul4O9GKLgQTxQllnt5B6UiheM+4OAF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:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13024025)(13023025)(13015025)(13017025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123565025)(20161123563025); SRVR:DM5PR03MB2474; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2474; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 4:/Ep4AniR47Y/uxVL9Xxcu+pMFjVOv5V70S/YsizzbTPttdZooGj6BPMyOU9SOHXGywnblEY+43DG4byRtpXgvcyTPNZHC7Lg8ptApHfZ7s1FbSb/32hD6vV3fOg/Z9MkiTv1D35U3j4p7ohcl4b5CYUKWALmMflQ/9nPkgZ9IOgSxRxWyZeer9AOTfLWof400b7jlxiEEDEkLJkUz6KH76pm7qtul4TyoXDdeyUb+MJbT5MWxgzLx9pEJlIN8Rx9SvlQuos4d4oNJFcgKedd4c15nSM3ZY+zThuy+kn3wAa37Fnr9Wse92oyhUTJAtv26N497OyaI5G/7K3yLSOTARFeUb0lR9IC+5xy9wxA/lOraxAQxIViIr1EzQyKfL9w08ZIw1Ncf4bKQtHgm/PetPjtzxrXutTLqVb2oi/WrC3BRBYaYRjM1NrYYA5WJQsVmZsTpTTYG4Dj6k/FGYcUnhk+XRWYWK6c/DJXjos0gnywO+FAsKytZVYO/YZM37fgr1gQDZqolw1e/YrSAanJQtb/78SWQsQJQ6Gg7obH+WA3/JDLFMKGmldcdfEQokLCKQrd0eVspylt9C+p+LaqV4qa8S/cWzvXISia6LhdkzbNSN8b1cLx6lnRzMgwqp9XwolYPCbJzdSADC33dsJi2V1WdPV6xUfjuu0EzkNO8MgeDwc/+fDVU6Cs1tKuF6IRi8IlrpfcNzH+B10m6OUnB140m55k/g02/s/3+lc9NCgDd2i7NwKqfEauowspzNmF X-Forefront-PRVS: 01713B2841 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR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; 5:PbE+HX58LbFgDb+Il8ANxqrDQUiFcSJALYARpiTdYfN5n3woFrZl97j5x1HvuYO9Jvy2pHtnOaOdkM2Sw3bLrVNMLCHDikyQIFMb77Vgm8VGjOAZScbyPxIC7thzjNAP/Q+a4mPFTnf8PIMXsjuhVPp64XihSp5A50+jGLXsxGgbmGOPRKRxjrn1WM+Mx21Q; 24:KYx7xBFsREEiOXor1HWQ1Rs8lEsrT9PSOyXjvoxsaM5CbEwvvw720HpjxeUi0XIrVyRd+Pe453w0PLsbAWHN/ozPYQ26PLAAVXt8JwXjalg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 7:VY03NtjoysHI6i2PW+EgkYZ/Lbtc6LIwnAPBbgip3McvS2OMX1oI99emxxipn1m1oO+hVkQ7ic3IdU2AB0Q/lLiA6gqTI4yS74Uk0zexZPxd2nuNsgO+3YKpuWNKaspYoqITb+KmGy6kuGNWGgdOMI9FIJ5zGLKpTlGZxB/Xyph6KFfBc4mwxq0gxV/vqPkPOlgyuTTDd1YzkP4zWWcx0r9fctjcafjdrZb143n+EB/JUwRbgxLOgIZ3BeqOKYo4NqGvP7DfKku/8M24e+33H7uBsb4IC8VTxVNPYGYsNjAXaBAqCd0TtokP1wryxM/HkAfq+fTTMw2yZyqleJkHDQnAbGRvXP8EQ5+vSzuQkTaNNAX3PMULOSNt6VLXhrynL/WWNYOz9sOBKgh9z/hdyI+O3zTRXcFd3nmqhd53RqOkHoJQNr48OCq3gT/4bM+Qe+kNExWIVFssHfRU7mrKqw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2016 05:15:31.8570 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2474 Subject: [dpdk-dev] [PATCH v3 23/33] 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: Thu, 29 Dec 2016 05:15:36 -0000 From: Hemant Agrawal 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 5d7add5..7a5c4c6 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -438,11 +438,52 @@ dpaa2_dev_close(struct rte_eth_dev *dev) } } +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, -- 2.7.4