From patchwork Mon Jan 15 11:38:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124514 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp640047lje; Mon, 15 Jan 2018 03:39:45 -0800 (PST) X-Google-Smtp-Source: ACJfBovH+jVbN0x+uIPu6zrcjTb0cb0LuXBq5NqWTRpCKa/90NTODV4TwkvW6Sly02Ricw8zJIN8 X-Received: by 10.80.182.203 with SMTP id f11mr24960295ede.157.1516016385680; Mon, 15 Jan 2018 03:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516016385; cv=none; d=google.com; s=arc-20160816; b=a9KeSZz7b57uA+uwyOMJc4kwGopklHeoilKUf9cKCswQU4nYfWnxy1d5RcjO7gcA/Z jA6gP/YuI2PdaBxV2LlmR4wqmCGORQxFeZp72sKsSQgunMLmFnUt4YiBnvkWzY8plYWv FTkrPdZJoHhO3gUMllhFFoKUPsoj1hCvHoCy5NB+mCFpjc4ru1F+GOMV2xvDyQgJg5tp aT8dePnkK2+IMukD4xrMKIAb7AP+6wFb9KVANmZQKrF72phhwTlBZsB3HuPrJI7+/9SA qlhHuAKPHTqYVICvn43vOWN/XBa0kWHd+WXHr7u+ltwXPd1uiJQ6366qLd5h3NOJRj9R PJOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=e5ZL2wm+b5fOYlgdfxt1lGwrWeCwlOPN4yos+1YyUQ0=; b=A+qBKQ3LYh04SwaUwwcof3IagjQi9+HvhlgPVBmHIYIdGKuzPun10DR1p6A5+UEWXk 6X3MgpRukafRQd+gMm2Hrju7n2EQrUXMVI06VViLL99eLP70HrlmBcGMnkdD9iM9ekHi F0doQnapaF23JHJ3tYPgixwWRhdCRRp7auh5Q58Skgt0ObegwHRWF0xBZ0sMytct9jVF /+9jAQl37eAIJ54WC1MV0f+zSSBQo/osnSCG+KdtDPti3AiVGlc3vzym/4IBODO79NwL INQW+W1YmG6AUwbyGxQE5EFVJ3u3Koq6Eh27dc7MK1nsG7WqgSRVspZSFbMhmyI1Lw5w kYcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id z2si1009396edb.493.2018.01.15.03.39.45; Mon, 15 Jan 2018 03:39:45 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C7AE712009; Mon, 15 Jan 2018 12:39:24 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0041.outbound.protection.outlook.com [104.47.33.41]) by dpdk.org (Postfix) with ESMTP id E9244A84E for ; Mon, 15 Jan 2018 12:39:22 +0100 (CET) Received: from CY4PR03CA0011.namprd03.prod.outlook.com (10.168.162.21) by CY1PR03MB2362.namprd03.prod.outlook.com (10.166.207.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Mon, 15 Jan 2018 11:39:22 +0000 Received: from BN1AFFO11FD034.protection.gbl (2a01:111:f400:7c10::115) by CY4PR03CA0011.outlook.office365.com (2603:10b6:903:33::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 11:39:21 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none; intel.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 BN1AFFO11FD034.mail.protection.outlook.com (10.58.52.158) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 11:39:20 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0FBdCEs020011; Mon, 15 Jan 2018 04:39:17 -0700 From: Hemant Agrawal To: CC: Date: Mon, 15 Jan 2018 17:08:05 +0530 Message-ID: <1516016286-11942-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516016286-11942-1-git-send-email-hemant.agrawal@nxp.com> References: <1516016286-11942-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604899609343308; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(189003)(199004)(2351001)(47776003)(51416003)(50226002)(8676002)(316002)(105606002)(8936002)(81156014)(6916009)(68736007)(81166006)(106466001)(356003)(498600001)(76176011)(16586007)(6666003)(2906002)(104016004)(50466002)(97736004)(2950100002)(48376002)(36756003)(85426001)(4326008)(77096006)(86362001)(53936002)(305945005)(5660300001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2362; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD034; 1:gj0PoMV6f3eCy1Cp8bbwnp/iWHXGptnsIBajull9P7MyIreBi5cPphoyb5F5tlm66jIwTGv1Mtu6vHKchchLr+FtwCKYK8/E0fdXS/mG41PdRPdLkhWklUApFdL+6a+z MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c7f8f42-c5e7-41d3-754c-08d55c0c9e61 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 3:+oC+noEXfAx9qnFhD49SqFK3RMlvPpkXuXUGlG8WgDgpRXptQ8NTpMIzrWnYvrtD7+Zcwt66ff7sejP0Lp2//mTia6/mUaLZZLkYm4Th2dXNSPYoWDMAi3UjnZVLXHviIxIYdTeiezxqj2v2UbpNUPi4fON54AIozOFaIzka/pfjRSk220i+I6490gG53Ov6xvMfjXH6u3XobVrnoWUnmQUxHKR0ps2QSvtJDnPsS5SQ5PiwA1ZRUK80hEEs/ZqKSKR2PmK7eN7oc8qioIUTbh0cPykcaclP7oXKj9udw/aKDYcyVM6ODQdnDaTpYzbxEjDScFq3KZDfpsK2wDDMromm4jrmnY5GH5g1uBD8iRU=; 25:aF/1Dcz1xR94T9NH7jT2ZP5EVJ8UZUjjJ2gumbBJ5TE/6E1gkh2bR7iAihnKBLEtVrdAp9jbE/iqMqI9wwKaJwcuvBBuVz5a4LfZc8zpGFba6ErOe+o3tqDR7ShQGQn9ja7t3mfJUJfOPBHVvyReIweNaGg4KdAADOueqU2Jluem0Xq36xz9XvujDWtJCZNJ4Rd/6xrz6cBfUA4veAoe1/FQmlhWh1pXfy25vvskOKduTn6gWQGTTKy3TsY7kMOvTEGZlO7ywxqGdpCzCvyH7bBYGB8ZmJ6ehM4jDb2biMzA9l4I9bupnBmGNf9O6voLR/Sr+5/Cx6eqxjJeIeDDXA== X-MS-TrafficTypeDiagnostic: CY1PR03MB2362: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 31:XBbRGREOpJZgZuYLYntSv0s6SFKW0gbvgWfteBrZOo9DWu0K3lUNmPonC0vkWGRANqpm6qFANCTPgLR1OP4pHcT1vA/xbzWEaUVrhjfmh10vvSPkGslqzuPZhOUrbjMETn5Oh7h0A1BVrimCl22OJtVApkArtIQeCuoUWqxz6c1eNl3APp99xYkbFo+oUP++KWnbiKj9iRRe+MIoCPclDmz0q9mHqdsk9otojfR4M7M=; 4:BYLusbOHrCSwfHKXWsGUCu+VvQP/r2UAF+K6HIStD/v0WX9Y6DqnYT0C3jC8vo9YNrsrMD0feItIbqNhLXqbFOMluuevlAiiik6eZJqNIOCVpsDwYUZR27REF4OaxOJqwV926ZqSLvbE9MYWpgdUcDExzu5XD4wnoIkzLwm6NY2bAWMhGIqWqcLhOqFhs4wSmZIJBK2i6fS7yWpISUrhMRTgy2tfus/8pGQ4qIWa6KfULDpWLSFBNrDDYe9ue0bSv18wBbJXBTWG1GPxrLgBtbe9jU12oYvuXhLKvEy/nRRrnUeTH/6qnjJMwrPltSMD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231023)(944501161)(6055026)(6096035)(20161123556025)(20161123559100)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123565025)(20161123561025)(201708071742011); SRVR:CY1PR03MB2362; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2362; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2362; 23:KUMRdO3iVRpxiSiL5go/6pXpqlEdCuaw9w0vOtCb2?= XFEfQqLBIOPJ5uBuOtYBjds6K46NMWwY2GUTEXOt+/vSKi+7uxmOekSo151+3s+kgzAz8RtFIVKY0RDbW7YZJ/EOl8+L9yJH3CfZ3IOoCp0EI1xE96hduTM3TCmxpNBEQJydrtrkp+I2FuueQWoLInAWJKo00goyPT6Vc2GgcoeVIGlw2Oi33nwmM+Urz3+/xciqPkABIQ41jvvENpRp2hTsDLGnLtFFlXg9LDSo0GqFm29MKtiebeD2kLAbwtY5jXncfTC7nvAmjohck1h1wyq1IK9FEjQ5eA9a+x83NNAUqidIsHO0kOreLzP5D08tcq6/erqZH5gRWSkRXpLKox96hKznE44LMZlADS/+S1m7SCQRtS+Jfs1vWXFp+Al9ryExrlsq6ZvZjvxgoPImXLxSUmzLJHlmUaP/8+xhUciUVkR5tduqQFXy1EwFx5PocX6s/gjJuQzYb91AQqe0K5tJMegZrLteUGsGFinNA9ZKYVhnLd/xWSx9nncUBK7ncOaq77EFFHrudrA2+93ot7s4yyZZ9AyG1S30dNi4+tnAzOJ2mKyIHc7nKRaUZ0ntn1rqlb7wU4Fp7ML/DVH2vpnB8ZmfL1+kKIMHhymVnWrOtfmmSK3t3+hTP5A072/xtQvMBwKAllWyxs9/aDHOHhLWgw7NLKdR9lVO9jA3lCYdCkzoDsSgkZuh3mzfFx71mFqdbp4N/DJNZUuB+oEuNEVDyuNd8sswgHZn6tQQMYBWJT11O0eS0mKQTTj01vSMpIWVCSVT/mJEhJg4WbWCWT7EeufIY2xf9so2uwRkynyyKeZVsyTj0kBmPV1bgN80E7Ph/Sp6LFpKh46YiEFodsWrPPE1f6DVXXOpfHOZkzrPfKpWbZ+0xBUjQsT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NTxeg0mY7+L3VkI0Q2J0TW3b+oa0Hh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 11:39:20.0919 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c7f8f42-c5e7-41d3-754c-08d55c0c9e61 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: CY1PR03MB2362 Subject: [dpdk-dev] [PATCH 4/5] net/dpaa2: use HASH FLCTYPE only for LX2 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nipun Gupta Enabling hash results in FD requires setting DPNI_FLCTYPE_HASH in dpni_set_offload API. Setting this FLCTYPE for DPNI sets the FD[SC] to 0 for LS2 in the hardware thus disabling data/annotation stashing. For LX2 this is fixed in hardware and thus hash result and parse results can be received in FD using this option. Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 0763033..8b1e4d2 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -380,6 +380,22 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) return ret; } + /* Enabling hash results in FD requires setting DPNI_FLCTYPE_HASH in + * dpni_set_offload API. Setting this FLCTYPE for DPNI sets the FD[SC] + * to 0 for LS2 in the hardware thus disabling data/annotation + * stashing. For LX2 this is fixed in hardware and thus hash result and + * parse results can be received in FD using this option. + */ + if (dpaa2_svr_family == SVR_LX2160A) { + ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token, + DPNI_FLCTYPE_HASH, true); + if (ret) { + PMD_INIT_LOG(ERR, "Error setting FLCTYPE: Err = %d\n", + ret); + return ret; + } + } + if (eth_conf->rxmode.hw_vlan_filter) dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);