From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0085.outbound.protection.outlook.com [104.47.32.85]) by dpdk.org (Postfix) with ESMTP id 04163FA33 for ; Thu, 19 Jan 2017 14:25:36 +0100 (CET) Received: from CY1PR03CA0027.namprd03.prod.outlook.com (10.174.128.37) by BLUPR0301MB1572.namprd03.prod.outlook.com (10.162.214.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Thu, 19 Jan 2017 13:25:34 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::116) by CY1PR03CA0027.outlook.office365.com (2603:10b6:600::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Thu, 19 Jan 2017 13:25:34 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.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 BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Thu, 19 Jan 2017 13:25:30 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0JDO4f1015351; Thu, 19 Jan 2017 06:25:27 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Thu, 19 Jan 2017 18:53:50 +0530 Message-ID: <1484832240-2048-26-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> References: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131293059338398294; (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)(7916002)(336005)(39860400002)(39450400003)(39380400002)(39410400002)(39400400002)(39850400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(8656002)(54906002)(50466002)(48376002)(5003940100001)(33646002)(8936002)(8676002)(81166006)(81156014)(50226002)(104016004)(76176999)(86362001)(50986999)(68736007)(189998001)(53936002)(97736004)(38730400001)(77096006)(92566002)(85426001)(36756003)(110136003)(4326007)(6666003)(6916009)(2950100002)(2906002)(626004)(2351001)(47776003)(5660300001)(105606002)(356003)(305945005)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1572; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:e4X5PWSX+oh+adr8NTtOXjqO4aDe/WcvY3wLbLb13jIvX3xIGbkjEzLM9kGIKEMrRDcYKrPDVpTeQLdN4xgL6Up4ULoo3lIuQQEVqiJ86jWY6zBqyDpxvQMaOft3CtFfve6C+L+JBByodnrQLeBEivIZsI8FwMNGpvYtsGB/1ClzNVaP0eTdyt0Ml4YYMwid4JjH/aKLqQwzhKbv6i4Gg6FF/Fzs52PnQLlxJO9FZVL9tiX3yWutgZrKr9CNUQUUu6cr3IfsvMyQ6hJlMa/5aTscZkeUtQVzzTdmL6yBJrqJK0tvOS6a09daTg+S1BIDA6tiXoSDBFpvd1fDPcLA0+QiQzrM0azc/J+ezZ/jf14vqSJj3NVYAOtcDKLIZzG+4uXwQogMcT079zwnMfv8Hc0E/JbLKSnj9KolTnuV+/AOAxvTUDAmiOASRyB1anQFLELiRLWlLxZ/B69NmwVzgsCxNMcxbAbUCCT/oiJqIEs6iSkUkx/82PWkOsS8SOMcgpXR1dkSbdwYeG8hMd9zSFg2UET/5Auz3F1NGcNa2v9r8qJwFne8Jg70lzVl59/vgJKYrkw9INFG3QqlKCLkmzGdaw63sCd3dHEw+Oe62afTr3093M074pNJXTXMwL5fnt/De9kiwV5M6oMPHg89i8hdcJOEYJVs96yYrjZoiK3FRrUTxeD5hV7Wi+ec2ItaDjb4i1tVxs4AuddoytCj0rnEn3Id+vQ10Gbcm9TVrCD7/AjLj1xwB/Ysxfn28o7E MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a0a66bf3-f9ff-4550-2798-08d4406ea5c9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0301MB1572; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 3:QFcOGlw2gQ96lVdepzZ/9fndMLinXtIFAe2DSu8pIc8ov1Hr3/0/HR1N8hK3FUfQB2NUrqn6GhPZMuE1zZGcWZIyOE8QEV4Az0zkprS8tC2t354iUqNoVJZcHgRlCXI3l/QOmlIhYZ1ZtWVSYXhw6JO/PBsIe9xcD0grBRgv6rtaK0sCADEt6IYQp93GCTcuZ4fosAhrPtCZI95qhR24l55LMVpH6WBM7Y0a6NwmWulzz+3mfv5FZbWbi3w8JG1x77K9es0odOK26oCv2b1klbPAKL6keWvEyZWjsOUD+yxiQJKJuG4yW0vGCp0tuJFjf+wWDg2MWG1wJTD9BPMedFVaZ/D/vnMj/bTgfFNSOWyouPzfe2oPKhnlPxPC9dur X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 25:wxT65EYzMVZdw8fOHKm96hjjFJIFmozQi+A0Z03y/+6wK7ruXCtjqcUnpdvUKgR52Ue5jKgjMZc5XeH3yti9unEsheWFTnI4NxD1axIWMt1G3ERObvJkh3wKdBBGpWrxxnl18V6Fy9DQLel27KZ+d8f0gBRmw7+j5c7QOmNS3rNixBBGf995XTkGAhTliFl0dsWiP6VXsUWZMVfY/H0BUcmYNeFQhZ2a1Wj2YRFAwQO8pE+uI7qLOh1U+V3J/JgFovEedPvOLlgYZbT+ranYfbNCZ7esluwO4VrYn0Yl3rBCesqYNvupFO1OR8MnQufcKc8r3IAD1Tn7BrvlIJRGqaB6pGwGqYO4uL5X8CKU1ygUi+ThJkBfOSqojA9c+aLUBfPVPymmsV0FK6ZqJ5jQIFNv9aIGvhyxTE+3/rwpTAS70h7i8YvV1e6aa0Hh+dEGyU/BX5uP+w3Ck/OPPnATXVfsHpJmaMA1ttlguBRK2tZ9Zx0hM/430W3xOQHM7meoUDv/C5sm772aG40XyOyp5zMFKSZm/HrS9W71NTpsq8NSaQPp9fWqsyxbKMHxEZoOO3H31SLAQo0CibE8AmNiow0hcmKD9gQpgHf894CleI5xeSSmNwcCd7a0ye7VroG0FqSK6SCEwP58vVr+7YW2LWBBEkpnPfeNe4ilG4yfPUPF/W7O1bTom2lbjznXSEiJOuyrD2USC9yZSlvdT41kqaIx4mUMMH3aGqTGLH9DGkiaHrggodrtdoqG9dE3DWRj X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 31:Kscbl9KyrmEd2PyCu1lJ33FXifv9J16v0TXQBhXud8P3HTy91p297Udhs4NPk8x2dVxwWxIFp8supVELOuy5ntz4VFcU9w9uCBR9ZWvnuauiX6IK+gOx0BapmTaMv/BVTXAKGAujsALQbWAgMg3Id89Y/XN2pHiWPv4neGr1KguADu3MWATisWIzCvnr4Zf4BgmuZt08OlImHQfIdK1BVKQCGOYGjGVTE1hrGoXvT87CtbVuObtfiIDZSR74LxM8meeTvoZe3eRUyltAdA4deg== 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)(13015025)(13017025)(13023025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(20161123556025)(20161123559025)(20161123561025); SRVR:BLUPR0301MB1572; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB1572; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 4:D1suUN900KQhl8HOaR0O4i/Xhv03hw777XRxym4VyasSwiRuMl5HsRFKuq+yulDboZKuwE41YN8JBUlH7jw8vVUGJS3Zh+NoRTE/4/7wyq/w+SF4YRygvrAfIVpioD/SN8uN07q9NfVG9HGHC1Tf2SPpuUSpFq2jOmUbtOLDKzRfjxBA9sKpuAHq3nFfn+8RbbIq3URT15Un/8kuqYE70VrNZs9QPAnA0RC2CRisJF5bqR9pnUlT5B3LzHYQqato347u7hoGbD0c54P0RCdgXQg+ZXX4wOWc+iQ8rRDNmmdGU8ttTAk0RqwHtKT2no2MEIHHmL258FIAiIW0HLCnOPVE+SKj1TkrytzTP77H0pr9nQLVTcFrjqRJ8INKAxv1TTl9Y5BmD1gYRjdFXpdtgg7Jgk1UJm52SqhV+6jsFxD4ssizB2jcb8uN0+iBNrort4PqDJzYA7hdIsZVkQa2eT/UAc4JL1tH3CE83oK1BJnRDMLJzO7v0DA9t/+5L3iYwh2jJsi5FAflcq3QH0xGYct9CBsdmVmDJT1t0ux4X3xHziK7uxZEXxFpMplxq0wm7QsFcAnSuRXGun3BbmPycW+WCGL2WOm5oUlnbXHr1rEZqWNYvsjY+0/yTCieLyQWJvlj5WGRYGAEIrgqSRZ5At4KShH2ksWmIR5VoOCg7IDxHXJgLAnzy/G7W/9vbU843J5WcSx3fe2365BKRqCOSf1mS933DcszMC6bzttrkQ2qKl7M3wJLRF7BXA+uVh4V X-Forefront-PRVS: 0192E812EC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; B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GrR+44zkS/sBAf2ou9WsQQR9/AxEPVKLdrmchTJpBq1bO5rk7i+7ScqMbBOC84zi84sXtnkF+IxYbX+nEc31F1XGa5aOKO41Jmv8FNw7f/AyRJUwwio3Vr461iTfLtF4zNamExeVkp7MDhUWcW4o2lXtYyRO3ExS7kDUA; 24:32kSvIK/mHkt5jxiK2WNkEcel8V1W98sAqMTS/8KKpjYqjGp88J4S30DjRykbUSV8XEBOXNZE4BpCSXPvWD4ILQTyL0j83g4vax+SDWPR1Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 7:fEvADM3TrwUgypSwAfahnCd47KAxB8xcquSU7z8pj/BgZi7/drP2XEQVCPZRJlqAHeveBQnDvsXSSdInzTK9sOovX44N344o+T5HiGG2AMgMN1A8Ys8TEyfS5Dz9yfJ481yyuYNf1aykI9nYEoFN9AwoZMS1V3DbZPpeau46pdrK8rU44KWrP3r50+vzCpfgxUIG0DW+kNPux35GMQ9tc9oxmVGEfo6luoMz3QGeXfa17F04ha7NSGv44J9ab8IIziomOwfj6Q74P5sl9yWZi52occhneYFbpzt729Uoafe5eSpwiSoAO6v9OTjT0Zl3iQ4ManQbu+GiRFVR9891ZZMhTKKclYu7Z4abBK+1yZ1J4Roxr671UDnwggY1WWVFw+Tb5v7TSbDU9M+TDCm9avz3ZudXBsgoMbu3Mjcba+CwUxF8ktIn7DRVeXfk1RWV5O4n0G2/hutXqIBOoxqFNQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2017 13:25:30.6574 (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: BLUPR0301MB1572 Subject: [dpdk-dev] [PATCHv5 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, 19 Jan 2017 13:25:36 -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 b85e31f..76d8e6d 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -438,11 +438,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