From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0076.outbound.protection.outlook.com [104.47.40.76]) by dpdk.org (Postfix) with ESMTP id A0D9EFA65 for ; Tue, 17 Jan 2017 14:20:35 +0100 (CET) Received: from CY1PR03CA0012.namprd03.prod.outlook.com (10.174.128.22) by BY2PR0301MB0743.namprd03.prod.outlook.com (10.160.63.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 13:20:33 +0000 Received: from BN1BFFO11FD047.protection.gbl (2a01:111:f400:7c10::1:177) by CY1PR03CA0012.outlook.office365.com (2603:10b6:600::22) 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; Tue, 17 Jan 2017 13:20:33 +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 BN1BFFO11FD047.mail.protection.outlook.com (10.58.145.2) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 13:20:28 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0HDJ8mU021741; Tue, 17 Jan 2017 06:20:25 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Wed, 18 Jan 2017 00:22:44 +0530 Message-ID: <1484679174-4174-24-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> References: <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131291328319850401; (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)(39850400002)(39840400002)(39380400002)(39410400002)(39400400002)(39860400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(2351001)(86362001)(626004)(33646002)(106466001)(356003)(97736004)(47776003)(5003940100001)(305945005)(105606002)(92566002)(38730400001)(85426001)(54906002)(104016004)(50226002)(189998001)(77096006)(2906002)(68736007)(8656002)(4326007)(8936002)(81156014)(2950100002)(48376002)(50466002)(8676002)(81166006)(76176999)(36756003)(5660300001)(6916009)(50986999)(6666003)(30001)(110136003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0743; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD047; 1:YhCYTXT/bE35e/eNpoI4mtMhy7L/YfqpSALwlzDj+4xvGqiSjK90TuG5HuZMiUHI9r8JsnrzntBIc6An64XVG/4ZV1hwelKW8fCW4oca4vLF6tFl2YQQZtbrHJM8AvqTBo0Ok7u0H99rlMRLcUgCXm6B3TvB9e9zODpFRU60L0F/3A8PXfXfii9A+pLL1FfkqtpYafHOPHyBfDwBk4tIHswThp9sxemaj5EQd7gOxj9xGbbWQdabbks3IabXaW3dHW0lkUab9IeT8CvgaS6Y/94dioEUgLOLib1gK5ejJ/Fcurp/vl4KdqluUQ/QbnYcsrrFmPpNiAiDIDGPpiz8oltPysMm5yyt8V6DuehXZq2rd2PX3kGForXRHd7UlYWN0g4TAn/pbhXyZC3yOZc3BwYhOzuXTNaudm5uL9qL93pmvFsTLpij4i2f/QW20FbKnJpBZzh+mv6n7u085+5cCVdzPh/ZQ7SKyEAJDP+tO2VYCfJd+CC60FsXqNVbVKPONuIZWwqzbrLIkhT1jTsCciwIPkaJzyVDNWyc4OEQfCCnROcTgdQR/Xm3muxgJzDamsBTUgOaBppE/mjFbwrAmwQEk1CeN8uH/MTwfnVunwtCkjFy65HIVVmuicO8fIebTfrxDn06GeIqw55nW1hIoXE28bxtKSV0aYpeHc7BUf7U4xPUrKIaydXoN2pFUxw7pmiy+subIinpU3b3bETJ+/bPJqRXOT9nDWTfHpYqVgxhadkrLp+ftP1nEV8oUAqr MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: aa52ef3f-d710-4ace-a648-08d43edb9d0c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0743; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0743; 3:goqmRnaSINJTMa9dSd7Vzmx/5ZZu0ZU3opPk7q+xOoW+ufOXuUTuL6Ru8XWpZpWyD57mFhBeHueSc8RztmCUDBmPLEraeJNrTW/L8BdSaz9M59boQWg5IgaURhe0JSz8KbxOuIqBeIUN43Kfets42efa0jRyxzmsIbl+eFIDjj6t17rbWpQiksLoe8fU3uaQquAlFI+BrPShAFvwHDvR6+8J7DPipIpeZIWkE4JvJlaCJ0uUTya03yVS3dhWh8hX637aZONiypqPVpxba3lHhR7kg4timmiOBU/EMW6rUoohqTYHW2oqGMskBRV76IRsDDf2boTFD8Zs5MZpCBDW/jric1cZKMchEvGDcitxOCgGe/8I8h7Ui+uWLi+tvD9T X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0743; 25:RhMQKFs3gn1fF99C2v+rb9WwP/6nO1pW5WhM8XtQwtIUuS3MHZ9UyVRetESCJ4Q+T5L96b/0m+cWzcZ/plBodue7Hk8bQ9rGN0B9G8QRKUXgTHvCmosiyqDu8UqVYJa50QwCr/D2VZTRzl0wiiV87p4kFE55O4/CYf9fp5MpGGXHIMddw631/r7iC7z/b1MO7jXiJC+5w0hKedDKydYfAUm6tWsAyzfltuNo/8BqtD2XAwM/F5kBkrqj7+4H6Cv91jQaI86TW2oQsFW9skPOU/SnPNdeOx4ZTN7uvRi68CKtIRtuCfg+7mA7aONOQx4ASvtRwNwG2XL0Iuj4+Aah8YClY/t0IVd49bX2283Gil1XCAls83QU6NfsLpz4VYGQzo0QPXx0EXc2T4z5QTAnZeEKoMBM7xGuomHbbRbjgWpwozHsXREcJIBINE6EO17vcEbiYe19Y+vEaNdei5yU/TfWpWjGsQHvuajnbGeMxexiBhOZyym7tMtgnQa1euja/gry7bPTNQjQkTKxaKsKPVLIbbfxcdTbSu3f47gFQnu0xaCtEsSW0tC/luqwoinf27mv8a7IkMK4wKTrwRkkpw9BqKkFfUOzyaUYpoIa7GXRiyMUqiXk543PqicOL+iEHPacKwM7rXx1ycDUwLRGnDNeYmCbCfRdNa3h4YIVwOCbUsuD5Yglw+IVXI8jtoWsd1OC6pb2oF+gsarIY/B7ylJOFFVdaqr0M78TdHIKg1vqoeWCxIDp2pTV/l7ZDhYW X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0743; 31:a1jSHWpVBffPVLyKQfhT+1KIr0hVtuw20prclbObNJOonF2ECSuFj33sT6veYoJG851nBmqgegFraMF3Yqf4faNEdxyF44NCKqUNPCJgP2Twt/tYDhjvOX8fYRKHnVwZHnBp92kJWy3HGX5VjscUL2vR8eP7ySyUJZUoEw91ZLNgaVB2ysv8eTykJnY9tvDfKJj/Nm3D42cRUI5XD5s32EcAyljjQe8WAyklrAcRoDq2/0Ork8XuM3jpEv0155rhhbWjKFkyGMTKuiOAupGY9mirNm17MoMfwB3NFxUBRNo= 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)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BY2PR0301MB0743; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0743; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0743; 4:TD3GkQfDPrJk78qluoEbCObd4g8zODDOIR4OEVkrzXNPwT0bfvW/Ke11bCk6Wd5xoDCuGBIpQ728FBb4PKoSUJQS7TdCur5FjC/w4glD59SQfc5ZDPTuU1qw/0zTE4X0wkL35HXS+/d6pHABqFP2U9PGoH95Dezmprh3Mh8yln/QgTPK5i98BFaOPiEYiYtKtACdhPqVYwKopBkx8PRicMDl1rDhQc21gb2cVFMsDZb4jR2s61h/ytgpQEZpZEWk3nGuP63TeI3tnfTjCkce5J/px917rmKkI4oQtbiGg4q+bWo0H/59d+lwrwUta2VPo+0U3+OVCB/ix9swpJencVB1aE7Gg9XvgCUCct8x8B6Mrfd5phPXtVbf2cNQeqEam+oGKZPW6y1VM02EATDGm3Zyl3Zd5fFr/iVK7SlZ2SRxzurnt77dnY0IHcEC51N8hCxjzfiSzr2mf5sGsJZb5lTLKrJIAx3zyuF3i/e3xfn1WZ9ul5I+0VZaWNyHNGXcesf2MLQ+sAnB1mRP+ltdcgHuu90gvdyPgQQAdA5/AUvl17pNoVSsXWD4/3IU6vlvHo6Jy9s7aHFS7dcsDGadxIDbQBnJeaBTSbs6iklgYqS/U04cWXm+X+5Jy3BBHuFq8VAD2TZoIM0zyz8JwZgKQ7cKTnByU4vGLA+i5ssLw/Tafu1Y3fCNLPxy+6IoSUrxyoy4jTAvzUJIRvyFCfhjAuDTCQXUK1G2Pv+C/1FgRmi+nkzVE/czUAN4erb8YxSO X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1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wz/jqizlownlUd9/uPm+RDpK6/2utCMmDk0AuGPd0fvZ9wVGK4KBrCUaGCyW56I2DmG4FQIkXfazg6thDSeXiTUO11kLBd42/kXwIxLPPy5a79OsVEPJjm/jGp7rLoC5UaFBuFHbPDnx7Px4rhQ2/5T; 24:bHgb+CoLv1RskanMuFAhr1t1/bfywtjdjJ9GGWcq6X7ROht9KkIkwQ5+K+AlfR9zRrXZv3b1qFbXkPfZV6KsAOXZOPHlNJGwlwS0EGy6uos= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0743; 7:yzBa5tzPRpTxvhJDY0eisW4IsCnJJPwdXratvf9OMlNhJ6prrFS4Q2tJ96khHNeS3mvX4odtlCGOxu6btMUJ+/b3IJ7YKOohfGcixuRKCaXLnpdyaaUjHTtT5NvmSMOP+qlhiIYMYpZ9ZvjAE2OfKSAmk3vxQ9GduyemooP2sLyQQ2/20780Ybvzzk/FDH6wqO/DM2c7DMfXfj1NYhDV/Cl1kvA7BHuK5FMJu6KQwAfuDhk/DxtrfxkMR9vu5QhVJx9LfvYPhsYAnL39b0Ihzc1CZQY/JS5qfXsjGJwUl08MTMMBgr1QxjuLiAueMzZhi0cQ8Bfff9iXwoaI95wzGiRiS01YaSfh1ORt8OEzf89mCrZ7MVps93Fz0b13fDCxnjdeyl70XK9z4vjJcfhib+0QCpUYETqlg6NBLb/cBx3FLcD8YC6u41lVyEd89SGlITaNt8w0TidumWrxw9vxVQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 13:20:28.9743 (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: BY2PR0301MB0743 Subject: [dpdk-dev] [PATCHv4 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: Tue, 17 Jan 2017 13:20: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