From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0061.outbound.protection.outlook.com [104.47.41.61]) by dpdk.org (Postfix) with ESMTP id 2463ACFA2 for ; Fri, 17 Mar 2017 14:09:31 +0100 (CET) Received: from CY1PR03CA0004.namprd03.prod.outlook.com (10.174.128.14) by BN1PR03MB185.namprd03.prod.outlook.com (10.255.200.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Fri, 17 Mar 2017 13:09:27 +0000 Received: from BL2FFO11FD031.protection.gbl (2a01:111:f400:7c09::134) by CY1PR03CA0004.outlook.office365.com (2603:10b6:600::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.977.11 via Frontend Transport; Fri, 17 Mar 2017 13:09:28 +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 BL2FFO11FD031.mail.protection.outlook.com (10.173.160.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.961.10 via Frontend Transport; Fri, 17 Mar 2017 13:09: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 v2HD8peX021077; Fri, 17 Mar 2017 06:09:25 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Fri, 17 Mar 2017 18:38:33 +0530 Message-ID: <1489756124-10805-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489756124-10805-1-git-send-email-hemant.agrawal@nxp.com> References: <1488545223-25739-1-git-send-email-hemant.agrawal@nxp.com> <1489756124-10805-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131342297683906355; (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)(39450400003)(39410400002)(39400400002)(39380400002)(39850400002)(39840400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(53936002)(50986999)(76176999)(33646002)(2950100002)(48376002)(50466002)(5660300001)(8656002)(356003)(5003940100001)(54906002)(47776003)(36756003)(50226002)(77096006)(2351001)(305945005)(104016004)(2906002)(110136004)(106466001)(85426001)(8676002)(6916009)(105606002)(81166006)(189998001)(38730400002)(6666003)(86362001)(81156014)(8936002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR03MB185; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD031; 1:hkvEIi6I2LSxf+WJWJacV5ezkdQCeDAlkgMfKqA1PwB74/XOS5amilXH3zZDMHnMu9SFqCCBuRBWLwMy3ahclKMUB5VTgvDwi+SbZnwTQm67OBOcqOv4JSPha/zBwSQ2Hg8161Iq6c69+k5MHeJmJ/16O78JJf3VMXdbkmZSF9RxSsnjKqZ0Q7jLszPwFwTo+lm5QeanZNssj3sCuwOUBXUYdG+7FkW4Nqcay66WkuhQc++eCR47v7yW4Auo0RQ/HgLQrp/iBZSrGjC3C/GjFwDA95FjMyNDrsf0VuULx0iXnxn/19SDKhDVU76a9EPD5kjjTRgsp180NCgAalN3QWbBdM+8dDO50DuXOznt8CH+qPBpMx5R4TzXjvy7DpmkDkUtlQVbA8axWLWrnFrGsvQB143aRu2d6M9hH9dIOgA62Ik107QjJCGBIvtnEIi9cZ8yhgM1qANvbdqbZe1FnEfSn2rMZDTMzMn09t7qb5oK/CNWehxlVMcAZJDntr37gfOwKA4lYO2FLHpOPKDpZwt0pchKxsWypaZ6OvRlwohWQEEBjPltNA6F3Be2YJAgn8ITOJH8C171ppMCUXEsVJJUeSXOr767vSonbJ0UvekX2OToj8wAk9NjQN9BTJU/zwe0yhf/hjkxRM9JP8HBJA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 751757ac-9c60-43cb-cf33-08d46d36d7e5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN1PR03MB185; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB185; 3:DyirDil8I2YrnMvKatRzHOXLXn8ZPkPSAV1eZ5ZpKAZiHqlLpUqmn4tk+UNwzZ46vuOtBvHISN9fiupRHvvsSoXmrOnD5lZ2IN9PedAgSnEJINzvmDe+/L5+0xNb0TxCS4Onx9HfE11zoro9NVAAS6Ji0vJnE0s+/HMcQTB/gABgDzgZtn/2igdjniWlB8IQ1D6RHh2+vUVzF1MzxuWg4urk4XVpkPdik4T45kom4kCDGuE8SsfANMB2pqMcbMjwRiRF7REnz0EzWo1SC2UklfQzire9mfVRRyZtpK5lUpKpe2uPDYsHAeCMqcTQ0VYRNOPam6t8NdEsK3bj7DXuzaFOJFS1cdlRsldrGQECEP94Ac7AUt+4xImzrQFTXN9N; 25:dbzz/fYdc2pD6Y3wz+lRlSAoxwfoagXI/rIsFs8HIEYsu5eGHR79RDFCwyFfBBu/Iw6sTv9dKZGZ5yajBs0qc45Sx7kwAt44KuL/3yj+oLJfZ+t8VQfsAIaNrQ9wRi2lCxyvOfhfI+7ejOXJPfvGpqdELv/a6wgRNuXF7btUER/pe/yPRSw+PQbwiN5ihIRNagYTA36lDtQNAOvqk2Tyb0XB/k//0iobZgxnpeZpcPBPIPlBnDkTgNXPGtFsGsYAtqVe7rE2LaYPsIgn5K3gG0TMO+1lCmz4i/JWNBMoH1I1rS0EocHDgxXwePaK2g5whUs4HMLNI82A+AEYmleIE6iT3XgoiDLvUU3uqwTYeMilK2IXE/xdnPADSUWR0joysJ3OWvaK0//efml7jSrBInakFsg1Q4RF0hsw/foo8nV9NTVu1K8w+RQCiHq5tnTodSv6Lz0b8AHF0QUnSVL7ug== X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB185; 31:pUwxCcRJnuTsG4Np3kB7791CnJEOkZ08Eaa22W2fLx9ZLINAIBTmhEBEBIyd0a6Q162C+Vj6MWXi+qYixjfR1vkrqmmh5JSY30If0HXQQJQY3rbRbFLtGujQY54M8hIZ56lAQelaO2neE4VImhWUVIOLYuoSYQQNVDp5w7JcZ6UEVDT4voF7WnDTTLaSCc4gBIUzbPN4WrHhh8oLIcW9f1OIutmlhbbyGXgJAnsbDbL6wStwY+B66pvt83N7ogBU/1Iv+DbX5zrebdTlfBMrg8cpnKXyLiLorRBn2Qzb9Ko= 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)(13018025)(5005006)(8121501046)(13015025)(13023025)(13024025)(13017025)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(20161123559025)(20161123556025); SRVR:BN1PR03MB185; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR03MB185; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB185; 4:FXPB8ACwLEGBdHTknysi3ZEmJyiopfnE7CoWNt/SRpXtys5J1O11Si/zBu9w2g7VdqHruaA2NiP70d7XDI6EjKw6BcHHqvxHuFIoOIw9Ta8myxnxukvBM0l6DTUMmZ34JujIW9fQxM5qVNZW6IwSqzeIW8KJ37/SAW3cvJsNEU+tpDf1sOzHudQgzXysp3iNWio1xzzM+wjcDmrEe9E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ii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB185; 6:fwehTytQs0k7F6muu8HaMcRIHkpYIq6hjwCse5MgLZh4aEb64PgdbRbVW/xNYUiZZD0Cpo+p7Kw2xUZ1i27hmY/EjkgWAfRi3VlzifJcWRCwWIQxqJ7ZlKXsZjl9XuIma8PO/60hngUAFojDn1Pbjjgkar/gm1fSUpq+d48k64PA8zpX9mw56caIndXWODDbYxKPx9bWtGWONXjIkGyYTrIbnyysmebGbVRwNQ5qJOIBplD1rPbv0TIVzgvpSSa3/fmJSDKLGzryBjnOPHqMOFj0VeYigi5oxd3anIfbgGrEkAToZetEKV+iOVnZbneqiHXWOa5bHB2hmIudjeR/fcAvVgxczQii0toaCRupbRxDQPSTan6P2+iGvoxoQutFyQFILmsjKe5jbVHFqfSum18LKbApMEhUc3bHrJXfC/s=; 5:eTBq9fIsSZMZYkB7ROKRIZxRSzZdv8H5frFHEDWo9Ig3UKeK5PhtNSnklMwluG4GhkwXMlQRapGHGcyulLrJRT2NplMOplIGFM0DZ7PkwECgtUt1aZ631+o+tJXrWFA0MWMXG6p+wFtLoOcHxRhDcXeD5gXmGacBYQLAiXPEDjHzM46uHza8QTMCN/w9jT6x; 24:rpQj4GF8KXPnKTUSnOLMK6umuvDWadEASCe1tSuItlJX3+yfK4F0ejY2CaLrELTaur3RH2vR3CvLk4MHjnngyYnGzSeWhYexvr7YaUz09VY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB185; 7:1IvEna6tQD5DWw10Q0sbN0muJWaeQO68Me8bkfCAipQIvj+USboijtLHhCpAK/qDxeDFApekDoV0wA6wY9ZTf8l54NhBE25dNjeydfeNte6APH940JYPVcjFBmjHPrJlxtPFwoLIWMcyxOuK4YfX6a7I2VD3eX1IiJMCX2eMQ2s2mC405wSgNDiDiBtM3Pe1raeH/KViuvmQjjRdNLvu8TnGx18tN6i9Ia+sr5j4WFK2w0g/AM2gM2upxuabVNx3a4iLbI1sjXiuk+qIEKhzZGaa9JFhA4Rxcf40apTofQF20beaorT5SI+OeAuhNQrLEM43pvBoqW/i21Yk+rcrDA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 13:09:28.2034 (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: BN1PR03MB185 Subject: [dpdk-dev] [PATCH v9 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, 17 Mar 2017 13:09:31 -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 f517355..c4557d6 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