From patchwork Fri Dec 8 05:21:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121116 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp228657qgn; Thu, 7 Dec 2017 21:22:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMbNpWxUo+d1n2+vKsYP45bvjPNZBH+YlIp9AFEE2KuzPW9KcIHRSHvokkvMJFHwpbV2FVsL X-Received: by 10.223.196.247 with SMTP id o52mr24801871wrf.119.1512710558886; Thu, 07 Dec 2017 21:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710558; cv=none; d=google.com; s=arc-20160816; b=Oa0+NCKVGREywVj0sSCwa749xoqQ/+HxQnF9WmsM1bbvUqj4XxwVIaJMhi6kEdHqcO yHzyi3N4o4Cm35l25wKJE+R4xfmeFu28Dp+4UAXp7xh/wVXgu25lWk07SR1uNjmAAx+T 7dzG2npy1Q1flAbiidIbKMpzj/RGJGHXKNUlnCVUkmaTd82NF8KDgbf6q3OGq8hicwUg bcpXknA1tIKQ7rBhLrF3ZkOP3L1868/59LcPjivvtAFHeVslwYoTI/x6sRhvtdaEBU7Z td1kZraM0aNQik+RPoudwpy6OjJGbK6hwQP0j8Ei4lzic7tBlj+LG7ZPGLy3LzR3bACX AmOg== 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=56bZdi9D4Wmh5rLGR1c159MVLYN8GERBzE5rgkQEyNk=; b=XcyyvGh0pwWGxs01+m/O3HCGn+xlVPuCp4YDwFRhlWKQhnbo+PfKmIA9lh/fV+JE4Z +5nAOIER92sfoz7gpTojuI6B1X2BJWBNQENOKuN+YkhQm1pCQYXHVIUF8wsS3WroGl3y fw2ra2Mqx/54mHtFBRQ/NiR2UgcMQjOz3Jx9QMCz9YgIuz4MwMNZub/Un5Zk7z+dzL75 W7hDrTW4+GS+dfVdyMmu3DhhxPS1DHJYZEwsUDQHCTxXaWaQnH97kQYhIAHuJOgpxOSV RXbM5PY5OTq2m0P1wlPe+7X6DeWYC6ZVaxaNsnXVh7cmT02mtlAeXzsNWDuDmbFuyEY9 aycg== 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 r7si541876wmc.211.2017.12.07.21.22.38; Thu, 07 Dec 2017 21:22:38 -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 67F88199B4; Fri, 8 Dec 2017 06:22:31 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0055.outbound.protection.outlook.com [104.47.34.55]) by dpdk.org (Postfix) with ESMTP id C49877D4E for ; Fri, 8 Dec 2017 06:22:29 +0100 (CET) Received: from BN6PR03CA0051.namprd03.prod.outlook.com (2603:10b6:404:4c::13) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:26 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::160) by BN6PR03CA0051.outlook.office365.com (2603:10b6:404:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:26 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:23 +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 vB85MKGY013022; Thu, 7 Dec 2017 22:22:24 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:14 +0530 Message-ID: <1512710487-32388-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841440906042; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(346002)(376002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(47776003)(2351001)(6916009)(6666003)(2950100002)(48376002)(77096006)(105606002)(4326008)(50466002)(2906002)(106466001)(305945005)(5660300001)(86362001)(356003)(76176011)(51416003)(8676002)(53936002)(81166006)(36756003)(33646002)(8656006)(85426001)(16586007)(104016004)(97736004)(296002)(68736007)(316002)(50226002)(498600001)(8936002)(54906003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD030; 1:293BxhT9QQLuYjM+K6Z0UCx5DAzamPp08TGnnmeHMvOc1xvLrjnLHv6t761vgL5yYExqx/BfpnqJtw63pXSjptEthXXL25VXlXylrAWf38Z8OzvvNzG9kL4juoYr7S97 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cca1ba2f-1c8f-402c-7b3a-08d53dfba9fe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:o+1tRiIV3YwwDQPgbuib5ysKy6wZswXo6z3lViEf6uxPxc8Z/ujAQdO1hFoywGpFTrHpT/5HRIIqhjscGkTw3MLtPcdjCnztz2v8fIu+ijL6PHCOp03gBagzYs05yVhKTmmTw6udZ5bFhLS1uL4ifhZfmrZ8A7/c4UsbAjtl7pvjasWr/BehrNN72SKDz++dAJjpF3uuveMEGTz/ZzBGgGIewibwugdJskgaU422tdTnJ8ngVx5Cswm009og2oi54yepqC+RxYOpmng2gqt1Vc+xAm8cLKYlFAzRhHYgOYnmQy1wvSTMgL/OOqB5RE6vlGFnfZGiezYEBvm2RqoYFsj/rQr2U9VqFSnBECkEar8=; 25:yCdavwNXAxkdF/u9y2F39Y2hh7p/wdAH0U6/mAzfaQ6nN0DpOPcORfJIgkRta27JP9rVodcPhoXo7kaRBhRq75gPrKyHt21bJS23pENNV0lLDtOHJTe0cwTEKqRszQfAaJT3uhzn4xSTVrcWl2hM42JC9IZBWGyQkOQQTmTFJVUk/y8pxW/Gjakm0iu/VYRdvjJ3byQInu2jvPrHTUR7M2o4BS6l8cN+d7CCt41tT38yMNyFoqpLPyoJmWT+KrdxuxqH5Ykm1PU2gVtgms8Xp1uoVdTVTopwIgwXZUAOItk/j8IzneCcjXPk8AiySAHrH3Na2bG1dhI1nE1+Ga1MBQ== X-MS-TrafficTypeDiagnostic: SN2PR03MB2367: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 31:/ojxNxUxZqgGNfm6bCMC3OFXc8mHH4YqkueNvfY5TC4JTz2m4apLRQ9IZ6uPO/u9m70hdeo+lxtztVQ3dBiMjVvHanzhfQZpImjpXWvegJMtUml7XIjJv7P5toLGovR1kYvmJV5U11pUX7utEuFdzY0yvvvqrQxhqVTBttcEpbogZ9OQrB+hR7JsHQ3ju+fAHQF9YqyURaotHGuKOioNJE0VwfyCjA/BX7bsBTeJPO0=; 4:2ojbR444k/jTUcp6mm/EgwWpuqmQqU6Hcb2sX4jCCNvOqr8QyrvhGk5Kmt6Xx6nCio/V0Jfy7738ncb/lkhybrWuRtfP81ytJgAtCFcK2aVt9fvHm24pOGCje6hdIYNxTk8BrTShMwjazeCoSS6C+kxmd5Dp7o15wiEYErxfIdd4ljmkc5t51w9hptO+NxoXEXeScUAsuazomMrIe0WS3mAjafwinHJIW2ngD2Cm40nTkuO6KHKxDUdTNbdz15494T5KWT6ODcw6bGji7ht0ES13UqD79YSmu2hRaWFTSUHKWTmc3kLLwtQ47CR4IEqo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231022)(10201501046)(6055026)(6096035)(20161123556025)(20161123559100)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123565025)(201708071742011); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2367; 23:+uIwVeXwXbOcmCtyRNOCqu21oZ6tnIzhzTjTZt2t2?= In5rFgwguaUT/dkNeYVRxSczfY7rb62QrfDMCji0oxyeEstUEUXembuZQFvahSWWFOZZOk8wmR2AofW5oiB500UIXrZGPmUrHBkbMXEOfMPz97+7u1UHtXQSji8f6e//XozgKwNKBVTC+2wlgi34fB2vaUrUWz62ZnrKJiXgaN1aOTyIKqcz/BrhleCuP0QVCVV8E0uIknZ3DXLJ5RdhJGyusZD56M0hTWIDviBPnJm+mtbeqnpXyd39W0b42rMn8FHLwbjU39EyBbPwmBlW1SiAiLkGgDj3M6RtamrE9uP1cShuugHifwG94HdLNRz4U5n5hgukxfGeYTC709/RZu3oCrekhZ3DDUdsxN8lkThYMBmnWX33cWClBZKU7DDCKxlS9j6jST7sKpTZg7oLF2950mEqDgUFLtcs+euTYCKy+jRN8IEH7i7aFmu/QW3VBeWKIWAdzTAD97qcuC1IwQoxbTBmaqEM03vMdQulhkvGyCBBR8dyqwDR2qOXAsGW9uB7LQftJSPv7E7SGaL5i63SDMN3zMr9VT5rB37+RgGyPkvVty2b2GupLoy+Mo6V5f3bJ2pP/dDQZ+bdJw3NivZVVp4wSBVpPq5y7YAYLZhJDqhnkr8/4sO2Q3OgcMPiaGr8e+neF0W5ClS+HKFYIwLbGO04jo9LeBwqouF2Jp+sfkrOq+W3Nu/cRD2JFR0jF31+LFTe2po+4z7VPtS+5nwyDvjJADGnbdtEdqyqUflfrSJUQhdbnwnzTcYYfcWzcNCWPC+NzdE+lEh39OIjyrqtVTH/RSq4/mOu+RlCh1uKkssI2DQzNjy4PizYBQDrH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sgKwhR7F461UGVGxKt+lXGb0QCTdA3E8wWB6MqIKKaas3cqu66D8fXmVBF7nnQEvlCEOCiHGD4LDr2qt10CHCsmRZZc6R3IMNuH+tOqhihfc4thQR2Rf2AUrLHw2byddx6OPALaw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:23.9190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cca1ba2f-1c8f-402c-7b3a-08d53dfba9fe 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: SN2PR03MB2367 Subject: [dpdk-dev] [PATCH 01/14] bus/fslmc: fix the cplusplus macro closure 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" Fixes: 10f1614f36a6 ("drivers: refactor DPAA2 object definition") Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/rte_fslmc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index 4c32db6..0814e69 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -175,10 +175,6 @@ static void dpaa2initfn_ ##nm(void) \ } \ RTE_PMD_EXPORT_NAME(nm, __COUNTER__) -#ifdef __cplusplus -} -#endif - /** * Register a DPAA2 MC Object driver. * @@ -198,4 +194,8 @@ static void dpaa2objinitfn_ ##nm(void) \ } \ RTE_PMD_EXPORT_NAME(nm, __COUNTER__) +#ifdef __cplusplus +} +#endif + #endif /* _RTE_FSLMC_H_ */ From patchwork Fri Dec 8 05:21:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121117 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp228795qgn; Thu, 7 Dec 2017 21:22:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMa8v6ZKJrcZRidVFD3y0hvQwcG8oK3Rh73XbWOowQgcv8Pt8ji1KCnwVR4ZClDrRJLiDpfl X-Received: by 10.223.138.246 with SMTP id z51mr25977160wrz.152.1512710567971; Thu, 07 Dec 2017 21:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710567; cv=none; d=google.com; s=arc-20160816; b=IzCQuZIcivUrowUxWWFZlL+fL3wqLRdgvmK7ak3zcqJsPzQ/5xwJ/nOYyAsp/1etiG As9odBxxwyRlih/DtbQ1U32c7UkfdeZrprAsHaGEnEvDMasHkPd47qkFyYStsp5jHdtq uPrpkLUZhkGJ6JIS7mKjpwJoz5ydgYMNrOzMz7UB6HNhK0IryvmGVbqXjuyVqqx2s2y9 ZVlkm9879I+25JRhlVP+nrV9GMO4NPhoHRRsdNXIUR+9PmiKXgBKxOZ/685r9W+guz6n e4ArMASZy1Z1gy5FFJXSTsxeNMJ+FinxUeIqGE3JCgofDG/4OzN9A/o88s3bgPH3zYsb NePg== 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=CjOVYyaXb4GuVeiazrbU9Wcd+qIJBQBhfjzoOKLLht0=; b=wQ3tYO0NiY/UxMjg3BPaBSK165V+qS7nQblp+KEK6Udv5rY67vukrXWe6wTC6pWl3T RmKr693GKTsBNCN6ACTjpErfiWUsxc3pZi/4zAeQZuTuhUT3aedkoeDflBYoja1w32ms DGyUU7+gBmpObdKVtpRD5Z/BUObr5nULRdHTaW6gsjEzFPulaTkvQZUebRy00Tqt0VYv YpTwrZ3lVSEutxbFm1Po+RVzoDBkJVlBAdXBR0Fhn1HDM/dwn2xdH7AcHG/4IEhN01MD 1XCi3p228u5WjNRzXWp6IX7BMULLiGR0LezW4lsHCcMweeLusDpwkjsOU4tb4yKcsucq g+CA== 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 p75si5178627wrc.194.2017.12.07.21.22.47; Thu, 07 Dec 2017 21:22:47 -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 8C1A2199A9; Fri, 8 Dec 2017 06:22:33 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0065.outbound.protection.outlook.com [104.47.42.65]) by dpdk.org (Postfix) with ESMTP id 6125B271; Fri, 8 Dec 2017 06:22:31 +0100 (CET) Received: from BLUPR0301CA0007.namprd03.prod.outlook.com (2a01:111:e400:5259::17) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:29 +0000 Received: from BY2FFO11FD024.protection.gbl (2a01:111:f400:7c0c::121) by BLUPR0301CA0007.outlook.office365.com (2a01:111:e400:5259::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:26 +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 vB85MKGZ013022; Thu, 7 Dec 2017 22:22:26 -0700 From: Hemant Agrawal To: CC: , , Santosh Shukla , Date: Fri, 8 Dec 2017 10:51:15 +0530 Message-ID: <1512710487-32388-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841467114895; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(86362001)(50226002)(8936002)(6666003)(2950100002)(104016004)(5660300001)(85426001)(8656006)(6916009)(2906002)(68736007)(48376002)(81156014)(33646002)(50466002)(81166006)(51416003)(8676002)(97736004)(77096006)(76176011)(305945005)(16586007)(2351001)(296002)(316002)(356003)(47776003)(53936002)(54906003)(106466001)(4326008)(105606002)(36756003)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD024; 1:yamBrLcFdOlJVYCP48+A/2bOV98idxXuDRgFFa1KF0y9xzbddNP0UWgdpQTmrPHwu8nzdxJo3oeRxqnKuLhB4qwwSdqzbF21B82mEE0Lf1GyAzNTQe2tPKfIikI3AOKu MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b8f4b5f-920b-4c59-658f-08d53dfbab8e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:x1ha+NqK+gkEiZJ29j3f+8Wndp4lv84K92rm5cggHBxcqsdHTsrHlMviORH99y6nhhXY0ToTrXl2Xr0+RMAfAdNrP9XsAcKTOw0FtFd3tg91KwE7MvJZ1M46cl/pfyIUi9wQ0f8zTCbaJaXFXJ6q54XvyPqfPe4lrz597BiIE6ay7DgOehnvesMEXfNavgXMKjZo4MN6k4hHjPn/Eu5Tbt4GKVNm6rR6JCCTy1o8Sk+BKYtmAW6H+KgNyVhhsG7vlNagsB+wzFB5jW9ZTQI9R72WKQa6/nynfqjvYT1yXEWPjEUXARFNgX+h4lzQWHT9VuK9g0RrP0aV6tr12+4enqCaIKNwr/xqxs/hmAxNRIw=; 25:4ClPL3czptdwUKurGf6q63w6yD+JSvAwlVAUhnveoWTnuxfcZZFuRzfOYw/dSMMlg9fk4eJycB7gtOXEsqCpu1wEeqo2D28BOtZgxJoXm0K4Dlm0egefJAFgLyYqjj0dngwGx/svs2rckFVkJI8bmFZ3xqHsHrbVCEkkgbSAGcsJibUpnFMvfm8CSNQ3YT9fzv0/GbFGrpMN6rdRiPq5WeHmUgiqyNOWRCbuXXmnPJD3vGlOPphv62tT9Y+DELlqda4zf2Hp0e35PP4m/B808dFUpwxQJj8zJYV2V/qn7PyNTZKtfdRbhSgkOM8eovFslidBhSasbxlzkEIHgfy0jw== X-MS-TrafficTypeDiagnostic: SN2PR03MB2366: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 31:AfSuimphxoB4MzaWWJTzrpn2AWVD/qM/mmdzM3DQoKWGnRIurK/AV+cIn4HUhnFtcUceqKrR/b7oSDXLD9RofGknY3FE/YnC7XvG7MxtK0G08X5bSGbmPRYhARixhL2Jl2Wx8XfyuSAvagXy1GxRRMac/6ojDbfZsA3Ku+R3HU2wuuNVrBUtiXkGRZSHy8a6BVBSRg0KC0oXkvBziHMm+jVrUwgH+wh4+OIQmzYC9n4=; 4:uZ7XkNMh4nl3JxrDkgjbP5xVT1U8W960z7zBli777opXG9UzsvGlZhRRd+BA/k48Lyl8wcNnFu+dqipa8cBOCSYFesr37biEnug6F7wrhASRffbqB3oHYBnLQH9LxX+kcNVuaoLwbyHj5UzadZ98CMExbEwePU7vxVv14N2uHY5xyFL2amhb+g0W7sbocIUmKCSygyZNIrlaFqmda94pbxN1RgZXPh3to4maky6jnbYHjSKOXXnDsg7eSkqTWs8fO5I9lrZpqAtCyntECCJczWE1uti/3aa4diVoJOrC7G/FmgSgHFmJf0DEa3SZnruXWg7MuiZ8+OL0pXuXjqESme04HwOX6pu9Gy5j+WEiJ4M= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231022)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559100)(20161123556025)(20161123563025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2366; 23:PBKwJC+70XxWtMhTPFvbgxeDm0nUa2tUbPpio/d7O?= pQsQAUS7kiYxEG+XwzqoCtEkWUQHkKPfjzHmdcnlf67w+Pj/kbTKydMZm8V0+m15Q5o3vfLnC1mG8DpDL+FB5EcZBag2xoY8qVr4/qWSypEhnHvT/tL2I4/YpI2EUialvIDJZVta5qN2ewZoOFa03WWelpkSIvV3OalJyqyOwruUuardwg9oplEK8hEpf98qE4qUx48+mGVKfJ47CGaf9SYPVhTYitnPkx09auNvIn2MjW8weUxJPrOyuDl9HV8EGP55muA0ZayfxYnpWlAX1W1q4z9LjbLMwOEGTltr8UfZLchq1YLnh41mQyBy3IJI3tyg4GEg8L2K9i/lx++CoB2ZMEhIoTOlRWCinpXCmFJR2YnRvhy8e5SbSJzIH4MnLixAxuvJGTe15lbF4D/qnmHhrHYfy3S/SIebHv3twq8fFTqYav7bM+diR/b9ojJXY+kDl00mpgYKefByIUO3a3qpA5WST5miqymJteMTQBbAhsuxV5VD+nsOtlGGqZ/7PBUmIAhOrKuzku/jTMSZ/Yan/DFZhj8taz5baHxl6ai29lN4kgRDD8M3V6wiuDR1c1YqBYVf1SBffdVLvMgPTYdrGzF6kjXxQkUEKq76OH9BNDWyiLTmG7O6YPaVtlzSW1pABDhZUTvBM+Ki+zt4om5cHK0ACKNybgAOXqD68LsuyR+48jyFEx82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SHrY=; 7:fJDsLSZ+qGPyxLLDCiHw0yp2MvQKjbPFdqZ2Y8tdY9fYQjGeLFSUizBLB7RVww+v2uHFZ1sfxxVh5pUT62OCa0D7qONxiaTUV7vfsY5dW+Ty0OZqmfXgITyzdGLy30QR8GWC87kLyXHyGPOOqarxf4gCPbx6tHMXT/ai0siEI1GxZwyYqkA2VA7mAmLE8ITMqhjr/U30cZeLVF/zxN1kqSExjINLA6gQYooiWB6fuLZoE3gsV5n36QWRUl6Mz1vh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:26.5086 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b8f4b5f-920b-4c59-658f-08d53dfbab8e 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: SN2PR03MB2366 Subject: [dpdk-dev] [PATCH 02/14] drivers: change the deprecated memseg physaddr to iova 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" DPAA and DPAA2 drivers were using memseg physaddr, which has been deprecated. Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA") Cc: Santosh Shukla Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/rte_dpaa_bus.h | 6 +++--- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 8 ++++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) -- 2.7.4 Acked-by: Santosh Shukla diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index eafc944..bc933af 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -113,10 +113,10 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr != NULL; i++) { - if (paddr >= memseg[i].phys_addr && paddr < - memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && paddr < + memseg[i].iova + memseg[i].len) return (uint8_t *)(memseg[i].addr) + - (paddr - memseg[i].phys_addr); + (paddr - memseg[i].iova); } return NULL; diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 25c87ad..e47215c 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -249,7 +249,7 @@ int rte_fslmc_vfio_dmamap(void) dma_map.size = memseg[i].len; dma_map.vaddr = memseg[i].addr_64; #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA - dma_map.iova = memseg[i].phys_addr; + dma_map.iova = memseg[i].iova; #else dma_map.iova = dma_map.vaddr; #endif diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index c1b842f..ece1a7d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -284,10 +284,10 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 - + (paddr - memseg[i].phys_addr)); + + (paddr - memseg[i].iova)); } return NULL; } @@ -301,7 +301,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr >= memseg[i].addr_64 && vaddr < memseg[i].addr_64 + memseg[i].len) - return memseg[i].phys_addr + return memseg[i].iova + (vaddr - memseg[i].addr_64); } return (phys_addr_t)(NULL); diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 16155b1..438dd3b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -121,7 +121,7 @@ dpaa_mem_vtop(void *vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr_64 >= memseg[i].addr_64 && vaddr_64 < memseg[i].addr_64 + memseg[i].len) { - paddr = memseg[i].phys_addr + + paddr = memseg[i].iova + (vaddr_64 - memseg[i].addr_64); return (rte_iova_t)paddr; @@ -137,10 +137,10 @@ dpaa_mem_ptov(rte_iova_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 + - (paddr - memseg[i].phys_addr)); + (paddr - memseg[i].iova)); } return NULL; } From patchwork Fri Dec 8 05:21:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121120 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229274qgn; Thu, 7 Dec 2017 21:23:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMbbdTn4+tpgvEybIeZcDcnwzhGszPjrEgVXZrEedf17yarwZbIqzs7zDA3Z6BzMDNK6NAyC X-Received: by 10.223.138.212 with SMTP id z20mr24164200wrz.154.1512710601665; Thu, 07 Dec 2017 21:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710601; cv=none; d=google.com; s=arc-20160816; b=ztea+ssfZvTbJ2F6DbZEQAR3lFv2ER+lW/LGoe/y18kA5Vbe2WS23/JS5GAI8ig+9J U3ocQqFj6QLLrWg5R+wuEvr5vkXSzb9QoA8pXrbyxdjBFJausLGsFGLJisYwfFyFzJsu epnMnV2RNC/+FOBeQlFddP7l2fsfzc35p4TpuxomSwhPVHmn7GUabPULkqVl3/bps7rT eIekFt8mn43lRWoUfZQtw+Y2FfSnD804OPw9iDKUk4c5pnrcjDpU+muDGw7PbquLu+sK DM+QOJPK36gYkVGWTTA1fefdEL4rZ8j6vPIa8nZGqhYpIIVpGem9EACu74ZGggy4B5an EYZQ== 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=FsfjzMi3MiszO5hl85mSMmkay6jBxSQcdQXsCVO28co=; b=IdM2a2boIHl4GA2KPW8zMRQm7hfPIrBPawiLHLwRwrIhHvdSplZbz5e9fCLJy++ucQ IjcrTldr3c3X848B2frWtotFxTi99IyJj0J561VHH7EgqxRAyOyTF0/xMn79ef9FdZJ9 wQn0WJnPkVDi/QlDFMaStrsZiB9FYVC4HwbfupMQ0RweQ1raeEe/P2C8Oh/hwcNEPoGp nFIksPTVapa0IWSkaYvIjJ+RzgjxcjwBV7xWOuR+xOjyhKt8+91bOR9b9XPms7HnUS4G V3/f0MknA4kTj/x/K/Yw47Vv24uhbh29ReSmPoExW8U+JU1vIOyBu75NiZKH9DXH97fa ckBA== 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 t9si5327762wra.449.2017.12.07.21.23.21; Thu, 07 Dec 2017 21:23:21 -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 01DC41B18C; Fri, 8 Dec 2017 06:22:41 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0070.outbound.protection.outlook.com [104.47.42.70]) by dpdk.org (Postfix) with ESMTP id 673FC1B03C for ; Fri, 8 Dec 2017 06:22:38 +0100 (CET) Received: from BN6PR03CA0074.namprd03.prod.outlook.com (10.164.122.140) by CY1PR0301MB0731.namprd03.prod.outlook.com (10.160.159.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:32 +0000 Received: from BY2FFO11FD040.protection.gbl (2a01:111:f400:7c0c::147) by BN6PR03CA0074.outlook.office365.com (2603:10b6:405:6f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:31 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD040.mail.protection.outlook.com (10.1.14.225) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:28 +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 vB85MKGa013022; Thu, 7 Dec 2017 22:22:28 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:16 +0530 Message-ID: <1512710487-32388-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841487336321; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39860400002)(346002)(39380400002)(376002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(8676002)(33646002)(2351001)(106466001)(47776003)(53936002)(316002)(2906002)(16586007)(5660300001)(105606002)(48376002)(50466002)(498600001)(6666003)(356003)(77096006)(2950100002)(296002)(4326008)(6916009)(54906003)(81156014)(305945005)(8656006)(81166006)(36756003)(51416003)(50226002)(76176011)(86362001)(8936002)(68736007)(97736004)(85426001)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0731; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD040; 1:d+ufjDjFx+55/y25wOpLPjAzrlQq3oBKI1bWsYhs1xMrDb5KQHYxYQv5pl1IxhVjx9BGvHS7F+axRM7ZEAy50qdcvKiwr5vGv9d7ez4Y463BEw/dl7/gUhFvgVU81eRw MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 863abc81-1616-4baa-f381-08d53dfbacc2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY1PR0301MB0731; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0731; 3:7HXMBTNlEFttmuriU8VeWt8NneaLXAXxvUoq2Rg21g05npBkHfmJ7UgZ5oAbs9NEdfuj5rK+AT0hC9AnYg0gZQh8bq5U25jan16AlTKVTLDz2UKYDlHbOQx9eyRyE/uDhTV1C5ZC6XKN7dfyXOR+xhm8IojYrdARbfhaooQN6zt8WjnL3XUycHJPGke73Km1uVE0ma/Mg/gc2xWt/hX0XTo2lT0K6+Xfr9NE6T5xDjLYVd8RaLUnFF4f5PXGW9s6SHCQDwIBPLV2OccEHLWN2qo4wwkxdPS7aZHT8+rZAM3in+kwrz9eXoE2ieIaSVDNMM8gU/7xFUYevDX2q3b4p7EeLvb1g/VT35ecdeWfUto=; 25:mqQ8UtuhjgkjMYpoq2p9mXaFngJrLHXFZUd0+DMZ3MBfWMmsCRJXs5Sl4QXu/7YrEmB7d6+q3xEoUODf+v2QJzD8FI1PeODQuEYNb9I3jifjpvsWJnmAaiebx0gMpsJ89qfY+1W6KuB6OnI3n+Aw+jK6rOS23Y+G8NV1n8h6j+tDMHmlcapz5/mA8QF+XtbEX6U4qNB9/QBJA3m4DupXQzXZx7mAFC9wYBE4U2h+LwGIcPB0wRIwfQUBvvW1RX/r6Gc3KXnOZMkzP9wCpbdKZDuP0AAMyyjRtK1gu1J7RWcbbep9wNCn7vi4naTK/e3u7hxEgXl3p8G7pysSjzIYoA== X-MS-TrafficTypeDiagnostic: CY1PR0301MB0731: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0731; 31:Rw8P5gQjskY2rjGwdlj0gbEcQy6Du7MxdmBEFWefsp5CoVj1Ge8JT4nFGdHVsB/5qkbPZt9HHxfKd+CWTuIvvkOaJjBVMC6Rr96zPH2BsrxfKWErf98oRJNqbyZ8U0xOLfO6lmD/A1bfDJsYubeYTCBW6Cbq6Mv/Vn7MIGnCZbFTwfHrQ+CtH9qHbOu7If0A9lbaxPaaYLYzwFAjjKD19lUdEQ183t2+t6PeRiLUdrE=; 4:bfesYFsklkmIcVG+4ANjJA/DOdjm2NgOzDmfVV2IKabsE0KOw/swKs6vSwce43b4flnFVs6QiASmVLFxJo+f6hp0K9jSjl/jU1CeNcPUUL+oOiaETwvBtbFPM8u8CA0DPM/ubi2jHwdODYZEOXlBkD0WHL3bRQxTInWekWcUsmXbgiMwrvbbkgLqMtkSISWtD72gRTt6Qk+SKb2mhvBBDTJjkVyCmyAhJLKC2ksTyAD9RQG4wx7OLVF2QZahOgegDrrNpWXQ6KEHmNYX5CQeT/rj/suzmK5BMecbxRYrH9yiY5fX2RTBNoxBeebBreb8q34FF0DcbjSaiIsV8MwBSJGOF4xbCvbDU+vdpNDwCP8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231022)(6055026)(6096035)(20161123563025)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123559100)(20161123565025)(201708071742011); SRVR:CY1PR0301MB0731; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR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y6YJelOcr+2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:28.5464 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 863abc81-1616-4baa-f381-08d53dfbacc2 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: CY1PR0301MB0731 Subject: [dpdk-dev] [PATCH 03/14] bus/fslmc: add support for dynamic iova for DPAA2 devices 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" This patch add support for dynamic iova detection for DPAA2 devices and use of virtual address in such cases. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/fslmc_bus.c | 44 +++++++++++++++++++++++++++++ drivers/bus/fslmc/fslmc_vfio.c | 5 +++- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 15 ++++++++-- drivers/bus/fslmc/rte_bus_fslmc_version.map | 7 +++++ drivers/bus/fslmc/rte_fslmc.h | 3 ++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 1 + 7 files changed, 73 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 480857e..63c333a 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -51,6 +51,7 @@ #define VFIO_IOMMU_GROUP_PATH "/sys/kernel/iommu_groups" struct rte_fslmc_bus rte_fslmc_bus; +uint8_t dpaa2_virt_mode; static void cleanup_fslmc_device_list(void) @@ -300,6 +301,9 @@ rte_fslmc_probe(void) } } + if (rte_eal_iova_mode() == RTE_IOVA_VA) + dpaa2_virt_mode = 1; + return 0; } @@ -347,11 +351,51 @@ rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver) } /* + * All device has iova as va + */ +static inline int +fslmc_all_device_support_iova(void) +{ + int ret = 0; + struct rte_dpaa2_device *dev; + struct rte_dpaa2_driver *drv; + + TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) { + TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) { + ret = rte_fslmc_match(drv, dev); + if (ret) + continue; + /* if the driver is not supporting IOVA */ + if (!(drv->drv_flags & RTE_DPAA2_DRV_IOVA_AS_VA)) + return 0; + } + } + return 1; +} + +/* * Get iommu class of DPAA2 devices on the bus. */ static enum rte_iova_mode rte_dpaa2_get_iommu_class(void) { + bool is_vfio_noiommu_enabled = 1; + bool has_iova_va; + + if (TAILQ_EMPTY(&rte_fslmc_bus.device_list)) + return RTE_IOVA_DC; + + /* check if all devices on the bus support Virtual addressing or not */ + has_iova_va = fslmc_all_device_support_iova(); + +#ifdef VFIO_PRESENT + is_vfio_noiommu_enabled = rte_vfio_noiommu_is_enabled() == true ? + true : false; +#endif + + if (has_iova_va && !is_vfio_noiommu_enabled) + return RTE_IOVA_VA; + return RTE_IOVA_PA; } diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index e47215c..c0709de 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -249,7 +249,10 @@ int rte_fslmc_vfio_dmamap(void) dma_map.size = memseg[i].len; dma_map.vaddr = memseg[i].addr_64; #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA - dma_map.iova = memseg[i].iova; + if (rte_eal_iova_mode() == RTE_IOVA_VA) + dma_map.iova = dma_map.vaddr; + else + dma_map.iova = memseg[i].iova; #else dma_map.iova = dma_map.vaddr; #endif diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index ece1a7d..7937293 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -276,13 +276,19 @@ enum qbman_fd_format { #define DPAA2_EQ_RESP_ALWAYS 1 #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA +extern uint8_t dpaa2_virt_mode; static void *dpaa2_mem_ptov(phys_addr_t paddr) __attribute__((unused)); /* todo - this is costly, need to write a fast coversion routine */ static void *dpaa2_mem_ptov(phys_addr_t paddr) { - const struct rte_memseg *memseg = rte_eal_get_physmem_layout(); + const struct rte_memseg *memseg; int i; + if (dpaa2_virt_mode) + return (void *)paddr; + + memseg = rte_eal_get_physmem_layout(); + for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (paddr >= memseg[i].iova && (char *)paddr < (char *)memseg[i].iova + memseg[i].len) @@ -295,9 +301,14 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) __attribute__((unused)); static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) { - const struct rte_memseg *memseg = rte_eal_get_physmem_layout(); + const struct rte_memseg *memseg; int i; + if (dpaa2_virt_mode) + return vaddr; + + memseg = rte_eal_get_physmem_layout(); + for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr >= memseg[i].addr_64 && vaddr < memseg[i].addr_64 + memseg[i].len) diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 51a2ac6..a1e30d6 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -89,3 +89,10 @@ DPDK_17.11 { rte_dpaa2_intr_enable; } DPDK_17.08; + +DPDK_18.02 { + global: + + dpaa2_virt_mode; + +} DPDK_17.11; diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index 0814e69..0c7872d 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -62,6 +62,9 @@ extern "C" { #define FSLMC_OBJECT_MAX_LEN 32 /**< Length of each device on bus */ +/** Device driver supports IOVA as VA */ +#define RTE_DPAA2_DRV_IOVA_AS_VA 0X0040 + struct rte_dpaa2_driver; /* DPAA2 Device and Driver lists for FSLMC bus */ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 9c64c5d..5e52390 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2420,6 +2420,7 @@ cryptodev_dpaa2_sec_remove(struct rte_dpaa2_device *dpaa2_dev) } static struct rte_dpaa2_driver rte_dpaa2_sec_driver = { + .drv_flags = RTE_DPAA2_DRV_IOVA_AS_VA, .drv_type = DPAA2_CRYPTO, .driver = { .name = "DPAA2 SEC PMD" diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 202f84f..38de3d9 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2003,6 +2003,7 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev) } static struct rte_dpaa2_driver rte_dpaa2_pmd = { + .drv_flags = RTE_DPAA2_DRV_IOVA_AS_VA, .drv_type = DPAA2_ETH, .probe = rte_dpaa2_probe, .remove = rte_dpaa2_remove, From patchwork Fri Dec 8 05:21:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121118 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp228933qgn; Thu, 7 Dec 2017 21:22:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMYJ7U38UL0A5PvVCMBYU7b4eyqysu/A3qzuZA+98yLfxj0vLHS8uonLee0To6H2nAnHna/9 X-Received: by 10.223.180.66 with SMTP id v2mr25625484wrd.93.1512710578165; Thu, 07 Dec 2017 21:22:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710578; cv=none; d=google.com; s=arc-20160816; b=SnCBrty+YGcu+jnJg62L1YSUZx54T09G2ISjP7bO6UxyMuCxkf4bMqY8uB2TQ8yciF i3Sm3ITxMrTLTNKeh4e+teL01Rav1Na4xSVnb3yOJGMGNkRjG/d8Bc8mxO+fh791wTSi MNY2eOhOCXHpQBNmipcvLlD2+dsiz7WXyuS/+cRqQcS+eNgeIgS0Ov36K0R6+RnjM3No KksVTzkeuy/efnMbL7ypstk/famGu48uE3QtrEJQ5ni29FrkYjn2yBO71j/JsuuwLowj 0t1c71AL3XyQtMubhKS8Bi+jub70SzamoLdgIZRT6ijRyMvHedk4+XneLQYCFF1m93Nn GD+g== 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=xe4iI+QgFvc1WKrsoIWvgdVPY1oqb8HI/IdLnikFlRY=; b=mFFLlcuSNwqlRWW5EcyhSLAkhwW8rI90Hbyj3eVp24iLOOWhyC4+t4PV/sEe34kjxk /fzp9BH2AbbOHzxhRCbtxQJEKUTOFXoTcQ2IkrcOGwq3Pd4GIH8Vgk618gho06oqvg0p fCCwG7hoXbMTH9W0tzSqYypFpKVZ7c58s1TRJ6sKbHBQ904hjGWOn9Oco7azZzbGZ/hP D7HuIiazbRkoO6lM82ITEavZmAmViq5VRPs+wVNCUV5TvvBJ/wTRxmpgh1O+QMq1TXTZ iydtvPMggRGnwourjW/TNl/WgZcH2/9ZIxg0wXpLFyixG81CbUJGy5Jd1uY2H1Ge8/3G nTsw== 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 d9si5048243wre.338.2017.12.07.21.22.57; Thu, 07 Dec 2017 21:22:58 -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 A9BEE1AEEE; Fri, 8 Dec 2017 06:22:36 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0065.outbound.protection.outlook.com [104.47.36.65]) by dpdk.org (Postfix) with ESMTP id 792C81AEF0 for ; Fri, 8 Dec 2017 06:22:35 +0100 (CET) Received: from DM5PR03CA0036.namprd03.prod.outlook.com (10.174.189.153) by BN6PR03MB2689.namprd03.prod.outlook.com (10.173.144.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:34 +0000 Received: from BN1BFFO11FD024.protection.gbl (2a01:111:f400:7c10::1:165) by DM5PR03CA0036.outlook.office365.com (2603:10b6:4:3b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:33 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:30 +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 vB85MKGb013022; Thu, 7 Dec 2017 22:22:31 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:17 +0530 Message-ID: <1512710487-32388-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841507806394; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(376002)(346002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(77096006)(4326008)(53936002)(50466002)(105606002)(8936002)(48376002)(50226002)(47776003)(86362001)(2906002)(356003)(305945005)(68736007)(36756003)(85426001)(2351001)(16586007)(106466001)(316002)(498600001)(6666003)(296002)(97736004)(54906003)(5660300001)(76176011)(104016004)(51416003)(2950100002)(6916009)(33646002)(8676002)(81166006)(81156014)(8656006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2689; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD024; 1:Kzj7vTdwN1yIe4pbAGBMz+EoTqF5joJr7b54sRdoSZYPtUhFppJq8lftFhyFPmY/M3zVFzxAHcbuwO/QnYlH+yW6NDGKoR2kubnm5TLa8DWQEd8Sc3Aw3UesuQyjxQ8+ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62d71377-6f4d-48e9-4cba-08d53dfbadfb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2689; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 3:yAyYbqmVpPuHnh+1r39Vr5fjyt3HCtK3FXJlfH6WJ+bxrgW9cgDlHaHlBXAS/7uB3XhPxdgp3ULgw/pk9ktQiAgEvY1A+4uCgTh+JyyjR7m/5tOj3YOtT9wFkCl+ma9LnSsNfa4wHT4m8JPqdX84EF1kMwECe+A7gZShWyeKvpoENg1GWpRSYxY3O+VTAWZkbTe8WIJA1kCJegEgzzGCJO9ED/XUwRKzkA27Etj5zw+iiOGX4+Xg/+RIBXBv6fTlSEG3VmI26TXRhtj5OXkjCePx97J4yr/RoUjv+TLfAn0+rZqIzW+lxYsXAmo2TKT3fNUWKZB7mrEcADG2qZAr6ThOrdNDA1dNo4X2jU4rVUo=; 25:IsTWlNhke2aHurBrPkMyL4rZh/Sb1hU1E8DceFRnnBj8XZ8+kqvliMErbxEOxly9lI0Xhr35ZrzMhRfbN8UoNKVUeZresHKzIPL/DGj5uCygV9H6IgWhgCp+HpERH1kvAyoIWucNnH8ziAAb0XrdDauJG3ejpsIBb7GfjPUIJz6R2cPWoHv8CAsVtrg+yZDRumayRczfjPrkRTydCwFTY9ravn1wv28RIvxP/Eirh8sJT33z6peb32sOuTXewNwSXdHg85EzwQiXYhfsEuOzT4HQVSYXeRmrMShiFv7nF8/LMNhZnIaoqU2mVk4CTzH8Fi9Z7hr1A4MieFpwkDcOyQ== X-MS-TrafficTypeDiagnostic: BN6PR03MB2689: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 31:94entJ+Q/z4hbEJGKZqqOBRHa+OafgBOeb/q3Uijj0WZO/aY7KrgrSIF6TPGeOaAzEjcGkb/xYGFnF6DtAMxKr3UXynMIalOKlu+MofYYg2aYHA9fOW2/DFzi+qiIcDt1EzJafWNN9f72q35JLI1w8z4UorjhuDW6JWRhPJ9aUTer+oJir+mA8+VYu10F5xdR173ZRC6f1e6olX9yrwRehGNEhkPZgUTp05ryjWihBo=; 4:XeyfSvroqlEjGV+A2lKCmiuekHDnjxO1OOTd8xcb06N4q0/z+Qb4OFftpQGcd9TR/br0wN/NEMHTxq9L0MMj/dn0Qw63up4GWZ9DavDvtvs95usFo2BdxmdTYlkjxvxC0L3tetZzX1AyfNiotTUOox7iQ7njQsRcNlsdakkp6D5QPg3oPjoJxLJEc4SHy9DOIXdMs+EaADSZyjuKytnyUKFxQGQIqKxs3BNwENx142zG8JMYgHrmc0ajSOcnSXg2/mebrOwCZMLZHxaKlvl7yLecQurYlA/UaB9a1gp3rl2Gq0+yeJDoxLT4W5TeBrT6 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)(93006095)(93001095)(3231022)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123565025)(20161123561025)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011); SRVR:BN6PR03MB2689; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2689; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2689; 23:66//z9/advZA7QD9MyLEx0cD54qch01DcLsu26B2S?= tkKP7eh2WCJoeWaJnNSYllRufruRLSdZuhVvKzQCcEHyJLc2IHfVM/nPLenLAHgO6s78FA47QgJY5wo+cCnuZPOwdqpQ6nGvEwIdAoQXM9EqCY6SX2KnSE9NbAlDdx69najzXXVXVr9OHxPBzfRQUcntaCkvmqqioW6e9qalFnArS/IMcu3C9TVdGTVftRnVVEWGCyAB3t18auy4hQfkDbA3Bo+8XO0MUMMToyuqVT8ZM09GUHKsD+VYHSOZSsiwJFTxruyV8lMK8FS1mU46E7H09xtjHdwfWMcazzPUuXVOG9Os+mYsFZD7AmMOn3LkHTJbbjN+vRfKf7i8yOirnXzB2wQfj/P6DoUOKMOC/hFjxHmIZhL/7qljuSYOx9m3h/eKTcsLBFIS/72ZX04O46QlgdSuROnkbyCzFHSu79/kRoBM++SKjmCjB/DOsgsR7gYYIQO7/TNyPY+fa0Bt7zsRxZMH0JBXlhKVfbL/ndB+5olVfe1W4Dbpc/TK/JTY4TjYNWVXTWgC4sUyDC4VzAqheh73rW9TwD3FSSRzBmrn7Te1Zgsh6URi+YwH0EDRZBT439dEBkUYWij2guZ9YE04Agfha/51Y5i7F/5DQ4tpnIU8U6imA5eY/+WGDz3qBMkIpMVZk54yF95EsM0CshT7DlkejRmu5ezAa0xJ1Y2oss4IbyjnM7xzv7BgK/iPnQwBavj9MdrInkNZ7+EWZZsGgov0W5mQhSTUlaqpdvq93AeK7gg5R2fzF4868mxf0+jbPGGH+wDPQMVlQKSaPT/BSt7lDpUfMH+MPFLY8oNoFgyiYZHg+inSZLxXjs4US1Zinceodx4ikubYv1CN1CFd48ZtWex0ow8jUQ0YH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SkVMSfj9Ha94O3ZydlrhK87k72jrjGNHzwFx37tSraX6vHvoYW96HJPBA4w SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:30.6090 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62d71377-6f4d-48e9-4cba-08d53dfbadfb 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: BN6PR03MB2689 Subject: [dpdk-dev] [PATCH 04/14] net/dpaa2: link status check as driver flag 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" Signed-off-by: Hemant Agrawal DPDK-809 --- drivers/bus/fslmc/rte_fslmc.h | 4 ++++ drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index 0c7872d..fd52e2b 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -62,6 +62,10 @@ extern "C" { #define FSLMC_OBJECT_MAX_LEN 32 /**< Length of each device on bus */ + +/** Device driver supports link state interrupt */ +#define RTE_DPAA2_DRV_INTR_LSC 0x0008 + /** Device driver supports IOVA as VA */ #define RTE_DPAA2_DRV_IOVA_AS_VA 0X0040 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 38de3d9..1cd302d 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1872,7 +1872,6 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &dpaa2_ethdev_ops; - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; eth_dev->rx_pkt_burst = dpaa2_dev_prefetch_rx; eth_dev->tx_pkt_burst = dpaa2_dev_tx; @@ -1976,6 +1975,9 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv, dpaa2_dev->eth_dev = eth_dev; eth_dev->data->rx_mbuf_alloc_failed = 0; + if (dpaa2_drv->drv_flags & RTE_DPAA2_DRV_INTR_LSC) + eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; + /* Invoke PMD device initialization function */ diag = dpaa2_dev_init(eth_dev); if (diag == 0) @@ -2003,7 +2005,7 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev) } static struct rte_dpaa2_driver rte_dpaa2_pmd = { - .drv_flags = RTE_DPAA2_DRV_IOVA_AS_VA, + .drv_flags = RTE_DPAA2_DRV_INTR_LSC | RTE_DPAA2_DRV_IOVA_AS_VA, .drv_type = DPAA2_ETH, .probe = rte_dpaa2_probe, .remove = rte_dpaa2_remove, From patchwork Fri Dec 8 05:21:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121119 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229138qgn; Thu, 7 Dec 2017 21:23:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMbi4HDMZEBhE6Q9gqmsheRQJrljjs4adiMlmLWpEnDeuXQ7XslN2Gnpjvw/kMsHX2Hvru5y X-Received: by 10.28.142.75 with SMTP id q72mr2857431wmd.45.1512710591155; Thu, 07 Dec 2017 21:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710591; cv=none; d=google.com; s=arc-20160816; b=RyOsnaAGz2eSTX/P7V3zZwG/TLDFLdxYg0B0pT+11Wl8dBD9UzDR8nZW+2LMQYJ7jo 5hu3jlp34SXj/8tYoRepgwlLRgExLWZZyweGepjbWluNQ4bt85drRFaI+9a/kMnueN1c J4xgLQd6wqyXABofxXNdMEtxAMJ9bg4NaqB3R6pGU0wmzfl5agieL/h8IupKgihUIwuy pJlyatOwUjUQCnZ3EoAUtiirjd9+UExjlVT9VzE4q7yYdESi9LaOKxMjj/UAAjDt7zAI kzhNGeL6pCmKDCdB8/xh7ywVhqZTBCwQmg0NYqo8uklqncJXytt3kjoDA88yUDrU6Ndi tGFA== 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=tsiWPrCt3hBm8xr0kTCjxU9zBTrSoHrUm0rj0CHdufk=; b=k+4KQzSYn82/OUqaPpqujoYdUDPFON5WTevkat5VoCAQ56SJqhjlUMD0x21S9qEvsQ f5/kbXgZ/IUjAtSlSjxufosPfu/mGo5S2ggdX0MCiTBnCO2ciAJ1g9+FLKVnIkrYF7hT ijNCapALReRrjRch4ANcnXO6MA+hJEXBiYdji9EUfQ0KxOMVT9D2i1p+fk/37C8o3VrC QZRJuiBhvUaM7TPvS86Fb0X8UbQPTk+llogTsBVjXnNI3AYuj1vDWs113D2m1yILO2jL BiMT5+QSkGs42wpWjf7otYkdk0g/wrmp4VkOst7rBLp7ZENycb1FJp6s42FFQaZZy8yF rPeQ== 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 q16si5073690wre.202.2017.12.07.21.23.10; Thu, 07 Dec 2017 21:23:11 -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 BF8F21AEF5; Fri, 8 Dec 2017 06:22:39 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0053.outbound.protection.outlook.com [104.47.40.53]) by dpdk.org (Postfix) with ESMTP id 9F6541B159 for ; Fri, 8 Dec 2017 06:22:37 +0100 (CET) Received: from BN6PR03CA0082.namprd03.prod.outlook.com (2603:10b6:405:6f::20) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:36 +0000 Received: from BY2FFO11FD003.protection.gbl (2a01:111:f400:7c0c::108) by BN6PR03CA0082.outlook.office365.com (2603:10b6:405:6f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 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.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:32 +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 vB85MKGc013022; Thu, 7 Dec 2017 22:22:33 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:18 +0530 Message-ID: <1512710487-32388-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841529841863; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(346002)(376002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(47776003)(2351001)(6916009)(6666003)(2950100002)(48376002)(77096006)(105606002)(4326008)(50466002)(2906002)(106466001)(305945005)(5660300001)(86362001)(356003)(76176011)(51416003)(8676002)(53936002)(81166006)(36756003)(33646002)(8656006)(85426001)(16586007)(104016004)(97736004)(296002)(68736007)(316002)(50226002)(498600001)(8936002)(54906003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD003; 1:cs8/M+FAFSWggALHke+IGVscMWjeps0dmRV3qAQ3TDq4OVG5Of1M2Kg9F3xV5pazrAWKCaX7UZI0FlHZmftzPk0tsr5J7Q5US4fFyC5AzrxRtRp+QZPAjE98LNK8y3Io MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c05dba3-623d-4b8f-88c7-08d53dfbaf4b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:m8L05jBPP5HrIv+ab7mVA3SvM/+t/SDqgOml+Q+yQF1yYuuNTfC2zHs3oXMsoPxpVRvIgektXu+c695Xc3OsujjAdy2QWpxWT4dMi3jHi6e/5apw54bhdgPahgo9SPwKt/eDPuH11i4XCF1YgERjrGwaSk3yATGwf2i2mr/e/XQ0mKbV0uRY0rrcBVFFUlu2tT0oR78sI9Pxw43wDeL4kujLTmLni6QRJTJK+xUuWTs9mZi7+6NAMFSeI/m4Dm1aj55DqOFU4uE5OZMeaV/T2d4Ci2hEfaUbFxXxe/6vaGe0vGb0Es/HZfFhjyPTkMU86alOOaFZqE7Ft2iDdZFz6ZYIYKky5OLnKmZXUdMgpCA=; 25:8Qq8Xknxw3gID3W1IrRTSmV7D179jxhHYlMLgZiMIXvNWcfNqqNYxVBvFIwlh8qJ5+3CXnU8+hI5G3m5ZHCwhuVeI7sqpDKjglV/5A55pNzPIjgSuOb5zINkUpmNCK8VL8Z4gNaGr9WFlJIGzHB0IgtIDr7/ZmgHgCwwGeWF4CXRP4DZjSDsA61yMaF0v9eF6nQSErljYFKBJlSZJhl6qQbLNOfUCSolOydi7wasI+kTIrjbKbv67wxGduNNCFVVzL6251JkSBWCrB8fEu86xEZQyZd+/i4hIsu2Je5ju0jXFxntD151WiWtLI5XvovbtXwkJh2fzs+T6bXQsCxrZQ== X-MS-TrafficTypeDiagnostic: SN2PR03MB2367: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 31:N7UOL88wBlqB8lZ8zvQxEEocreQSSjOjU0HBtaOs6tEwoZwTmO/5f68VLmx53ch3pMTYENV8Aoecit6wgYzq0454Wmy3FqJU2OQ6y2LzAGEUFkmbDvXW7D8KQM/cwtXAUnma+ejSWQzeTKpza6gCbzztD9IYZHLdgMj+mgcKlKdkcECicdStEHI02luuZcQLpRdaAsShapo7rpMfKa4ScQM5MPgnUw92lh4vkH0DPnQ=; 4:tzX+/I8l4x68PXj7Cfw0kEUzC9iYVAtT/8elKQowtoUpJKcIsbOy84SwuAXprK8Vocywv46Ku+pX6Zu594mLzpA+sdHMgqDPvsTnu7d5BG03AsDLcqcNvwPFzeORLr3UaWdjZlPAt2EZwjks1U8qb1G1fUZtAz0e+uH1mZqVLyMoRRxkwzMuudPXL2nUEWjIVvuviOFxQPYL7mKGtKw0Qin+6aIracJPD+MWIfamhr8FS4D8y3P+LUWt1zO+QoGum7CQqENS1x6rrCk3uyNnjX67SJA8x3Y2qMUASsDNnFwWrn5ZHD18KgczayhddIpzAwq530QI43fzxXnEpC4ZdRkQEpDG8qs5FrbruyiT5RU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231022)(10201501046)(6055026)(6096035)(20161123556025)(20161123559100)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123565025)(201708071742011); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2367; 23:dMVKok07zQ+WSBitiN7PDBCMdFGWRzG0cNCYUu9ze?= 40d3k92ipBpxHsn49QKcPgzi6SfpQf0wvTbDe1haS8+ap+3b8m42Iw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367; 6:Ju5NgyrLfjMRHum18O0oVr00AYoz7HTIxH5xNeLmUKBXBqblV6yRgK94tTP8k4n59B4NTTHYc2VI4lWoZMwUhAYAb06BRm63AaoKPyX0nJkkqAySs9ZHhp5fecVT5Dxsn8zjmEFhMS7pwZxzkuCQFUaZpTFtYyyh/baHmAXFDnPWYpUrDTlqu3I9bCuCYnHSEnGtuEnzpiN4ETnGFJ/JWBWjX87s71bncmGGaQD5idArUEFSwToGs/FTQHQwKaaXX9kG/oIy8a4zJYkiTPGhdY7fGVp0vGu528FpJIK8JllnTC5puI644F54iL6Ipc6/tRHJZGrVMMBa5TJ+G+sNNNWFVvKYdrAxuVsFTWPuD3E=; 5:OKRlI7KGaxJG7kN66D4zPPbsIu99mSuO+Rn5CafjHqiO+3z+VaErqo4hCDdzpgYDEgSTuf3kT0KDixOlgUSmCHcsmKp+B41JPr/s8PiudJKjqljztFNQlH4TKom7qJSaOi62uMkW5pgnaPk1Fs8nN6QQg4iREoGyLM75e4tHZ20=; 24:t/H1FAjjLMY6Etjh6v9jYhZMrBmw/VVVE0WfNRh8DxO+mnkjW0cEyDov+PcQcMoYPjbKnS14XSNECiFseskkEjHMGsyvVR61Em9gYDecu/c=; 7:NjfpuRlwv+g/jmLilTQM3Be4YpcnVRLyZIG1xbdAOarXy0PtM5959qJwLbdQzwl2SXpHqorTMADx/W9N7TGCvZKNC/psmuhAJ36yjEqXdcbRWslYbdwzh3/5bGR0tn8cYop6bePCUUbUuESuucIcnxNkZtrwtOEFbZVA1Y++8nIMONZTebOFBeekpU7rVnycS0qCj7gr1fiLYHfKFmzauo6mjp4lA5Z8uHHBpjisKCKMetIBbicfdAlaXqQP7Kud SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:32.7969 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c05dba3-623d-4b8f-88c7-08d53dfbaf4b 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: SN2PR03MB2367 Subject: [dpdk-dev] [PATCH 05/14] bus/fslmc: expose platform soc value register 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" This patch expose the dpaa2 soc platform family type. This is required to make some soc variant specific decision during configuration and runtime. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 42 +++++++++++++++-------------- drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 3 +++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 17 ++++++------ 4 files changed, 35 insertions(+), 28 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index f00070f..a98991a 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -76,6 +76,9 @@ static struct dpio_dev_list dpio_dev_list = TAILQ_HEAD_INITIALIZER(dpio_dev_list); /*!< DPIO device list */ static uint32_t io_space_count; +/* Variable to store DPAA2 platform type */ +uint32_t dpaa2_svr_family; + /*Stashing Macros default for LS208x*/ static int dpaa2_core_cluster_base = 0x04; static int dpaa2_cluster_sz = 2; @@ -265,26 +268,6 @@ static int dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int cpu_id) { int sdest, ret; - static int first_time; - - /* find the SoC type for the first time */ - if (!first_time) { - struct mc_soc_version mc_plat_info = {0}; - - if (mc_get_soc_version(dpio_dev->dpio, - CMD_PRI_LOW, &mc_plat_info)) { - PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n"); - } else if ((mc_plat_info.svr & 0xffff0000) == SVR_LS1080A) { - dpaa2_core_cluster_base = 0x02; - dpaa2_cluster_sz = 4; - PMD_INIT_LOG(DEBUG, "\tLS108x (A53) Platform Detected"); - } else if ((mc_plat_info.svr & 0xffff0000) == SVR_LX2160A) { - dpaa2_core_cluster_base = 0x00; - dpaa2_cluster_sz = 2; - PMD_INIT_LOG(DEBUG, "\tLX2160 Platform Detected"); - } - first_time = 1; - } /* Set the Stashing Destination */ if (cpu_id < 0) { @@ -499,6 +482,25 @@ dpaa2_create_dpio_device(int vdev_fd, rte_free(dpio_dev); } + /* find the SoC type for the first time */ + if (!dpaa2_svr_family) { + struct mc_soc_version mc_plat_info = {0}; + + if (mc_get_soc_version(dpio_dev->dpio, + CMD_PRI_LOW, &mc_plat_info)) { + PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n"); + } else if ((mc_plat_info.svr & 0xffff0000) == SVR_LS1080A) { + dpaa2_core_cluster_base = 0x02; + dpaa2_cluster_sz = 4; + PMD_INIT_LOG(DEBUG, "\tLS108x (A53) Platform Detected"); + } else if ((mc_plat_info.svr & 0xffff0000) == SVR_LX2160A) { + dpaa2_core_cluster_base = 0x00; + dpaa2_cluster_sz = 2; + PMD_INIT_LOG(DEBUG, "\tLX2160 Platform Detected"); + } + dpaa2_svr_family = (mc_plat_info.svr & 0xffff0000); + } + TAILQ_INSERT_TAIL(&dpio_dev_list, dpio_dev, next); RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpio.%d]\n", object_id); diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index e845340..a3240b2 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -54,6 +54,9 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io); #define DPAA2_PER_LCORE_SEC_DPIO RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev #define DPAA2_PER_LCORE_SEC_PORTAL DPAA2_PER_LCORE_SEC_DPIO->sw_portal +/* Variable to store DPAA2 platform type */ +extern uint32_t dpaa2_svr_family; + extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE]; struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(int cpu_id); diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index a1e30d6..f266d6d 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -93,6 +93,7 @@ DPDK_17.11 { DPDK_18.02 { global: + dpaa2_svr_family; dpaa2_virt_mode; } DPDK_17.11; diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 1cd302d..577bd8f 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -418,7 +418,6 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, { struct dpaa2_dev_priv *priv = dev->data->dev_private; struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; - struct mc_soc_version mc_plat_info = {0}; struct dpaa2_queue *dpaa2_q; struct dpni_queue cfg; uint8_t options = 0; @@ -450,18 +449,20 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, /*if ls2088 or rev2 device, enable the stashing */ - if (mc_get_soc_version(dpni, CMD_PRI_LOW, &mc_plat_info)) - PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n"); - - if ((mc_plat_info.svr & 0xffff0000) != SVR_LS2080A) { + if ((dpaa2_svr_family & 0xffff0000) != SVR_LS2080A) { options |= DPNI_QUEUE_OPT_FLC; cfg.flc.stash_control = true; cfg.flc.value &= 0xFFFFFFFFFFFFFFC0; /* 00 00 00 - last 6 bit represent annotation, context stashing, - * data stashing setting 01 01 00 (0x14) to enable - * 1 line data, 1 line annotation + * data stashing setting 01 01 00 (0x14) + * (in following order ->DS AS CS) + * to enable 1 line data, 1 line annotation. + * For LX2, this setting should be 01 00 00 (0x10) */ - cfg.flc.value |= 0x14; + if ((dpaa2_svr_family & 0xffff0000) == SVR_LX2160A) + cfg.flc.value |= 0x10; + else + cfg.flc.value |= 0x14; } ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_RX, dpaa2_q->tc_index, flow_id, options, &cfg); From patchwork Fri Dec 8 05:21:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121121 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229406qgn; Thu, 7 Dec 2017 21:23:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMaeJuZplwJl5rT1tWf6RVHqDj4scri4fV5faLNm1v6BpF7datPAaezLd7nxyZguoDvbBCr6 X-Received: by 10.28.122.18 with SMTP id v18mr3403794wmc.3.1512710613376; Thu, 07 Dec 2017 21:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710613; cv=none; d=google.com; s=arc-20160816; b=Ac0o+uYf4HFmd+DyQ2e41tc9+E9BlDPx40f58cOhx09EK0tCApspTjVZSvuppRBji4 XSwbrs/VuEsAiGLjyVOv55mxosyMX6BrrPBQaRGb+D5C5+HMPMNRgLy+5rq2yS/SHrIo zvrJAuqCU5ZBB/0F8GjVVavJTDi6SQF17nd/Num6MocB0duiBgxT2Kaey3ZRN4hLs8cX ggQ2jJ4dvw7LKPyIPYyyi3gFpQwZjByqRyCtgV9dr2UARoRxtWOaHydelsmpqO9pbKBa huPpcddhibJAlSdraZTWTBfac+8EwR8SuBGd2WsMdL3KEeMkZ647yHesmBNL1inEUzSD gKTg== 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=3me9pId1e7gvbSp4ayeRAcOOUb8Y64e/sTEAInLHHMg=; b=PR0qT3kF+cuL5uIh7EN+CBxoclkG1Sf9Pd44hx1L6o7VzGnAiOwCE0DzqbvuYaV5VL NKAWlkVSQzs24RETB04sG1t0rhYUydbiZXAobUe0w6vYuoWTAasOvIsDQpC9zrxk7EhD Wfd1d6Iu1fVe1zZv4KD6Sg2CwHnB2j5106NevkftqGSUmV54WUuWxPmBrcBaA4YsF+lY h5es1ioaT+ZQVafEjwg7jTDVtupOws3c+TO6KmHDUC5/nEkgi3+lx+GOeXSSD7b4U7tl sCw6+r2ybj82IJV0SdwZraqyhd5IM2AEzkTx4r4VyITUqRdhYFFzNFj1p5iOxJndXscf pLig== 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 60si5214853wrc.508.2017.12.07.21.23.33; Thu, 07 Dec 2017 21:23:33 -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 CC0611B19B; Fri, 8 Dec 2017 06:22:41 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0044.outbound.protection.outlook.com [104.47.38.44]) by dpdk.org (Postfix) with ESMTP id 0AC551B159 for ; Fri, 8 Dec 2017 06:22:40 +0100 (CET) Received: from CY1PR03CA0031.namprd03.prod.outlook.com (10.174.128.41) 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.282.5; Fri, 8 Dec 2017 05:22:38 +0000 Received: from BN1BFFO11FD029.protection.gbl (2a01:111:f400:7c10::1:145) by CY1PR03CA0031.outlook.office365.com (2603:10b6:600::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:35 +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 vB85MKGd013022; Thu, 7 Dec 2017 22:22:35 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:19 +0530 Message-ID: <1512710487-32388-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841553122082; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39380400002)(376002)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(8936002)(5660300001)(575784001)(6666003)(2950100002)(36756003)(8656006)(86362001)(4326008)(6916009)(77096006)(81166006)(50226002)(8676002)(47776003)(356003)(2906002)(68736007)(81156014)(85426001)(305945005)(498600001)(105606002)(48376002)(97736004)(50466002)(76176011)(53936002)(33646002)(2351001)(51416003)(316002)(16586007)(54906003)(296002)(104016004)(106466001); 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; BN1BFFO11FD029; 1:aGl1iA5XQut5DNz/RBMHUfCRj/e+83gwXyJ5TZH/SoVw7XCh7OFvbFkfHKLUjePBGGplpFW9lYx9Fd5j39SeUnpTLotIpMpBuUzMUs7h5en4DDfnixFcQtWQGkNcTmv9 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47a4e827-3e3d-43ca-c322-08d53dfbb0ae X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 3:FQKcAuISTeKH5hftyVErKXC2eGA+2wOZ6hDrcLdRBTZX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UYHh1MrXXbxOAu0EqvkhAu2DcIZNGjxgZ9hqqE7NIjaVEVBxrhqtqKfmNXq/Dq+VWTk2fK2H4sQaX2nSkanwVSw7H5KDj8mHfFvAR3RQsZz/XGzPsh8Inv/vv20rjAg1abbjV2IKrXcm/NkqXvr+QIPp/l7nAt7P2Eh3TbXbdxQR6viDei4AymEu4edaRa/9cOLSHoU9WpnbGOpS26HQ7nZaxYrNS19FCNPjDwxaag4b5vWmQNsAag8AgoRFLZEktH4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231022)(6055026)(6096035)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123561025)(20161123559100)(20161123565025)(20161123556025)(201708071742011); SRVR:CY1PR03MB2362; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2362; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2362; 23:0gUrufSlFOPhEJrrjQ8nGnluJFO4Q1GjK0+sfvl3w?= vaaIbDajQKJiA4e4cDDwg33BiS8JW2rPsO3mFBtDEFso5P8r/Uv2cF27gnzkHohoUA8ImREC1DnGFdnttW3v+RjqYm03NcaJWgBxmoZ9baGXab8Zku1HHzogUdnnmOvwv26RXhrd5dywqlqooZJuXSn62Mf2JMNxQnjBwPUS3olqpIpMndq0FkfZT0jzz4gOalczlm4VfhYFEL8aycFz8nJTmSBnaeh/GwCeejH+eiU1LUT/VuAXZgHaDGSQ3kX8wbZo61Qc1ZYEAB98ZNnO79Qwbdq+XJNzgAZ8Rqo27HQKqmQSKChnU2Wby6dixOrYSXlcvn2WtwMEcVKMKdx3v4ebAlITj9AHQiUMqsjuXsLUSKGgp82kegC2Y/aeX+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H+Taou9CGd4zWLTjy245uwDZHU+QG5D70Nmrto3lR4HDUgLz/E6O43WV7w=; 5:q7Gz0CCcLElA/pKU1gnmH6lvW7Lsi7e150gYamaUbNv4n0Kh574/yVpCQv+FQq5thFY+ALKhYhzoF3i6jJUNf/XPxdTzK7iPIVlMYYMkymkzTzSob/CWJK8UKmEClFzKWn95qPBGOZOiK1cBQ12R9HsV73Cdhblc1OxsR3uFozg=; 24:fF1y4XOl8rdtGqUpWn7MR57Mbd3naGqE/MrfNu5C3Wpc0dtVy53+n7eMpYMmOoH4kIkHLkkn06p+eU11Ze/2BfEsnjl8NBd58IE+vpJV4eQ=; 7:ilxMwTwokTtI6eXd0vwAsLGOXhD7xkRXbOLv+fmoMYx8P88AuMX/d96FDQRV2LQF5EAVBALhMmK6kN0Q2poprqFNNbOLRlQcMwuDf1O/N07qZroF/ElXqP7MkpJG/X5RdMgJX98UsqDZ6JDARpUDi9JpsPQqsov4EmqxNipjZ37rrF3DqkLSF/z7ou+2qkmuxSsis1LOsG+Bq7PLzR2tCzXdh20Gv+xI8N6CcT5H1itLHkPb++VqOnBoI6F5fDlc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:35.1406 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47a4e827-3e3d-43ca-c322-08d53dfbb0ae 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 06/14] bus/fslmc: add braces for pointers in macros 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 Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 7937293..a432b6f 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -199,56 +199,57 @@ enum qbman_fd_format { }; /*Macros to define operations on FD*/ #define DPAA2_SET_FD_ADDR(fd, addr) do { \ - fd->simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ - fd->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ + (fd)->simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) -#define DPAA2_SET_FD_LEN(fd, length) (fd)->simple.len = length +#define DPAA2_SET_FD_LEN(fd, length) ((fd)->simple.len = length) #define DPAA2_SET_FD_BPID(fd, bpid) ((fd)->simple.bpid_offset |= bpid) -#define DPAA2_SET_FD_IVP(fd) ((fd->simple.bpid_offset |= 0x00004000)) +#define DPAA2_SET_FD_IVP(fd) (((fd)->simple.bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_OFFSET(fd, offset) \ - ((fd->simple.bpid_offset |= (uint32_t)(offset) << 16)) -#define DPAA2_SET_FD_INTERNAL_JD(fd, len) fd->simple.frc = (0x80000000 | (len)) -#define DPAA2_SET_FD_FRC(fd, frc) fd->simple.frc = frc -#define DPAA2_RESET_FD_CTRL(fd) (fd)->simple.ctrl = 0 + (((fd)->simple.bpid_offset |= (uint32_t)(offset) << 16)) +#define DPAA2_SET_FD_INTERNAL_JD(fd, len) \ + ((fd)->simple.frc = (0x80000000 | (len))) +#define DPAA2_SET_FD_FRC(fd, frc) ((fd)->simple.frc = frc) +#define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0) #define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16)) #define DPAA2_SET_FD_FLC(fd, addr) do { \ - fd->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ - fd->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ + (fd)->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) -#define DPAA2_SET_FLE_INTERNAL_JD(fle, len) (fle->frc = (0x80000000 | (len))) +#define DPAA2_SET_FLE_INTERNAL_JD(fle, len) ((fle)->frc = (0x80000000 | (len))) #define DPAA2_GET_FLE_ADDR(fle) \ - (uint64_t)((((uint64_t)(fle->addr_hi)) << 32) + fle->addr_lo) + (uint64_t)((((uint64_t)((fle)->addr_hi)) << 32) + (fle)->addr_lo) #define DPAA2_SET_FLE_ADDR(fle, addr) do { \ - fle->addr_lo = lower_32_bits((uint64_t)addr); \ - fle->addr_hi = upper_32_bits((uint64_t)addr); \ + (fle)->addr_lo = lower_32_bits((uint64_t)addr); \ + (fle)->addr_hi = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_GET_FLE_CTXT(fle) \ (uint64_t)((((uint64_t)((fle)->reserved[1])) << 32) + \ (fle)->reserved[0]) #define DPAA2_FLE_SAVE_CTXT(fle, addr) do { \ - fle->reserved[0] = lower_32_bits((uint64_t)addr); \ - fle->reserved[1] = upper_32_bits((uint64_t)addr); \ + (fle)->reserved[0] = lower_32_bits((uint64_t)addr); \ + (fle)->reserved[1] = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_SET_FLE_OFFSET(fle, offset) \ ((fle)->fin_bpid_offset |= (uint32_t)(offset) << 16) #define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (uint64_t)bpid) #define DPAA2_GET_FLE_BPID(fle) ((fle)->fin_bpid_offset & 0x000000ff) -#define DPAA2_SET_FLE_FIN(fle) (fle->fin_bpid_offset |= (uint64_t)1 << 31) +#define DPAA2_SET_FLE_FIN(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 31) #define DPAA2_SET_FLE_IVP(fle) (((fle)->fin_bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_COMPOUND_FMT(fd) \ - (fd->simple.bpid_offset |= (uint32_t)1 << 28) + ((fd)->simple.bpid_offset |= (uint32_t)1 << 28) #define DPAA2_GET_FD_ADDR(fd) \ ((uint64_t)((((uint64_t)((fd)->simple.addr_hi)) << 32) + (fd)->simple.addr_lo)) #define DPAA2_GET_FD_LEN(fd) ((fd)->simple.len) #define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF)) -#define DPAA2_GET_FD_IVP(fd) ((fd->simple.bpid_offset & 0x00004000) >> 14) +#define DPAA2_GET_FD_IVP(fd) (((fd)->simple.bpid_offset & 0x00004000) >> 14) #define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16) #define DPAA2_GET_FLE_OFFSET(fle) (((fle)->fin_bpid_offset & 0x0FFF0000) >> 16) -#define DPAA2_SET_FLE_SG_EXT(fle) (fle->fin_bpid_offset |= (uint64_t)1 << 29) +#define DPAA2_SET_FLE_SG_EXT(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 29) #define DPAA2_IS_SET_FLE_SG_EXT(fle) \ - ((fle->fin_bpid_offset & ((uint64_t)1 << 29)) ? 1 : 0) + (((fle)->fin_bpid_offset & ((uint64_t)1 << 29)) ? 1 : 0) #define DPAA2_INLINE_MBUF_FROM_BUF(buf, meta_data_size) \ ((struct rte_mbuf *)((uint64_t)(buf) - (meta_data_size))) From patchwork Fri Dec 8 05:21:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121122 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229565qgn; Thu, 7 Dec 2017 21:23:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMYN8AwZtNkJRWPLzXqsv/uuyl1D9l/jX7toey+rdVulszyY9uecsFs+0qP59ozeA8jyI47L X-Received: by 10.28.67.2 with SMTP id q2mr2796440wma.38.1512710628104; Thu, 07 Dec 2017 21:23:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710628; cv=none; d=google.com; s=arc-20160816; b=t+Rl37mYJnLMX4xt451H18sE1AF/DqHI9hZmEaXiqVReJnAP8jwp7Jx/gCWsvSNT// jWJzb6lh8C8qZ4BNpHkpPQq3LBnwrUJ8FfdwfM0JxvfAM4L2EMPDzHiSxc3HxxGREoFC FMSrBRMHIq6wGhIWV60OmxDEd0uweLf/EcbUgpNPWcLAPbEivt+MoS/+5REga6JMJyIo +Sc4vRd9aHNO0yheR7mBU9a1hTSFD6fW0pC7YLKyjiVacUFzeQNS5pkt812gjLfwKRgJ YZbdTxTiaGf1/SoDjN33IEPME4zqtfGqQ9MUoawcY1VNRVoaCZ0GTQ/lqRRWno/5dtms tM3Q== 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=AXZk5+53fDTJ64ieBxptv/L1VhQWJs2Aor+IqBT9y8A=; b=qOHrq67BWJLk0K3oK7zsFeYonNUruiPk6PaFGLM9UDFFV/rYaSccWGK3O30cAA8GPc PQrscMFk2A0u8DWxSuoI62HHbzAxQX4Un1GYtEXjvqJl6fIwaTX8sIk/Mi8MOSjIYHRu R/u9yBTJw1gtn5cAliwouhKc0RndQlFOLVbOwUXOlf+M9dMRzcn1ewBb3+OmuT0ThQTV QLkv97OO0L6aPbpqrirzuPqJSzgor8W+Y0e9ql0UnjORda7ixsaDb/m68FDy0IpuiD+o UFGltvrT7ixPYy1extVHuAxU0Z91vuLR0urH+/IH7l61YXS8fae0KMEYaUlfXfVx+od0 nbGQ== 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 g44si5456103wra.347.2017.12.07.21.23.47; Thu, 07 Dec 2017 21:23:48 -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 1B5441B1A9; Fri, 8 Dec 2017 06:22:44 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0059.outbound.protection.outlook.com [104.47.36.59]) by dpdk.org (Postfix) with ESMTP id D63501B19D for ; Fri, 8 Dec 2017 06:22:41 +0100 (CET) Received: from BN3PR03CA0090.namprd03.prod.outlook.com (2a01:111:e400:7a4d::50) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:40 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::146) by BN3PR03CA0090.outlook.office365.com (2a01:111:e400:7a4d::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:40 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:37 +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 vB85MKGe013022; Thu, 7 Dec 2017 22:22:37 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:20 +0530 Message-ID: <1512710487-32388-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841575407832; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(86362001)(50226002)(8936002)(6666003)(2950100002)(104016004)(5660300001)(85426001)(8656006)(6916009)(2906002)(68736007)(48376002)(81156014)(33646002)(50466002)(81166006)(51416003)(8676002)(97736004)(77096006)(76176011)(305945005)(16586007)(2351001)(296002)(316002)(356003)(47776003)(53936002)(54906003)(106466001)(4326008)(105606002)(36756003)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD017; 1:ZLHii/nk0KVJicVVdxYjUfIWOWbPq91Arb6Tz9vhjXv5wjeugdc2A2X22ONoAWWQMsVkUR/Mwe9VpSgyLRyihd4oX2oHYUrX7VVHI+tKI6BqxKc25+qH4fqsqcpxgcgJ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4674496f-21a6-44e4-d0d8-08d53dfbb202 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:lmYpY6L7lhGviNpsH3P+rXNUDZaTU1+BmPVbV1vQvAamw3w2Z4Ab9NvD8KnJrjmc/1P6j4t96DKhsYnT4cE2kNcWd1LNSicg6+jMze0smjMVUbBCKkRmhmGj1G9swH8fwPbFfNq2uLrjxW6cKxgqe0F9HQXsYSrpnqkbh/gtyn6ymyHZcWLji8I5uS8/xO52VqkSEXRCx2chzNMJ1kO91cwzTuqBfPOTfNUD1IXDCPWM2/lswulvn5JTrauR4DseyiSE2WuxDTeXfTuAz7UVdxuVtdJbCn2c0LQVbPl3W3P5Gb1MD/k/vBBrlRpQhMuWPfpW8UDag3U2ih6dRgMVbE/xrjAlB4+8Fxptwil+hfU=; 25:qH6w4XyNEFtAhMYn7aELRaJ1/Wix8vV7rtQATuuiZpxKkGYYaXNpToSZj+nzeyr6fkmuI6Y2O1smcFnL+mEoi3R6Gbwb3bYwMTjlhaZOohnTCtUCCeZzJC1n1TOLdsNJWybj6fOAgVg0uHGNdyPU6ggXNWUcCbzSoQc6ZhtRp/g8ET/JQDC31zat5y63nSvFBkyHXNjxwVMOJUa25+BKuDUTA8xg06XtwYq0V95gUeVfyzrhGgkBKD/f2YIFC4Io6QvhxdhOWncuaQMQqTNZItnWfc/8dbd2OM5jfg0O42M/kMvbIeI0MY0toTPw9eSeAhVYIFRLK7A6vN942U+cxA== X-MS-TrafficTypeDiagnostic: SN2PR03MB2366: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 31:g6GC74d6d1S3ft2V33/TDG9KOEjbKqSrfPCJ57KJ3rlA7lf/xKoATTpNUOy381j6GOkNZyrBcdJX2MqwDxFqFwxAh2PI4cRvaFMW2pj7a6xjFsWHf/RxuHJQe8Duxt2gb9QKl3teB5Okz4Noa14KUbeFJGT5Xlnbye05FtzBLvj3c6eIYPmg5aaiLEFVuP0p/oKlTDn5xzfHHrPdQDuta7/MH+hUK+7xlhiuYRTwlys=; 4:jgc2wOoUNvOj6Xh7tA11R09VSHppYgqHkgYmPkRnVqSornat/0eGwilHGJc/bYPBf/SVAOm7ZpEDH0cWkHnq6f8lj+LhJvbLx55+gRRPxQPYvjKh/syPpgSPX8H+098rwAgsXAGfukVtRRuj2ubMyQgjDnPRIDHVLmL0ViQG62JfXgWFCKJyTGbd7YTWKtcJ/iUEC1jbhovwypSIyt+9jIb6DbDPm6e00t8kUFVQii+9VEUJVVpxYlUnrrkVgeISJkFAKT/YCoP6Cv2vnCAMiAUFEvCmsFr/ufB4JcYAqZ19//KJndzAQyq06m5g3rAZqN5mvqmBXqz7ktk4X5N4mzw8mFAujR0SsnPJ/BnKv7g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231022)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559100)(20161123556025)(20161123563025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2366; 23:161MfmkggDX+ts9ytftM6KdavFLkLIejqnnI3YE3L?= h4EVnGeiZiz2tzw3fEspQU1NGRduJi6HbrBuv8j8Mp2wXJuNu+jn6XB4ZvqFEOrXW6Ng313/sdfU58zl4qKJoGFQzHxeLmTwc7YC9AEIochomxS7PFIbkVf8W+uEw0FqJG/oHgAnw7eSZb23LNBx4JbDiut8Vop+6jtA8zNltENXvyUEflmCA3fqmvHBYPOgtHBbxZNDnhUtytloUx071cmsUWlCfHIAciTfUADswx1AfvgTtL1aulr7XzCLNc/C8TPmzxEYgElu/VMFx9/u/dy7UeBsZTrUVwYuJjPQL0qYq3vqcij2R9nHEHeyI1jEUyeSJyCx9fe3hmuSVnIbPJpvMOtDP4YOI49f+rf6n02Lq+FRnFcCE/9ucHzdm5u2O2Yes3oVARQYs7hwz4Bv/jKTezhqfUd0m8mVqdAYpwbNrgo+SspIOw8LAI15xW228OTmZaVHPgmE2JQNiXBoLJYGfdzuTqa+SYL0kE6rEYzzW4PhiWG5ce900h9YQ8eu3By270Pdkqkczonv196f3gqew4Tdp+yrPAjP6D1oXuPzA8DBx4g1OU5dvwD2MvMNfxKzhXNQmT9Q4VstXiZi5QfJW9AeV1n/UC4AxFyQSgBbk5syq9XJ3GkNW+6+ZaVzBBH0Yk4rJ9AWdiFidBWqW9c2SAWTKMFGYSn35VO90JbGSEseK1d1YqGRh+/BjhyUiVGQrKZxQImLroF6Rd9/qkZ9Spfvi9Bkspi4RBqJ2PfOudReMBT/lLbj0tsDBO1B8DoygIsDXiUviefRU6lATIRxm+R4MqoEHwm7W4UmwnhHVLSWHw8M7uPK+TMIxFdq7FQzu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Dh+JfFGOsIyGjAImkUIJY+8cxIii1Uf92V9tSvCREoe3cEG94gL2qyA368GVoAAkjAUU9Absld62mERW8Qv17GaKDw0X6zu4VywECJK1DteCQ7MaZ5CJHQczrVDH+VJxvxT0ECbzLKHvK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:37.3379 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4674496f-21a6-44e4-d0d8-08d53dfbb202 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: SN2PR03MB2366 Subject: [dpdk-dev] [PATCH 07/14] bus/fslmc: add qman HW fq query count API 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" This patch add support for rx query debug API. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/Makefile | 3 +- drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h | 30 +++++++++++ drivers/bus/fslmc/qbman/qbman_debug.c | 66 +++++++++++++++++++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 2 + 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h create mode 100644 drivers/bus/fslmc/qbman/qbman_debug.c -- 2.7.4 diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index c08b2af..7ab39cb 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -62,7 +62,8 @@ EXPORT_MAP := rte_bus_fslmc_version.map LIBABIVER := 1 SRCS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += \ - qbman/qbman_portal.c + qbman/qbman_portal.c \ + qbman/qbman_debug.c SRCS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += \ mc/dpmng.c \ diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h new file mode 100644 index 0000000..072ad55 --- /dev/null +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +struct qbman_swp; + +struct qbman_fq_query_np_rslt { +uint8_t verb; + uint8_t rslt; + uint8_t st1; + uint8_t st2; + uint8_t reserved[2]; + uint16_t od1_sfdr; + uint16_t od2_sfdr; + uint16_t od3_sfdr; + uint16_t ra1_sfdr; + uint16_t ra2_sfdr; + uint32_t pfdr_hptr; + uint32_t pfdr_tptr; + uint32_t frm_cnt; + uint32_t byte_cnt; + uint16_t ics_surp; + uint8_t is; + uint8_t reserved2[29]; +}; + +int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid, + struct qbman_fq_query_np_rslt *r); +uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r); +uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r); diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c new file mode 100644 index 0000000..591673a --- /dev/null +++ b/drivers/bus/fslmc/qbman/qbman_debug.c @@ -0,0 +1,66 @@ +/* Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "compat.h" +#include +#include "qbman_portal.h" + +/* QBMan portal management command code */ +#define QBMAN_BP_QUERY 0x32 +#define QBMAN_FQ_QUERY 0x44 +#define QBMAN_FQ_QUERY_NP 0x45 +#define QBMAN_WQ_QUERY 0x47 +#define QBMAN_CGR_QUERY 0x51 +#define QBMAN_WRED_QUERY 0x54 +#define QBMAN_CGR_STAT_QUERY 0x55 +#define QBMAN_CGR_STAT_QUERY_CLR 0x56 + +struct qbman_fq_query_desc { + uint8_t verb; + uint8_t reserved[3]; + uint32_t fqid; + uint8_t reserved2[57]; +}; + +int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid, + struct qbman_fq_query_np_rslt *r) +{ + struct qbman_fq_query_desc *p; + + p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s); + if (!p) + return -EBUSY; + + p->fqid = fqid; + *r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p, + QBMAN_FQ_QUERY_NP); + if (!r) { + pr_err("qbman: Query FQID %d NP fields failed, no response\n", + fqid); + return -EIO; + } + + /* Decode the outcome */ + QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP); + + /* Determine success or failure */ + if (r->rslt != QBMAN_MC_RSLT_OK) { + pr_err("Query NP fields of FQID 0x%x failed, code=0x%02x\n", + fqid, r->rslt); + return -EIO; + } + + return 0; +} + +uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r) +{ + return (r->frm_cnt & 0x00FFFFFF); +} + +uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r) +{ + return r->byte_cnt; +} diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index f266d6d..f59fc67 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -95,5 +95,7 @@ DPDK_18.02 { dpaa2_svr_family; dpaa2_virt_mode; + qbman_fq_query_state; + qbman_fq_state_frame_count; } DPDK_17.11; From patchwork Fri Dec 8 05:21:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121123 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229718qgn; Thu, 7 Dec 2017 21:23:59 -0800 (PST) X-Google-Smtp-Source: AGs4zMZJVMk2s7bhSqrhUTTQ63/8Jfqs3vXqyZl5LLfK1td0K6GjVQfwBWRUSFV7PI0L+18intwa X-Received: by 10.28.29.207 with SMTP id d198mr2850304wmd.106.1512710639456; Thu, 07 Dec 2017 21:23:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710639; cv=none; d=google.com; s=arc-20160816; b=nzG/UnujDK+fAE+W+EHNa6RWfsFzF61rNmC6wGfm4C89mMdIWsiD4WK/LKSUV7I3fm PJvJEc/GPZ3+eeEtaN1IUmQ3TmkBACiWZ6O0aPK5B5JAFInoPbY6hTnwh/cp3uSay0qK xUjGxkGKXBsVMCLdTspjTMIyOtFKa+Dc436g3furbw9jez5Px2JhdDl9NLgLi6+pmUWd VeTctmftF11Z7ez3FF8ITWR0lqdtXpTOrlSzXz+9TBleH9hRs5GoHCLCnGiIJPO5o0zK lhOHVORx8jrErml8+sFX/1083dx4Djseyu4SFFM+UEwKqwR0vZ6XtV/vKeTDXYkoeIcq 0S1A== 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=JYffbTZwsYl7eStmKmJtPAPVGU9/4y2T4XI76I30xrQ=; b=eD1ngWdFbZsj+au6N3gqfKicWONBierBwKOvP9jsiavKw+jn/vTHvkQn/fnzbP5zlZ lEHMVhfpgbseoUYiGBz5bTrUTCLz3txpIK7ePhneBkyuadLFDCPP9d1A1ottn2jYY5Mj xz/OFSl1U4F+Mv3XuP2/xVMtLprR3I9h8etcxZ5wgG+pVsOshl2yubwr4sQ6kqd1XFs+ rkGywrUJT1JrwyszzfGAHpS9IPv6N7j2+2TR9zQ2npcWa2l4wSjP6NZpzui7wCHvyrue yCS07WqiIMXC37vivV4YdLbbyfUORQTAFrf0RO4fFkLG5tUhMtoH6hADlvjuhq+CZ8cM n9Aw== 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 s26si5304359wrb.63.2017.12.07.21.23.59; Thu, 07 Dec 2017 21:23:59 -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 F0AF31B1B2; Fri, 8 Dec 2017 06:22:44 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0059.outbound.protection.outlook.com [104.47.40.59]) by dpdk.org (Postfix) with ESMTP id 5D8211B1A8 for ; Fri, 8 Dec 2017 06:22:43 +0100 (CET) Received: from MWHPR03CA0011.namprd03.prod.outlook.com (10.175.133.149) by MWHPR03MB2702.namprd03.prod.outlook.com (10.168.207.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:42 +0000 Received: from BN1AFFO11FD017.protection.gbl (2a01:111:f400:7c10::164) by MWHPR03CA0011.outlook.office365.com (2603:10b6:300:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:42 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1AFFO11FD017.mail.protection.outlook.com (10.58.52.77) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:39 +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 vB85MKGf013022; Thu, 7 Dec 2017 22:22:39 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:21 +0530 Message-ID: <1512710487-32388-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841596016091; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(39860400002)(376002)(346002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(48376002)(498600001)(16586007)(51416003)(316002)(81156014)(86362001)(77096006)(50466002)(356003)(50226002)(76176011)(8936002)(54906003)(81166006)(68736007)(8676002)(296002)(6666003)(305945005)(47776003)(104016004)(97736004)(2950100002)(85426001)(2906002)(4326008)(8656006)(106466001)(6916009)(53936002)(33646002)(5660300001)(2351001)(36756003)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2702; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD017; 1:FriIGXrkSRRywIN+BC3lkNgGDoOBPD5MylSai9pj2TD0GXVIagZtwEuwIfyqhZvwPA8Agnpq9zicBbzErDxbVPMTc0DUGY2F5YkqJFKWeiiRpOqcU/fDpuDMiVR0muqQ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19e883ec-bbed-4b49-45db-08d53dfbb33d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:MWHPR03MB2702; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 3:AUBLQm2I4bxlLL9Q909Rzvu2o0MuMKmxH1Rylee7v38KET9leKUFPD3vV55RWJB83HRkftzVkTfW8/PJLgkvHTuJBXwuhY+lroNNg0ZtM4pGmtchvyGNnyACG4CaN4VK4jpipmIACTYYDr1CQAuPTC5xGw2oFr0UKiT0K+ejuiYJZ5vV0gKL9eSwK2infYL/wz27/rlgddm2xu3gJZ5Bvi78/1/Uzx/HCdH8E0YViuoSbIbXNDMDXtgBxM6Cweixmq4RLTelWP3MB3VmIt1IxS/LaNrNXNCoLO/26oTi/xBhCBWYXk+hb8TP0D0uEI+tULspXs5hlyXd2wDR7P+cpFJ0hbCghRQSkhcIr8kaqoY=; 25:RZYl7zwGboryY0ivmDcB221pa8Pm3EY1iOFaYPtGYMucebMIrOMqyRHyoyrfwxJoo4kPJCfP0v+4jWAgNatzU24sfiqUfxtvDxyUjI5RnJZsFgXCDEjwIGFbD4hwri969F8lP/52LqqOwj+DsP8M3agZiPZuYWXAsKXFzsp8T6fPpDIQ6t5pE9ei7cz/L9eaAH45HOduL9bd2uJLiozbeWQv+npKlZuuaZHpCFiZ86HansvZ8e24g7sHznodmaHe+natDl41PLrT9jH01SbabAdrmTFfLodiWzT6JUVjRdPkLJ86XPJFwr7LWCfWuENV8h9hmXJjoD5LaAKFRCFM4w== X-MS-TrafficTypeDiagnostic: MWHPR03MB2702: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 31:Dxm0v6lj5hMuq22NLAcCMXfnzqxkWVxanncZbe0Z6ZxJrh8wzNpwTvt3CAQRiZsEX3ZcZWZSK/xIIo1mQ+tn57XX2KR9YV3/A06Z29uoNEFQ/J8IdauDni/9FOM2DfgVNH/exIomHsUXY7vtdAygLNhCb/4v+BbTVcpCxt+ZhzYn2TfGeou57+UmjuvhYEQ5Wi+5d9dA7z8m2ZH0O7FCovSfy2/UtvU/hWSBRlOF3ag=; 4:OBcm38sE6o5JKRZaHAFuIQSpfvQUM7JqMoTEWfVOIQ1qEjeTed4yj7AcJSYAEXtjhj27qy/kAy8Y5vHrq1MZ1guJHP+hp9W7bdj7LnsVuEmmZYOpOj0A4w2U6vRE/kgD2164jTFc3QdpT/6w+4NmR/vLBaPIi0HxGw9fVx8AHE306UzrycJgRR+oCuxeCZfbwHOYgKdrzBOohGS4zrf2OiUtYYMmOYXdT+GKnBT2b8wmJrsGawIEfDS1hujBIYw6+v2C4CET8mLq0OZVrFUOMSqJ8gE+Fz41VVQduURPVLkPAVzVnwqxFA5AiZb012gfms1K6LS/DrGPs8NV6DSuKriamwiVf36O/KvFsW5jRZA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231022)(6055026)(6096035)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(20161123559100)(20161123563025)(201708071742011); SRVR:MWHPR03MB2702; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2702; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2702; 23:Ig7donbYH034b/8EuYs4sdaFuAbB9Wau1pX4jKxWl?= rS+ejvMvcoy302Xj6N9sZdFJ3mSxm+xzsgKmJQnINtUcXNevZtd7iMKrqXhwAyklMIlEoJkTb8bscTJ81PHn4VRQlhsk3/QKFvp2qng0XTEaoDn/yKEoTywI6TEckjD+wQy0dEEV9YNkeZetXfEuYJ5c0l6mzvudA78Ab8kqL9p0K3VvM6wBmEIu0nOwxjydmufnA0h0L+jOaCdKLA6wzqY+RmVXicXQzhtSU+ATx3NoNlWlJDNvI1VJBA5t/Fi+JX0ltM8T4VHW1FFP6XcIN6ds/TooO6+B0c1E27s2xHWScxSOVFHgq5nsgOC03IxodPkZlgU1ZInhaFprfcfMVoWk3q627DP6BZQI1GI8fr52hkMAUFNLugkFlyws0ZSxl4AltlkbPt4xFZaNEnI3Z/W0sowNAy/O/m9xzLhN5T/BJxoAKFr2gOnF7ewakivgpUe2Cw2wbIC2wMZP0MdmN1RN6G2OjqxCeFamV8LawrmehV6qmsnr0u6mfc/r3XDTKjYvN5XSbLmNvjmtwu7TnxDqbMcOr2WCN//EcjgbZYvZ6xKS7l+20pjRcQ5n1lU2TTKws+PyvNvv1e0O1/iD7drInR6xbhgqi1oXqKFZr9tFGgGk5gHGUzEinoSUQFo+4tfMn0v1RU3GaczGQWvy4xZ6OGctMkmEfPQo4DFtrtYf4+HppmroLfnH5mC1PNG4qa9/U8ZN9/ukqK8GSzTqC8nLS/zpASOjo6+noQ5hj6MDSb1FNA7oUPAlL56wGon3evEuZUakvxGPrDWjAp4NbuVCWTEqTi100rX9l+OF4p0r/MI9WO+yTfZT6dAD03L4XcjqiWQI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Aa/aH4E5q3TSVadanQZDC7wSU4AnSRToD8O5r3R6aakkmgLrutP5+YTRnYXSj6/88uSR7dIlGERRndPCF6tJeLbZdRKGucJlAQD9q/sQF8IN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:39.4300 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19e883ec-bbed-4b49-45db-08d53dfbb33d 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: MWHPR03MB2702 Subject: [dpdk-dev] [PATCH 08/14] net/dpaa2: add Rx queue count support 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" Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 577bd8f..3e89d8d 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -51,6 +51,7 @@ #include #include #include "dpaa2_ethdev.h" +#include struct rte_dpaa2_xstats_name_off { char name[RTE_ETH_XSTATS_NAME_SIZE]; @@ -595,6 +596,37 @@ dpaa2_dev_tx_queue_release(void *q __rte_unused) PMD_INIT_FUNC_TRACE(); } +static uint32_t +dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) +{ + int32_t ret; + struct dpaa2_dev_priv *priv = dev->data->dev_private; + struct dpaa2_queue *dpaa2_q; + struct qbman_swp *swp; + struct qbman_fq_query_np_rslt state; + uint32_t frame_cnt = 0; + + PMD_INIT_FUNC_TRACE(); + + if (unlikely(!DPAA2_PER_LCORE_DPIO)) { + ret = dpaa2_affine_qbman_swp(); + if (ret) { + RTE_LOG(ERR, PMD, "Failure in affining portal\n"); + return -EINVAL; + } + } + swp = DPAA2_PER_LCORE_PORTAL; + + dpaa2_q = (struct dpaa2_queue *)priv->rx_vq[rx_queue_id]; + + if (qbman_fq_query_state(swp, dpaa2_q->fqid, &state) == 0) { + frame_cnt = qbman_fq_state_frame_count(&state); + RTE_LOG(DEBUG, PMD, "RX frame count for q(%d) is %u\n", + rx_queue_id, frame_cnt); + } + return frame_cnt; +} + static const uint32_t * dpaa2_supported_ptypes_get(struct rte_eth_dev *dev) { @@ -1737,6 +1769,7 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .rx_queue_release = dpaa2_dev_rx_queue_release, .tx_queue_setup = dpaa2_dev_tx_queue_setup, .tx_queue_release = dpaa2_dev_tx_queue_release, + .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr, From patchwork Fri Dec 8 05:21:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121124 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp229853qgn; Thu, 7 Dec 2017 21:24:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMa7UFnQVaNiL4EwlKMl6yXz9wWeiDahvM+aBvf5nRMMR2+nyuVrATVrwc8AD4uVTJ1z+Fa4 X-Received: by 10.223.189.135 with SMTP id l7mr4823515wrh.231.1512710650241; Thu, 07 Dec 2017 21:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710650; cv=none; d=google.com; s=arc-20160816; b=nxhEWxv0zVoYZ7uXq0lAKLIx+NKJUY8jfmROvXg8uR7RSreCNPsmNKEqKXBrdlfkaf qrlnRTVYAmTQliUKRQ4HhKLQkrU/pAidgeBq+3+gWYq8nL9Wmjif2jTG6N2GLtQAULAu P3AN4UC0lltfiHEv2r4WJsN/UTtkksaKPMB6hGL5h1ckTtdonRau41BoNR5FRnWIUpA/ gx4m7qIv9pvP+uR/x9wMmuXpfuicfe30Rek3ev+ZrmJE9RxJjMI0aux9eHpdZqZN+6ih ThVmRGQlkLBWmo17zZC1uceZ/X1x+KJe4z1sSQQ6VFIkCnsS2pFTetum9/gCyDDbATvv AzyQ== 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=4CId5+oLQznUBo64giGAwx6K4WxatODEewNnIxgMWvE=; b=R8pQZFk046F5xFb0rrYw5Or2KNe6Nyvh+lxRIlCT4r3Z+ZCoHiqXtPp5kNxdoS0Hau ArLD3zhety4psnOUglloyX3WqXlj1jLpWY2/EO6aAusbRlWRNOGYbLcYIzzlFTTcbf8k bHC79XVYhhHH6sGEjL0IUCrN1AEGoMyUmSye+bjYKw8zv7oKn0Xm+/CJBwhJ1xGYYTqa h9UXHd/gWqj06wSF0OysrmEgmJ+57nkwkB6Huuc26TYU0TMuCIxL3C247EI04WeuZAO0 eh5jZ+JsYYfu+XTy3W315k3x8BPTTLqe5haFiC3g4LijAuOOwe+KIzyhNcRPYQ8OxxJY LZ6A== 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 d7si5066434wre.211.2017.12.07.21.24.10; Thu, 07 Dec 2017 21:24:10 -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 E55381AEEB; Fri, 8 Dec 2017 06:22:47 +0100 (CET) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0083.outbound.protection.outlook.com [104.47.32.83]) by dpdk.org (Postfix) with ESMTP id 6110E7D06 for ; Fri, 8 Dec 2017 06:22:46 +0100 (CET) Received: from BN3PR03CA0066.namprd03.prod.outlook.com (10.167.1.154) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:44 +0000 Received: from BN1BFFO11FD045.protection.gbl (2a01:111:f400:7c10::1:125) by BN3PR03CA0066.outlook.office365.com (2a01:111:e400:7a4d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD045.mail.protection.outlook.com (10.58.145.0) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:41 +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 vB85MKGg013022; Thu, 7 Dec 2017 22:22:41 -0700 From: Hemant Agrawal To: CC: , , Ashish Jain Date: Fri, 8 Dec 2017 10:51:22 +0530 Message-ID: <1512710487-32388-10-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841618209096; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39860400002)(39380400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(2950100002)(2351001)(5660300001)(97736004)(104016004)(2906002)(36756003)(6916009)(4326008)(51416003)(76176011)(105606002)(86362001)(6666003)(85426001)(33646002)(106466001)(575784001)(8656006)(498600001)(50466002)(81156014)(81166006)(8936002)(296002)(16586007)(68736007)(8676002)(54906003)(77096006)(305945005)(48376002)(53936002)(356003)(50226002)(47776003)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD045; 1:Xe/Bm98sXq7oDM3DOe0QBazwMoo6Tzq0Mpf9feoS4JL9ACKZVIuozKoRqlcOJbnADOkIZSpxCtCg5Ium+QdIFF2dAdyED88SFTV58aK+rdqzhxzEppiGm8UAfe53ExSA MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c32f23f-ac63-4e3f-e948-08d53dfbb48f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:AB7OEgUF5EyUv7Gv4F/S9pqrYHShEZeCdoYxIYkhCSgNOF6MhawH8hJfyq5by1drfQ+/Are+QEBybh9pueDVmETP7dXY09G+pjyiGu1xHmjx9ZIPNXmjt2WdwRDP7DuK3dywuGqCJTkI8wc3dJP/Hjk3B50HfL/r3nz/osWv3kmJ2owDEnk2mwHcC7kWawWWmpDlW36zqzNIOi6vgjKuGmFkOEeXtIkpvlbmQVsb0Fx/IOdEjQof3saBMCNd0ZD7FdBqYNOZ5A2kAK4FoWcII3qIrsnZca4LPAdzfHqWzS/RRfJPfX1Su22bFutmoZIQPtrfkdG/4qvagBtjx8nRmEAgEeTOLZ68vt5aN5jnMAk=; 25:9E/+qzg/4A6Ss+JEgJWv6cC2fVg2veGQ+yEnP+/199giPs7W9NlpagNsfROAL1Bwb8k8qjuJ6zuYApfzICRkuIiHrYkXIQPOEu1qQvFrh21Q6/aENT+OFfwXYo96hFBQPIM+uFr/PxYujHpMBzhmown4nDdbkeNU545BCfh6FiveGtxk8OKcJQKBTkDT9fo3tfCqEK7GIzWY+R/8K4RSWo5lryeUniKw6Lxcs57saRNq3HdFTIOF5eJ2JmdNTwe5aoyNWNXUerjeRrRsPWU+oZepbJFpy/Q7Xa9sCWs6jxlar1nvuAhMOs9NtqJg7X0z0c0qwnyKoPxQax2B7rd+2A== X-MS-TrafficTypeDiagnostic: CO2PR03MB2359: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 31:z2lJlrfvMieNvRW0LGmrWe2pH3XOIXLhy1kbhGx8SW+gsTJ7I7Jp6zeabIZ6UKzhq2k28OzJkd7v8dVxiG8VsHoD8VS7BCJRTgRN9fgaAU9tFEhr8XID08RPaIDlXIKD3RNTjaR3f87VRSWmXGUQSuY3bPvlZZMnWWomcQ1I5BAgfNB11l/MrslgAQ3RhG4IFKumkmswH14orL88rTS4YAkaGp6w+/gavSrQuflbPVk=; 4:OFtqVSZqm0Qcxf0GI3vy2l8NhOGG5H7qnc7PupVHCxEI25xmRFnsQEWTE0/s5CsDmt6XaKHlyfRO2oshKRB60SEW6TAcShuw9RQMuWGw2IourSkynwTXbYG+Q/94/d8/us7qhtm2U1Bc7qGrbw/nFxX1j7IMPOcDRaGCBo0bnvQPfNcB4FBpGRRPRCNfVztxpiEC45VSH0BbXya7BrD5rv+oBvh5vpr/Inxn6N5CSxgKKY8klTe/VZjXZccB4Gc7R3k5X5FW+QTHb6xNf6rrLSEVkZbcHDoIO7E6OvrwTgmttbcyiYAqV4oLGDulULZCOKmMShfLC7/ylKkYBu/l+h7GelG377WuIHbFlqicvSQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231022)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123565025)(20161123561025)(201708071742011); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2359; 23:8t879DngogvL1cVDkBo4kbe4XYhMm+ZzgzLs3tdGV?= A3SI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kAPW1Kx2c5m2Ge78LGFJR3gir5drDvYnnfc X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 6:bgr4Zy/JiL1QmiQlDraoDOL4ThpBfW1H73nYJ3jmbzENPlhCrFDwMRwFN1DbR5V87jkzGiqAWQ+ckq32UfO5cr+TtUE6FNx04nDq8dFAyOXeJtDGEgFg4T9pLqv68HMh+FgNOqDimQiROgapBQMmtJaXCIvIDaPsB1TJfBKst0V7le0DhYKX67GDYev8J0mMmQYZxsLqrICGkPErY8UhBNnwnkitKY4HGp/H1J9wsKkCBhLgeLO2/CQxoIkeyw8bAK2hXA+J17tg6Duw5Vw6dHzANF+/MFsdcV1P+7aCG5xvBeuMowGfsUJUKjoaUxE9kX8LETle3hLGzoDZIwrUEDyiypJiORaDw/xYU6gyA54=; 5:OJJpVaJ5Jo/0oX5Y+cQcSlI4YjQT/pYO/bLhGV1qsmAADNxKQBpJDrBtesqYCJM/wqyd3zT41cL4bgOvT9cKpN+6tLSiDNkXly8yZGD7N7ucmFy7RPVJH0cR6c3dh9iuA+2pTpxSKGeij8ipgdEUA1GwC07WKBu/mWJHni+vYNc=; 24:xAwPO3TOmY3XcOTU4unRwZyobhWBh9OS0ANVL0uKZq7BS7dT4acwB+FzR4GzkKjo64uRychf399RBla3gURCb9yAPPSkHtG66OFQC7dais8=; 7:NGdZzB2eaHqYucgxsoJtncZVr1Ih1RgshJXNqYMjElHslohMnNuVnxeLtyLmbpNl3hutFDnTdm49OvXP2GRVbEG8oaA1cLPVHt7xLnNOD2Tr4featFQe6LMLZYZPVDZdplSnjr5vdxtxcDsUOrLxRmMw0aBvhADBqE6awdJ7QzBvtMfSEGdfDWpqxsOr37HUrEjxC5f06QZeXzFhM5BMvaEgBXfsd8XQBybPhonJrOSBGKu7HHRhaSFWwcel8Ues SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:41.6493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c32f23f-ac63-4e3f-e948-08d53dfbb48f 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: CO2PR03MB2359 Subject: [dpdk-dev] [PATCH 09/14] net/dpaa2: align the frame size in MTU set 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: Ashish Jain Setting correct frame size in dpaa2_dev_mtu_set api call. Also correcting the correct max frame size setting in hardware while dev_configure for jumbo frames Signed-off-by: Ashish Jain --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++-- drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index a432b6f..9f9ce0b 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -53,8 +53,8 @@ #define SVR_LS2088A 0x87090000 #define SVR_LX2160A 0x87360000 -#ifndef ETH_VLAN_HLEN -#define ETH_VLAN_HLEN 4 /** < Vlan Header Length */ +#ifndef VLAN_TAG_SIZE +#define VLAN_TAG_SIZE 4 /** < Vlan Header Length */ #endif #define MAX_TX_RING_SLOTS 8 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 3e89d8d..894c60e 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -347,8 +347,8 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) if (eth_conf->rxmode.jumbo_frame == 1) { if (eth_conf->rxmode.max_rx_pkt_len <= DPAA2_MAX_RX_PKT_LEN) { - ret = dpaa2_dev_mtu_set(dev, - eth_conf->rxmode.max_rx_pkt_len); + ret = dpni_set_max_frame_length(dpni, CMD_PRI_LOW, + priv->token, eth_conf->rxmode.max_rx_pkt_len); if (ret) { PMD_INIT_LOG(ERR, "unable to set mtu. check config\n"); @@ -1000,7 +1000,8 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) int ret; struct dpaa2_dev_priv *priv = dev->data->dev_private; struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; - uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + VLAN_TAG_SIZE; PMD_INIT_FUNC_TRACE(); @@ -1018,11 +1019,13 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) else dev->data->dev_conf.rxmode.jumbo_frame = 0; + dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size; + /* Set the Max Rx frame length as 'mtu' + * Maximum Ethernet header length */ ret = dpni_set_max_frame_length(dpni, CMD_PRI_LOW, priv->token, - mtu + ETH_VLAN_HLEN); + frame_size); if (ret) { PMD_DRV_LOG(ERR, "setting the max frame length failed"); return -1; From patchwork Fri Dec 8 05:21:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121125 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230052qgn; Thu, 7 Dec 2017 21:24:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMb4mM53BpWtv687+uHdqVQAhSXsUAHvSAd9hDb58Nk28Cmygv1eupnJYhvuBJ4jBuEEKY5L X-Received: by 10.223.181.132 with SMTP id c4mr23824504wre.42.1512710666999; Thu, 07 Dec 2017 21:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710666; cv=none; d=google.com; s=arc-20160816; b=lbZQ80Q8UJABeHBt0WSiL4pVxCZWa2eAEBzJBs2RIgQDPNpIEITSMjJ+bMkTcGzGEs FbOx9K2iifR14wu84LeOnGeqd48e127T7QYBpE1UJVm/SRwkJVTxwYnFRnFERFIxUBtK 5p0/HyD+KC5z2ZjCASvL9uP2dqP2u5hxPHS0TpntuFb3QstlJHWuIflopGhYFcBWtDFC d2UPatY6/TE/s6me9BlCxZlCa3ScWf3ENPjZmsV4T/GpvDkxmCZzuIpCouBV4RRD5TVJ NTn+LRNm22TEYXIoJ+DJLFeCvxIyC2vO3B0nofu5x2eCA/vzAjE4sto7Gg12PWiYZ5qG BfAA== 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=rQq/OBXIh6GYgKx6G5UkHZOebJNQRhSbzJfkicxVwik=; b=VmEDO5dBKJUCsLF6Ud2WfVbaCTXG6QspiXES6DI++yOKQwI8lns6jey0UJNdqV1i0y HkCQLTj9G5soPyiBI0OcFTfUWNE1xrs2mgGb8e2kSqCQ7cl5Tcy3rX+M+4cBgQEkHzSA wBGS3fgZ4W3ShQ7ufiLrg+Zdzw/7mVQa3npskr7aW6JWTIXTHjbnDwGSAIdHs3woAJy4 uyftGU35dcIu8GyQ+z6sumzjRkpzMw5y1hh/em5G3mo4xpJoMJJyl3JqDrpLRv8W3FCk PnmV0HS8OSfQczKE7ZftPoK2+RG69VAvNAk+Hj4PLBSSbX9fnZ27Vz9wR4xEWirve4of KMjw== 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 26si5186272wry.389.2017.12.07.21.24.26; Thu, 07 Dec 2017 21:24:26 -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 297891B1C1; Fri, 8 Dec 2017 06:22:50 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0084.outbound.protection.outlook.com [104.47.38.84]) by dpdk.org (Postfix) with ESMTP id 5F8221B1B9 for ; Fri, 8 Dec 2017 06:22:48 +0100 (CET) Received: from BN3PR03CA0059.namprd03.prod.outlook.com (10.167.1.147) by CY1PR03MB2363.namprd03.prod.outlook.com (10.166.207.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:46 +0000 Received: from BN1BFFO11FD045.protection.gbl (2a01:111:f400:7c10::1:115) by BN3PR03CA0059.outlook.office365.com (2a01:111:e400:7a4d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD045.mail.protection.outlook.com (10.58.145.0) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:43 +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 vB85MKGh013022; Thu, 7 Dec 2017 22:22:44 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:23 +0530 Message-ID: <1512710487-32388-11-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841638956697; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(376002)(39380400002)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(16586007)(54906003)(305945005)(2351001)(6916009)(316002)(33646002)(50466002)(81156014)(8676002)(47776003)(8936002)(81166006)(2906002)(8656006)(104016004)(48376002)(296002)(85426001)(50226002)(36756003)(97736004)(86362001)(4326008)(53936002)(68736007)(2950100002)(77096006)(5660300001)(51416003)(76176011)(6666003)(498600001)(105606002)(106466001)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2363; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD045; 1:EAxhS5G1p/lsaFHGvX/bRi6A936okRnx8HzcTVlDRy2yYBYfoBdG1QsZSkqohz3/itjUe3w6LwTcQJqfyeKBfFeWcCC1DuhGYWTiaEppW8q8cXR8AKUvh0wk27Jp+0IO MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b6de5a03-2ca2-4322-7e99-08d53dfbb5cc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2363; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 3:xC89ViBZidSb8IVpLfdlFPf7QUUX9xZNOp2mHEohHQBMCQXDExH2Qj3bTQU2ixDS2k9sQvSpR2LIyUbRnXhm95EDmaUt+waopqRT8wUF5+Sqok5B48vkFkNraOhgS6tFChqkOPQYAuAj6zYWmCMIN0GnGAQOtaSz8XDu0a0jwnpfOXPvyGzjuN30luMrQm4kWJCG5Kmj2wNLBMaGWGF6Q3kNtSU9tkk/yddMDHx4+es5zIBu2cTjePKL62TvJ4oEiocKdKRb5PJrxOLTG+N6hHsa3hNd4onuPZLprQsGWKeo+NchNRaZ6R/T4VvQIG2RtjQ3NxZ8V2Yirq2pnR4JS5ti+Z/nLURX7iL22Dq+69s=; 25:ya3V85IQdRZtWUy9BmEiKP7r99Y+vjPugwC7vtCew538b/ZQDkUzb59zpgZsHai5Kwm8jdGQyqC0n/QcUgytHZoDJG3T1jRo4f/U1EH3VgnBhGBRC18juXPPDKJcHhf9zY3tP4ry+qkEDllMSzCvI3x9Wticsz2pGwcM+27YTTimQfzhqiMBhKcYx/94Gz/7iOp+SUz8sCIWmKwG4EU6D9OoX1U5hmdkzsbBjBVP+T6Qa2xLnZphhJW0UjT1aJvREeH+DYm83zWulfdW8Y2lbRK3Eo8YM3jNf3//P0m4c46i9oau5bdmRsqAGivVKu0Abcj8k6lJk2ClvjaTlvV6/A== X-MS-TrafficTypeDiagnostic: CY1PR03MB2363: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 31:TmMD4DmCDG7aNxw+6BOKZ+BNqm6r5m2kYezqvzj20pct2FICJ2EhzAAZQ+N0NeYRPSO2ipUH7+Yr2CYPn5h0fXIn/NBXQrakvdBqiyy9hoyI7ii4qJiME4H0KQiFCRZclclhXVs9AUwm2kkTQCQMBQ3mpHehz707xZj6sjj+zKQlxjeUqXURHcEhEUzmJ+9bxECh/+zXBZlTjhJ7lufjBVHu3U9MNsi0+M2LPAKhk14=; 4:axqZUQl/IJdwaa4KtCF7ecD05pf+uAGvl/r19Bbg6byA8FN3mLG2azEwzvsLyixQ/OZlKGXgrAMXgkBDuwWFOQpoxFnK7aAHud2WA/dkfyPd25jbWM3Kt5VTbT7QoiP6fs95sCzMKxS9OFMCpiMnuOi7jFD3sykih4shgN4J/fc108QidO4XXWqgsc/FcxhVb/Zr2qKFbYckkLkHTIl558dFg3cxMIEk+a8pSlGtGrD9CnYsUlkEFIOGZkEF1r4VCkl0Qtw//b/5ugOg9oboA0oOWy7mOYhSlU30GhKMlWGAUAn6GNGVhiQB5EcBocMy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231022)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123561025)(20161123563025)(20161123559100)(201708071742011); SRVR:CY1PR03MB2363; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2363; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2363; 23:KQ9nCINIAHl52Ql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08 Dec 2017 05:22:43.7084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6de5a03-2ca2-4322-7e99-08d53dfbb5cc 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: CY1PR03MB2363 Subject: [dpdk-dev] [PATCH 10/14] net/dpaa2: add VLAN insert offload 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" Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_rxtx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 8ecd238..93c2319 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -242,6 +242,12 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, /* Resetting the buffer pool id and offset field*/ fd->simple.bpid_offset = 0; + if (unlikely(mbuf->ol_flags & PKT_TX_VLAN_PKT)) { + int ret = rte_vlan_insert(&mbuf); + if (ret) + return ret; + } + temp = rte_pktmbuf_alloc(mbuf->pool); if (temp == NULL) { PMD_TX_LOG(ERR, "No memory to allocate S/G table"); @@ -308,6 +314,12 @@ static void __attribute__ ((noinline)) __attribute__((hot)) eth_mbuf_to_fd(struct rte_mbuf *mbuf, struct qbman_fd *fd, uint16_t bpid) { + if (unlikely(mbuf->ol_flags & PKT_TX_VLAN_PKT)) { + if (rte_vlan_insert(&mbuf)) { + rte_pktmbuf_free(mbuf); + return; + } + } /*Resetting the buffer pool id and offset field*/ fd->simple.bpid_offset = 0; @@ -347,6 +359,12 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf, struct rte_mbuf *m; void *mb = NULL; + if (unlikely(mbuf->ol_flags & PKT_TX_VLAN_PKT)) { + int ret = rte_vlan_insert(&mbuf); + if (ret) + return ret; + } + if (rte_dpaa2_mbuf_alloc_bulk( rte_dpaa2_bpid_info[bpid].bp_list->mp, &mb, 1)) { PMD_TX_LOG(WARNING, "Unable to allocated DPAA2 buffer"); From patchwork Fri Dec 8 05:21:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121126 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230181qgn; Thu, 7 Dec 2017 21:24:36 -0800 (PST) X-Google-Smtp-Source: AGs4zMZxv8tGb9iQ6cO2dZ8GeicOepVAmc6KAD7p6iNb50rwncHflQsHSfS+eytbS6I86bF/TlJo X-Received: by 10.223.133.149 with SMTP id 21mr19546214wrt.266.1512710676871; Thu, 07 Dec 2017 21:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710676; cv=none; d=google.com; s=arc-20160816; b=0c1+nhVk+4k+25Uioi0QurFsxwJsOBFzZpoD10EaztndGIe5RHC1vjnDHHvRLTBcLF RpsFbX9Lfk8U4ccI4n/dAhU+O7SsN4BdrVR52SjJXLkp7AMKEhXDfSvyXzj4h9GK8ijZ VHQbht55lZIllZHSuUt41KzK4bwzVbzNd99s7XbwClabCGLb1mvkq8n3htbFEw0MvDtn g4L5ZM2VcblPmZSNm6b3QD3PYSlyhMirnweXah1PzFloRQnvP418hwyRx1M+l1zjegi6 azNkkUC6BS+MtZIqpDmO+jkEwKrNd+xjxHcJAMouF7WqmMm/3RrH2wJyQiNRNTwbu8oe iJfw== 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=YST7Lihz0056Qgg+N34Xa7OYfU3vRLty8b3gtIsbtYM=; b=lToP4JvMIDR8Ah/5QA5aneEdrQ2RG8E070NhnJlbUYeMTGb5yJDj274KqScE+YQ6RI +zSxEhoYmQGb4HApvq9FY3vrxCKsVGV278CsoIqjc+CZEYbEPW3jh541eQn+3fxzMhhG Dr7wzZP1xqahARBXOaURwcUXkS9XMuYGAduBB9a4Twc2zbF6uNwuhoSuDLv/OBlUdJDg ktOFmqdA231SwO2zqXbrdKKiNVY1fqr0IzodCQFwsZXG2ZHzj6QPWjTzD1iffV/slc6c d9+jk6wVJIyU5xJquimJ4cPL8vHfu/oRx04WYpmg6nZmM6oEKKN37t3zRM1T9fEBsKNK xzMg== 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 t203si409399wmt.132.2017.12.07.21.24.36; Thu, 07 Dec 2017 21:24:36 -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 022EE1B1A1; Fri, 8 Dec 2017 06:22:52 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0054.outbound.protection.outlook.com [104.47.34.54]) by dpdk.org (Postfix) with ESMTP id DEDE01B1A0 for ; Fri, 8 Dec 2017 06:22:50 +0100 (CET) Received: from BN6PR03CA0077.namprd03.prod.outlook.com (10.164.122.143) by DM5PR03MB2700.namprd03.prod.outlook.com (10.168.197.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:49 +0000 Received: from BL2FFO11FD007.protection.gbl (2a01:111:f400:7c09::166) by BN6PR03CA0077.outlook.office365.com (2603:10b6:405:6f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:49 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BL2FFO11FD007.mail.protection.outlook.com (10.173.161.3) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.239.4 via Frontend Transport; Fri, 8 Dec 2017 05:22:48 +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 vB85MKGi013022; Thu, 7 Dec 2017 22:22:46 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta , Ashish Jain Date: Fri, 8 Dec 2017 10:51:24 +0530 Message-ID: <1512710487-32388-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841688643786; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(376002)(39380400002)(346002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(48376002)(68736007)(356003)(8936002)(47776003)(50226002)(305945005)(498600001)(5660300001)(36756003)(316002)(53936002)(6916009)(77096006)(2950100002)(104016004)(6666003)(54906003)(86362001)(85426001)(2906002)(8676002)(575784001)(76176011)(50466002)(16586007)(4326008)(81166006)(51416003)(97736004)(8656006)(81156014)(296002)(106466001)(2351001)(33646002)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2700; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD007; 1:msG4eDsG39S4KNVmnCfNEDR9SOJlN35+jVn3Jig9n6fXp542BadR+SrsolA1d2iv++feVlFD5M3mg+/lkuLlU6ADvEhWGdygtFQhUXJSTuMxLoQfi8t8BfBjXwTW5fKG MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a9034f62-cb2f-496c-3c68-08d53dfbb8ad X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2700; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 3:YjKi0LsL/UN68o16GnnV7xwsCacDcdirU1V4r9PEKlHijU0EBwmgpJCRsRa6RuQf9N/ZOcTASGugZkgw4KsH3UaT43OjFPX3FmHT3a8jehi7e41j943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X3Py14O0qXUkaqjPHCCFpRLs3YCShjFj3sWweNxiFepu3nlY46T76xZZyoTLmj8dy+PJUODiQasIBsKRc6D24l4bwo10P66Oas2PrHAlgZDsak7wrjlmdEO08uPiYiF4+g1ILV3lv0vd5T9L/dxovoJ/6fmfkVjfq22CMwdxfbYFElN/bPw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231022)(6055026)(6096035)(20161123563025)(20161123556025)(20161123561025)(20161123565025)(20161123559100)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(201708071742011); SRVR:DM5PR03MB2700; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2700; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2700; 23:ixzyZDYhwSsD+Ew0gpuYNgdq7TnpF7VxMlp65NxgL?= X5TMulfsfkITSo07uOEzoka+37698Ye7HVyWxRBFhweX6oM3Rwdy8jgOvXrBUqJ+dTrCbxkxJNUlpwRJCt8U6QffmB12nrpYJ2Q+zoxG0UrgTe9gOyjIQRIZbVXNe1UazncEeu6X28bkVokiWIkYxomlMa1x1kCiTD4EU/jE8ZLG49F4cjIWViJip/7hR+4dvCJlgEgkGXwmGV/8jize9TsJc1WRimhkA1fkxSy0clhimSN3o1/jaW9hGk07SJIaTl9IB+TZ7YxbZVVFAQqdOcdfNBmolM3WB/F7+VGeIEKbAOavyfFutMnfUcfoRtFERjzYRk6kKtCboWfcY9GnQ47+e/cBVsdtRl2kxhqezqJJhPs3xd61qPAc1NZqGtivMjGtXxgNsKiG51i6G5ZUmCGtw0/H6d2NQsC+Rjk74Ux+GyeOzWyujAvi0UHW5SFU9f0TdIlXHDufmyxsLnnpGZluzxVSFh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6GuQdBxN4roG8H2DPt8cqq1YZ7JNvTwGW082AJEpajARGFBYkb3DDWC4gvSWf7Zueq3xL65JwobSmR/WYtD2MUi64lTcbE8bk716bpRuwFrjjx7tGl1hi4ZhLB6gICqsz6oB2R8o/1LuYM=; 24:Ucv4GkFLoebABMCGdisWcR61GDzGcWMRzwcFE1db/CMF+axPTRUnXGFNlExnEDtrAfFFIARwgfGVQ7jdgRPwizXiwTFpie0jzg860fGAZvQ=; 7:veuOlOuQsgtpXilFUV9fR1DJusk2WoNxXdGZ1CMaWYLdYnKXNwmPddqR/rqgR455SHnAOFbEd7twmlOKRKAVCnVXI9uTXIzxIjOD4A1E/BFw/dwa54VAQe3V0Xb6f36fKyaw1/3VrK4RZ3yb8aZtN9MYgaJrvBy9z9JiQpv9+Op1TbBu5qZVc2A26bZJ8xpqxUDiV98vOH6v1/olZhMUE2Pyh3N63OIbk0Nga3T97NFh+bFBJMtEJPPBYGMtaasQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:48.5679 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9034f62-cb2f-496c-3c68-08d53dfbb8ad 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: DM5PR03MB2700 Subject: [dpdk-dev] [PATCH 11/14] net/dpaa2: add parse function for LX2 device 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 Adding support for DPDK packet parsing logic for LX2 platform to accomodate the new FRC format introduced in LX2. Signed-off-by: Ashish Jain Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 + drivers/net/dpaa2/dpaa2_ethdev.h | 27 ++++++++++ drivers/net/dpaa2/dpaa2_rxtx.c | 94 ++++++++++++++++++++++++++++++--- 3 files changed, 116 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 9f9ce0b..c29d7f3 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -209,6 +209,8 @@ enum qbman_fd_format { (((fd)->simple.bpid_offset |= (uint32_t)(offset) << 16)) #define DPAA2_SET_FD_INTERNAL_JD(fd, len) \ ((fd)->simple.frc = (0x80000000 | (len))) +#define DPAA2_GET_FD_FRC_PARSE_SUM(fd) \ + ((uint16_t)(((fd)->simple.frc & 0xffff0000) >> 16)) #define DPAA2_SET_FD_FRC(fd, frc) ((fd)->simple.frc = frc) #define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index b8e94aa..9a9496f 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -76,6 +76,33 @@ /* Disable RX tail drop, default is enable */ #define DPAA2_RX_TAILDROP_OFF 0x04 +/* LX2 FRC Parsed values (Little Endian) */ +#define DPAA2_PKT_TYPE_ETHER 0x0060 +#define DPAA2_PKT_TYPE_IPV4 0x0000 +#define DPAA2_PKT_TYPE_IPV6 0x0020 +#define DPAA2_PKT_TYPE_IPV4_EXT \ + (0x0001 | DPAA2_PKT_TYPE_IPV4) +#define DPAA2_PKT_TYPE_IPV6_EXT \ + (0x0001 | DPAA2_PKT_TYPE_IPV6) +#define DPAA2_PKT_TYPE_IPV4_TCP \ + (0x000e | DPAA2_PKT_TYPE_IPV4) +#define DPAA2_PKT_TYPE_IPV6_TCP \ + (0x000e | DPAA2_PKT_TYPE_IPV6) +#define DPAA2_PKT_TYPE_IPV4_UDP \ + (0x0010 | DPAA2_PKT_TYPE_IPV4) +#define DPAA2_PKT_TYPE_IPV6_UDP \ + (0x0010 | DPAA2_PKT_TYPE_IPV6) +#define DPAA2_PKT_TYPE_IPV4_SCTP \ + (0x000f | DPAA2_PKT_TYPE_IPV4) +#define DPAA2_PKT_TYPE_IPV6_SCTP \ + (0x000f | DPAA2_PKT_TYPE_IPV6) +#define DPAA2_PKT_TYPE_IPV4_ICMP \ + (0x0003 | DPAA2_PKT_TYPE_IPV4_EXT) +#define DPAA2_PKT_TYPE_IPV6_ICMP \ + (0x0003 | DPAA2_PKT_TYPE_IPV6_EXT) +#define DPAA2_PKT_TYPE_VLAN_1 0x0160 +#define DPAA2_PKT_TYPE_VLAN_2 0x0260 + struct dpaa2_dev_priv { void *hw; int32_t hw_id; diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 93c2319..3b58a48 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -50,6 +50,75 @@ #include "dpaa2_ethdev.h" #include "base/dpaa2_hw_dpni_annot.h" +static inline void __attribute__((hot)) +dpaa2_dev_rx_parse_frc(struct rte_mbuf *m, uint16_t frc) +{ + PMD_RX_LOG(DEBUG, "frc = 0x%x ", frc); + + m->packet_type = RTE_PTYPE_UNKNOWN; + switch (frc) { + case DPAA2_PKT_TYPE_ETHER: + m->packet_type = RTE_PTYPE_L2_ETHER; + break; + case DPAA2_PKT_TYPE_IPV4: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4; + break; + case DPAA2_PKT_TYPE_IPV6: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6; + break; + case DPAA2_PKT_TYPE_IPV4_EXT: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4_EXT; + break; + case DPAA2_PKT_TYPE_IPV6_EXT: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6_EXT; + break; + case DPAA2_PKT_TYPE_IPV4_TCP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP; + break; + case DPAA2_PKT_TYPE_IPV6_TCP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP; + break; + case DPAA2_PKT_TYPE_IPV4_UDP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP; + break; + case DPAA2_PKT_TYPE_IPV6_UDP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP; + break; + case DPAA2_PKT_TYPE_IPV4_SCTP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP; + break; + case DPAA2_PKT_TYPE_IPV6_SCTP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP; + break; + case DPAA2_PKT_TYPE_IPV4_ICMP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_ICMP; + break; + case DPAA2_PKT_TYPE_IPV6_ICMP: + m->packet_type = RTE_PTYPE_L2_ETHER | + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_ICMP; + break; + case DPAA2_PKT_TYPE_VLAN_1: + case DPAA2_PKT_TYPE_VLAN_2: + m->ol_flags |= PKT_RX_VLAN; + break; + /* More switch cases can be added */ + /* TODO: Add handling for checksum error check from FRC */ + default: + m->packet_type = RTE_PTYPE_UNKNOWN; + } +} + static inline uint32_t __attribute__((hot)) dpaa2_dev_rx_parse(uint64_t hw_annot_addr) { @@ -159,13 +228,17 @@ eth_sg_fd_to_mbuf(const struct qbman_fd *fd) first_seg->pkt_len = DPAA2_GET_FD_LEN(fd); first_seg->nb_segs = 1; first_seg->next = NULL; - - first_seg->packet_type = dpaa2_dev_rx_parse( + if (dpaa2_svr_family == SVR_LX2160A) + dpaa2_dev_rx_parse_frc(first_seg, + DPAA2_GET_FD_FRC_PARSE_SUM(fd)); + else { + first_seg->packet_type = dpaa2_dev_rx_parse( (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + DPAA2_FD_PTA_SIZE); - dpaa2_dev_rx_offload((uint64_t)DPAA2_IOVA_TO_VADDR( + dpaa2_dev_rx_offload((uint64_t)DPAA2_IOVA_TO_VADDR( DPAA2_GET_FD_ADDR(fd)) + DPAA2_FD_PTA_SIZE, first_seg); + } rte_mbuf_refcnt_set(first_seg, 1); cur_seg = first_seg; while (!DPAA2_SG_IS_FINAL(sge)) { @@ -208,14 +281,21 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) mbuf->pkt_len = mbuf->data_len; /* Parse the packet */ - /* parse results are after the private - sw annotation area */ - mbuf->packet_type = dpaa2_dev_rx_parse( + /* parse results for LX2 are there in FRC field of FD. + * For other DPAA2 platforms , parse results are after + * the private - sw annotation area + */ + + if (dpaa2_svr_family == SVR_LX2160A) + dpaa2_dev_rx_parse_frc(mbuf, DPAA2_GET_FD_FRC_PARSE_SUM(fd)); + else { + mbuf->packet_type = dpaa2_dev_rx_parse( (uint64_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) + DPAA2_FD_PTA_SIZE); - - dpaa2_dev_rx_offload((uint64_t)DPAA2_IOVA_TO_VADDR( + dpaa2_dev_rx_offload((uint64_t)DPAA2_IOVA_TO_VADDR( DPAA2_GET_FD_ADDR(fd)) + DPAA2_FD_PTA_SIZE, mbuf); + } mbuf->next = NULL; rte_mbuf_refcnt_set(mbuf, 1); From patchwork Fri Dec 8 05:21:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121127 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230316qgn; Thu, 7 Dec 2017 21:24:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMacZmCyMlYiFZ+oQn+n4/S5odPuHZ17SujUlwAeSlOPFmekX2g10vQSREjEDXDK4KJrSG9N X-Received: by 10.223.161.210 with SMTP id v18mr23169911wrv.170.1512710687750; Thu, 07 Dec 2017 21:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710687; cv=none; d=google.com; s=arc-20160816; b=he6h97UlOn3/ksz9nkEW8KywUDLba5p4YXkJgrtZX8EMuSHiJtCTdd9meI8nlWdkT2 1od2JaRI2XoIRfrNbmdOiIUSkwez7AJyno071rYpgfb+8hE1hEN0Jpje92S5/Y+JYJFg tPcVfIrEjZRKF3qrmk6zfu07uXPCofM/c2sxssx8x57tBlG2lOaIbbhTcn7ah53/oVRe dUAqcq2xEGRLsyufbUTTwVjowbOlRFyUZe4sFUntj9EKN5JfSVLHPb1XQL7dG7y8JxQ/ cUqtTkgZZ2aDu6NNmXC9Zh8wgrkGb6ORGkId625oFjZ6JbbGTcQrzcttZtHQ/6Q6lg0j JBFQ== 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=MGRVpepiKDIm+i9/f/VWCH5qGouwmQWH9QOBawJ4DvE=; b=ZFCoOOHEFmCc+itYfYmH4BfcWFsb48xdMAczvZ6n4QL4dYc/4M6NMzL0w/MH/J4yss DJCq2l8SKQgH2+ZBsZyNvioyV+ADRlg40Q8c7qv7ZK2gJ0ALn0DjYlJw3WeQfDgXve9D Mmts/RO5ZcGhWaAYgtH8dAlgB7Mo5Xx3yLDL7EMOggJiQVIrqye+ZlNwDEetVvknjGYR HeO0AXrWgSQw1Ii27fnicRyrisZF/mm25+kQpclYf9qblo6JKqiV9Lv1bIonuw0uL0sz DdYsOT9Wvnu2I2PZ/+kuw+QOJZN6Sm5zh8j6t08kEgRlixYYtEJdSdaOxV9QwGhWqqP1 77Kg== 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 s7si5266844wrg.463.2017.12.07.21.24.47; Thu, 07 Dec 2017 21:24:47 -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 F0DD41B1E6; Fri, 8 Dec 2017 06:22:53 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0067.outbound.protection.outlook.com [104.47.36.67]) by dpdk.org (Postfix) with ESMTP id 0BD681B1E6 for ; Fri, 8 Dec 2017 06:22:53 +0100 (CET) Received: from MWHPR03CA0031.namprd03.prod.outlook.com (10.174.173.148) by CY4PR03MB2693.namprd03.prod.outlook.com (10.173.43.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:51 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::173) by MWHPR03CA0031.outlook.office365.com (2603:10b6:301:3b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:51 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:47 +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 vB85MKGj013022; Thu, 7 Dec 2017 22:22:48 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:25 +0530 Message-ID: <1512710487-32388-13-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841678613071; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(6916009)(498600001)(316002)(77096006)(8676002)(81166006)(81156014)(356003)(5660300001)(33646002)(8656006)(53936002)(54906003)(16586007)(2351001)(2950100002)(50466002)(296002)(105606002)(6666003)(4326008)(305945005)(104016004)(47776003)(85426001)(106466001)(36756003)(76176011)(86362001)(97736004)(68736007)(51416003)(8936002)(50226002)(48376002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2693; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:uFgMXm8lPsP5SWMPmZ6b+gQAuxQNAOCurmNzhc/K0FgKs5WVBxedKmS0a3Qqv6UZdX88iaNyz+phFnQPlUmGi8kotBRSLzrKe9QSLtvw+3t0c7Vu4qH8b+fT+vsPQ/do MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44573c57-43b1-49a8-9a4f-08d53dfbb829 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 3:/TbmlNJVN7hYtvSpoFIJajPqA3/jsXDBicOJDyV+/cytuojLsprq2YLWq6jekBfCBz5TzcJNzVSQDXyxb7o5PtAIBweJUMveMuUvoH2nylKDpvk0t2thbko+yNjIBT8MtS08uj6GmV5q9tmvG+GCPBdVEmSOF8WUxhHMlwjJvewwnyVhSSDOpxIgQf1cC8sDNhxsP49h6b8Y7LBxD2AXI4KPxhOgHQP2ebO94eU0pgFXXpa0esz6DyK57ddjHffRfHA/nSE0WpBdKYJ2EbAIEQAbe+EvKcZ7RJ4QZjKcfrE+01d7pPHak2StqDAbW8/Yx7kDmTReI6hf0KhZKmjyLJ2fnvRzbG0d0alFmsCjLDE=; 25:O5RHcbqy5XApf7USnXDL4yDhawXX5DChBPQpnGxx2gEshF93abTeS+32sdlQdjUFVysB/KWG6FbeQH3u8awHe35kPdh6iP8Ifbadz9/0O2Rix+NRHYHJeq2bN9Ubp0X/3KDvFrUGutRKCincq1udDbioaejfl9GZfvX4UuJBW/I7xKPMQ9GAunr6PkX52wQrpBXkSyy/5cAxqMTMa068ESn59YZwl3e0UrPg2IW408OjslVCza6gPWIDMU5xmi4fGSFljijpDNgVCHqR2rxfSWVKUmDD8k//mYxb5rcS+HaG9Ty0BYqOgNt4WKa/uUiV7+WvfeJh/2mxBPj6J13Ydw== X-MS-TrafficTypeDiagnostic: CY4PR03MB2693: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 31:vXwRKHbwhJqDQaujxD7Wr1W1q+i39oXyEZu38NRmxlXmCz/neXD3E5TQ1yYOCwDjTBXmUH8wbXyj8KsOtBoeUUW2jhmfw/YIRFerUEr32nz3pi2TF2ZMtMQtdrRdlonnHZcGnllYFD/A2+7EPbo+t7OZ2dMjuqJoTztkB73THDFKLInswzNlR1jV21xRe7/Ha2WYdmLAsDvtuWqWPXRxfIFjVEySBFHBr2qE98TBX9Y=; 4:FXn9s9IrlGoAV1WwmHFkx9g5CyKUeR+lBhdHa/HVEM9GrkO29WTwZakvv07rlETWuKE2nhkcYIQ5iX00RKWgYweLMPqpJ9hS4hHkC9gRMjhGy73fjfVn9BFYekS355DI9zz378yCFgeSqkpp7XFjN0fTWZUj+u8wWFjcAjXW+gdaClAVtgwDfNugTMrtNlgqJLWPvjRx3oMmiEWOAV5S5ZLnjoMKYiAKY6lGwFZPS4NCaZ6HTALm9Av7hpkRd4FAYoPvVshy1Z6z7WQLdc39OQsSG1I9DJKUwfgKEAJRgsivkZeXDGHwBuwzYtz5wzPM 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)(3231022)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123559100)(20161123565025)(20161123556025)(201708071742011); SRVR:CY4PR03MB2693; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2693; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2693; 23:ieqgr4HKdK7+nOOTxjp21PctdLZNKIBWt9/blhqQD?= 10NzYO456YyZ7LdClxeVRJIEl8Kf12B9XQuEiHm4OceWC4DZuuBDL54nOaFVOKmbt60FcMKyy7Db9u6Sf+4JVP98ZEeI6k9HWs6s2hU6APXeuS3lDg9N6HU4rNSgLKBiUls4mO7qZhg1ci1urOWe6Iwce2fvGo4AvYA9EoppgXmQb969O02sajP92LlGHCYly1/MF8U18X3CYn2tTUIz0T0cw3LCzt4oPv/9YJFirayUCVNeoIozmTZpYXWi4BLDWK9yWPIUZGp/lNBZ4m8J2HLRl2D69n2VXKKCx/CyUW2fSojPcAlwTu1ke65QHrm2r/N80haxdo1ismroWKSC8CFv70ZWrHYfTnwEp0bE0BY9aVZq5UkcLAq+REwz9GZ4HFnvAe2t9kzZ0og0dB17f0lp+disEkI5eYYeKtkixKQGAxw2d9E4tYOpDsX0FUyk4o/QrmxNxCKQ+AQU/NbJSEu48Ao79bM3hB8Dw2rfyOFMJ3gKC3WMqY+9BOt8w0rrmP5hJz1gXeT35jGWQ0r44bQvcI8fnHePYpRADbIhrvnMe6zCwVob0nJaYBmCMB4W2qtgH7WyDpr7C8Je1pnpgmvIuqk73XzHHu7IluHN8Oh+7LPHrqK4mSDRv7G878LO4e6EagNWQzABmI86sVkaxMxs/fFDqpDVREX2L7oXFGWACR4yzRYx5k49p87kt35L6Gk1YMcSp8JUJZ7BSR7Y4syj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8Wn1H4eBglTvB1zT7AYY+2rabhUgOvpCUO07uKH6Cx/XZ5mYA9VQyNE9kTpPDHbBxpus826UVBwFXhVI+FyXAMLNb8B2ziOYHj7WD284oTTqeAPiEGn7r4GEyXbg4wK90WrBtRmFjWXuFEktRA6xxYnPz7WdnOAsqLXbxj4PRkUWMcLebCNf2GL8QnngtNCqx3f1gifbhwGVFM2IJpiTFEStgx27EZS7rpEsIL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:47.6741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44573c57-43b1-49a8-9a4f-08d53dfbb829 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: CY4PR03MB2693 Subject: [dpdk-dev] [PATCH 12/14] net/dpaa2: optimize Rx path packet parsing 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 Parsing the annotation has multiple if checks in the data path. These are reduced for common cases like IPv4/IPv6 and UDP/TCP packets to enhance performance of these generic cases. Signed-off-by: Nipun Gupta --- drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h | 20 +++++++++++++ drivers/net/dpaa2/dpaa2_rxtx.c | 43 ++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h b/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h index e68febf..88a9d49 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni_annot.h @@ -219,6 +219,26 @@ struct dpaa2_annot_hdr { #define L5_SOFT_PARSING_ERROR BIT_POS(1) #define L3_IPV6_ROUTE_HDR_PRESENT BIT_POS(0) +#define DPAA2_L3_IPv4 (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_IP_1_UNKNOWN_PROTOCOL | L3_IP_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6 (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_IP_1_UNKNOWN_PROTOCOL | L3_IP_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv4_TCP (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_PROTO_TCP_PRESENT | L3_PROTO_TCP_CTRL_BIT_6_TO_11_PRESENT | \ + L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv4_UDP (L3_IPV4_1_PRESENT | L3_IPV4_1_UNICAST | \ + L3_PROTO_UDP_PRESENT | L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6_TCP (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_PROTO_TCP_PRESENT | L3_PROTO_TCP_CTRL_BIT_6_TO_11_PRESENT | \ + L4_UNKNOWN_PROTOCOL) + +#define DPAA2_L3_IPv6_UDP (L3_IPV6_1_PRESENT | L3_IPV6_1_UNICAST | \ + L3_PROTO_UDP_PRESENT | L4_UNKNOWN_PROTOCOL) + /* Debug frame, otherwise supposed to be discarded */ #define DPAA2_ETH_FAS_DISC 0x80000000 /* MACSEC frame */ diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 3b58a48..5c75cfa 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -120,14 +120,13 @@ dpaa2_dev_rx_parse_frc(struct rte_mbuf *m, uint16_t frc) } static inline uint32_t __attribute__((hot)) -dpaa2_dev_rx_parse(uint64_t hw_annot_addr) +dpaa2_dev_rx_parse_slow(uint64_t hw_annot_addr) { uint32_t pkt_type = RTE_PTYPE_UNKNOWN; struct dpaa2_annot_hdr *annotation = (struct dpaa2_annot_hdr *)hw_annot_addr; PMD_RX_LOG(DEBUG, "annotation = 0x%lx ", annotation->word4); - if (BIT_ISSET_AT_POS(annotation->word3, L2_ARP_PRESENT)) { pkt_type = RTE_PTYPE_L2_ETHER_ARP; goto parse_done; @@ -183,6 +182,41 @@ dpaa2_dev_rx_parse(uint64_t hw_annot_addr) return pkt_type; } + +static inline uint32_t __attribute__((hot)) +dpaa2_dev_rx_parse(uint64_t hw_annot_addr) +{ + struct dpaa2_annot_hdr *annotation = + (struct dpaa2_annot_hdr *)hw_annot_addr; + + PMD_RX_LOG(DEBUG, "annotation = 0x%lx ", annotation->word4); + + /* Return some common types from parse processing */ + switch (annotation->word4) { + case DPAA2_L3_IPv4: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4; + case DPAA2_L3_IPv6: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6; + case DPAA2_L3_IPv4_TCP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | + RTE_PTYPE_L4_TCP; + case DPAA2_L3_IPv4_UDP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | + RTE_PTYPE_L4_UDP; + case DPAA2_L3_IPv6_TCP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | + RTE_PTYPE_L4_TCP; + case DPAA2_L3_IPv6_UDP: + return RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | + RTE_PTYPE_L4_UDP; + default: + PMD_RX_LOG(DEBUG, "Slow parse the parsing results\n"); + break; + } + + return dpaa2_dev_rx_parse_slow(hw_annot_addr); +} + static inline void __attribute__((hot)) dpaa2_dev_rx_offload(uint64_t hw_annot_addr, struct rte_mbuf *mbuf) { @@ -279,6 +313,8 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) mbuf->data_off = DPAA2_GET_FD_OFFSET(fd); mbuf->data_len = DPAA2_GET_FD_LEN(fd); mbuf->pkt_len = mbuf->data_len; + mbuf->next = NULL; + rte_mbuf_refcnt_set(mbuf, 1); /* Parse the packet */ /* parse results for LX2 are there in FRC field of FD. @@ -297,9 +333,6 @@ eth_fd_to_mbuf(const struct qbman_fd *fd) DPAA2_FD_PTA_SIZE, mbuf); } - mbuf->next = NULL; - rte_mbuf_refcnt_set(mbuf, 1); - PMD_RX_LOG(DEBUG, "to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d," "fd_off=%d fd =%lx, meta = %d bpid =%d, len=%d\n", mbuf, mbuf->buf_addr, mbuf->data_off, From patchwork Fri Dec 8 05:21:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121128 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230453qgn; Thu, 7 Dec 2017 21:25:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMY8pre2pnyx0PEJM52B323bE5lCirZ+kp0JJ7uyPcgGiKYJx6Y/dGxBz1h5yCVzvAX3Jkrj X-Received: by 10.28.59.133 with SMTP id i127mr2774804wma.30.1512710700333; Thu, 07 Dec 2017 21:25:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710700; cv=none; d=google.com; s=arc-20160816; b=rOrU91+SpMA2mI4aKRa6bAKtPr4ps2LORrxqA3yyDhjRblqSZ0f+ECMJ66gZMzrsG1 s7bDDHQAsBVRjyj34KrtHA+SHc5CohB/FFA/fDZ9fbt04wMT+D5iq6dVXY+eqXj8f5wV XxvVK7Rin+5j2beBuqF+0HU3A+EEwpnVre1s3vZ6lfXhMdZQoj/XHCGzVTKgiOIszPcL 2Ouwy8mYrWU8kcHMThNag2eTvTvPX4jG4dtYyzfU6Af971LnP1d+iOv0PQBmnzpJHbsn Jh38A1ug9x3zReui76DeaG1JK8bmNDmcpM6HThveNhM4GN9XTs72oLCKmtn8AS955scz fXJA== 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=j5LZzGfUwPHtf4p0sB+pJC2j6h00evXdfEjgWnoiYtQ=; b=uRjtN3lXGFSZM0J3vrGNpyar1611o3vA5kHnluDdGvTf/1+FFfJwvrI9nb4AgkDsFA jtn31CE0XOVGNjBrNDiJH1kOp0+cM/UkA48LIeuDqV37tgYzsZEcB+ub7gMVLUyRtMhu JdbyvFEnSEknCOE7q5A5r4dXIr54K14iPIW/HSOwDjhu8DVKBASpykVfLbvEiYLVaV+U d8bMpr+LSBL6iVCbSKGIY2l6m0uXdsbsHP8i+bFo4DGj8RWYbovEzzqvAZYhpyIPFkir Dr3HXHE5DlSD6smUI5tNV2v+wGKycHJnOmRnv1b+SDebe7KKB66J71Mv6N/Ab7r5csoa 0S9A== 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 e21si5301537wra.51.2017.12.07.21.25.00; Thu, 07 Dec 2017 21:25:00 -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 0E1A01B03F; Fri, 8 Dec 2017 06:22:56 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0059.outbound.protection.outlook.com [104.47.36.59]) by dpdk.org (Postfix) with ESMTP id 3465C1B03F for ; Fri, 8 Dec 2017 06:22:55 +0100 (CET) Received: from MWHPR03CA0043.namprd03.prod.outlook.com (10.174.173.160) by MWHPR03MB2704.namprd03.prod.outlook.com (10.168.207.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:54 +0000 Received: from BY2FFO11FD021.protection.gbl (2a01:111:f400:7c0c::193) by MWHPR03CA0043.outlook.office365.com (2603:10b6:301:3b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:54 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD021.mail.protection.outlook.com (10.1.15.210) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:51 +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 vB85MKGk013022; Thu, 7 Dec 2017 22:22:51 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:26 +0530 Message-ID: <1512710487-32388-14-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841714824542; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(376002)(346002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(48376002)(47776003)(8656006)(498600001)(36756003)(2906002)(86362001)(97736004)(51416003)(76176011)(33646002)(50466002)(68736007)(8676002)(2351001)(81156014)(81166006)(305945005)(106466001)(105606002)(356003)(8936002)(296002)(316002)(104016004)(5660300001)(50226002)(4326008)(77096006)(6666003)(2950100002)(54906003)(85426001)(6916009)(16586007)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2704; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD021; 1:4WHOw/Nn7k1B3fMYr2X8fZA3vr7gYxGXtOGT+UwtmBUK4iZoUlxRvzJRRSBSw57AaLIrKe2Rlu7trNJVdAAeQH1IbqYBylx0BTVlrMD8zdHTBX5QJk6WB1xblUqYwl1R MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ca5c67f-ec86-4851-255e-08d53dfbba52 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2704; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 3:tKZIJur6WMrWQ9x+hpKK1QUq1UoFQcGTcohBf32P85D8MTA3XYMZxADhBSbUPHRHfxwWkZMR6nUtW2q/bWqUBptMcBRoZibGU3cWMsD5deutdaZ5SFPZnY7rJhQx8Xbe8zn5J6tca4y+MrwlhQg8dB1nRegsBrG3xvyGh5bWFWLirKpulaybwrYl15A9w2tDFps04INyrlAp5HvXmGf8Xe8h1XkHHbbqVUaBY4H8IyDk48W+3ru55YAETo7UPMcEDZRR7TnyBep7QCHPtBxGT/sr+3g6ZMBAL/gOLuO1OOfe7Ef0IvMDEr670EHvs4DlkOvuRFjW4AcxiJQmm565zLVnP+XtlJBFYpytsWZyRhM=; 25:asqR7lxatikHgHPXNFUaPbE8XOtbbM/F1qpIH+XSEPWycChkYT0LV/t9bRJsZ8ay/Y6Q8rJ8DHjQIAN2AYlqCnICofOepx1PUx1VYMuIogoGYEbnu2O7LQL3zcLBRr30v2IKe0qck/OdzYAAypmBWbPHncLwQMUZBxPfXCsXgXbQiDDNQfKHHMx7dzEkc2uA5ASRj2VVK416eQ9auELuQfwQkujsNywC47dmjWYagFZ9vS78l0TAHZCD9m4ru/wXB88RAV47EaDJvj/njAmntFa0RW3GVemOSBPpQkPeYAudMSETIcaKvxV4b/e1iHRDK4JAX/WAQGoNdHyRWqJnlA== X-MS-TrafficTypeDiagnostic: MWHPR03MB2704: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 31:LXNauSlESzu0+Shwda0Ld4IMfkc7cJgqYUiKQIAWh56+aIogzzUOMD41Gmdo5NWQfcyy3SvKOhGYBuYs6ZqzlBzlUJUl76tV5GJHp9EAtC6PRD3oEELH/6AWVJGbOWkSXvcp19uzGsxQ91HaoJARMHrmzLXi7uSvdlzmZdQpdUbAHa+D19B1mK6L0vJmLNa1ttccZYak2baBtlBaMH92urlmhne1Mrwmx26Sjs8B/2o=; 4:wxJUV37ndvqYqXREpOSKd5L4HoA8COLInLkEsM/ZfvOjInKQUHKUWCJGKErQbVsLJZFjfi+xb1sU1NouVwEUc2Gqf6jDO17Mkpsb98vjpgT/1lUssqO+T1lNwEslGU88XOC2hKVSa+AUk14H7/x2saF97ZTrX5Btqj83YbTqpx69yQmwuvdzm0ZGncZmPZvpsr4z07siFr4yB9O4yf5xIEP8/G6NM6Nz+BVKa6/noGlaxhCuVEz8lUU/LxHRpUaJrjBd+uNTiQnXFHKooH6NWiXgDmXXd3mBfpqOSH0v0gAPfBGeJFLIZCJnPff+7e/lwHQzjuf7KkCTvgeVxAucgXkhjtvD7zWUE96ClhyKp2I= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231022)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123561025)(20161123565025)(20161123556025)(20161123563025)(201708071742011); SRVR:MWHPR03MB2704; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2704; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2704; 23:W6lzxYYW1bb3g8G2wzIUcRcUlQeN1WLHo/kFOBj81?= tNwIkG7EAAdPIRs/M5Y4W1dJLz44BIL8gnuuNN/5J1+PeqA7OsvNDT6eEGxnVwFQyulbbozofkq9ESHzrySz4gMzFIAl1ShzKdU80PLsJrwz3JgkCKYpXPKt38Riy9ePfuNrQqgJpjNmmNRuMsxS7vVjhP0ORISRODShIOKi8QAehdbFUuszn7xs7rCV2fgLQE9BF5egFf+2WXdynU5UdhAmyUJKiSz8vjIONFuE/+XHF/RvrfsynYuvwl/QbpQyVJrP/LNGwCTkryr/3Aj7H6OQNAQIc6Gb7lV725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h1pJqrlXpt/XhyZ5Sgblv0rwmOOEVpHwqVoDc3TkHgZ3MFbuwYzFBGgZhkvBIiSEFAdozmb8wN0D5alW7ox91dZs3xjaJcQNKE7lfSrPMu1xNN4=; 5:87vsSSJh/XZuqcCHviuYKeqo72cegZN7V9Qpz3+34xonul1efJZSQt9/XgmKaYyNQ3zxvKs4b1+jG+s067S6bOJKpYlsR8tCFufOqGFRUi17gRJqM3h3cdIdjvRogUtiQcAglbQFNcDHyhNf5vdd4cthuTpIbuCgnaoQEaVWgO0=; 24:jSVbMGCeaVnFPfBOWkTv0GMLmB1aqdfNJbozGWNT6eBekhO6o/MKdDUwRjt/DRhzxxWKDUrxm8Ex5Ac66HCpFz8ZsGYUlO9pyHmb+dImoec=; 7:gMY+FgxnER/g8cOBrmjRbPxDs3ixdIdb6wzURetsaLyg6tR3e8I0BRz4QUD/PPO5lRHiZ54YuXmy+DtpAAxUNrmENtfjcPB6WG+pBDlGK+WdTAYyGiJNXPGjG9DSl5tLUruZ4w6PswSgsrBbTCwH1C6dflHOdxZjBtjCg3sT8rcU2iLdFtnwFgwo7ahcSpGBBwfcIMU8f1EX1PZn7JATwQUu+ksBBp9/4fzK4Ch1m/ibyKqjpd5TbVeN01AnIJNz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:51.2952 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ca5c67f-ec86-4851-255e-08d53dfbba52 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: MWHPR03MB2704 Subject: [dpdk-dev] [PATCH 13/14] net/dpaa2: optimize Tx path for best case 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 This patch handles the non-sg packets in more optimized way. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 ++ drivers/net/dpaa2/dpaa2_rxtx.c | 44 +++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 13 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index c29d7f3..fd9e656 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -204,6 +204,8 @@ enum qbman_fd_format { } while (0) #define DPAA2_SET_FD_LEN(fd, length) ((fd)->simple.len = length) #define DPAA2_SET_FD_BPID(fd, bpid) ((fd)->simple.bpid_offset |= bpid) +#define DPAA2_SET_ONLY_FD_BPID(fd, bpid) \ + ((fd)->simple.bpid_offset = bpid) #define DPAA2_SET_FD_IVP(fd) (((fd)->simple.bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_OFFSET(fd, offset) \ (((fd)->simple.bpid_offset |= (uint32_t)(offset) << 16)) diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 5c75cfa..e8edc67 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -50,6 +50,14 @@ #include "dpaa2_ethdev.h" #include "base/dpaa2_hw_dpni_annot.h" +#define DPAA2_MBUF_TO_CONTIG_FD(_mbuf, _fd, _bpid) do { \ + DPAA2_SET_FD_ADDR(_fd, DPAA2_MBUF_VADDR_TO_IOVA(_mbuf)); \ + DPAA2_SET_FD_LEN(_fd, _mbuf->data_len); \ + DPAA2_SET_ONLY_FD_BPID(_fd, _bpid); \ + DPAA2_SET_FD_OFFSET(_fd, _mbuf->data_off); \ + DPAA2_SET_FD_ASAL(_fd, DPAA2_ASAL_VAL); \ +} while (0) + static inline void __attribute__((hot)) dpaa2_dev_rx_parse_frc(struct rte_mbuf *m, uint16_t frc) { @@ -436,11 +444,7 @@ eth_mbuf_to_fd(struct rte_mbuf *mbuf, /*Resetting the buffer pool id and offset field*/ fd->simple.bpid_offset = 0; - DPAA2_SET_FD_ADDR(fd, DPAA2_MBUF_VADDR_TO_IOVA(mbuf)); - DPAA2_SET_FD_LEN(fd, mbuf->data_len); - DPAA2_SET_FD_BPID(fd, bpid); - DPAA2_SET_FD_OFFSET(fd, mbuf->data_off); - DPAA2_SET_FD_ASAL(fd, DPAA2_ASAL_VAL); + DPAA2_MBUF_TO_CONTIG_FD(mbuf, fd, bpid); PMD_TX_LOG(DEBUG, "mbuf =%p, mbuf->buf_addr =%p, off = %d," "fd_off=%d fd =%lx, meta = %d bpid =%d, len=%d\n", @@ -497,11 +501,7 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf, /*Resetting the buffer pool id and offset field*/ fd->simple.bpid_offset = 0; - DPAA2_SET_FD_ADDR(fd, DPAA2_MBUF_VADDR_TO_IOVA(m)); - DPAA2_SET_FD_LEN(fd, mbuf->data_len); - DPAA2_SET_FD_BPID(fd, bpid); - DPAA2_SET_FD_OFFSET(fd, mbuf->data_off); - DPAA2_SET_FD_ASAL(fd, DPAA2_ASAL_VAL); + DPAA2_MBUF_TO_CONTIG_FD(m, fd, bpid); PMD_TX_LOG(DEBUG, " mbuf %p BMAN buf addr %p", (void *)mbuf, mbuf->buf_addr); @@ -721,8 +721,26 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) fd_arr[loop].simple.frc = 0; DPAA2_RESET_FD_CTRL((&fd_arr[loop])); DPAA2_SET_FD_FLC((&fd_arr[loop]), NULL); - if (RTE_MBUF_DIRECT(*bufs)) { + if (likely(RTE_MBUF_DIRECT(*bufs))) { mp = (*bufs)->pool; + /* Check the basic scenario and set + * the FD appropriately here itself. + */ + if (likely(mp && mp->ops_index == + priv->bp_list->dpaa2_ops_index && + (*bufs)->nb_segs == 1 && + rte_mbuf_refcnt_read((*bufs)) == 1)) { + if (unlikely((*bufs)->ol_flags + & PKT_TX_VLAN_PKT)) { + ret = rte_vlan_insert(bufs); + if (ret) + goto send_n_return; + } + DPAA2_MBUF_TO_CONTIG_FD((*bufs), + &fd_arr[loop], mempool_to_bpid(mp)); + bufs++; + continue; + } } else { mi = rte_mbuf_from_indirect(*bufs); mp = mi->pool; @@ -771,9 +789,9 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } num_tx += frames_to_send; - dpaa2_q->tx_pkts += frames_to_send; nb_pkts -= frames_to_send; } + dpaa2_q->tx_pkts += num_tx; return num_tx; send_n_return: @@ -786,9 +804,9 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) &fd_arr[i], loop - i); } num_tx += loop; - dpaa2_q->tx_pkts += loop; } skip_tx: + dpaa2_q->tx_pkts += num_tx; return num_tx; } From patchwork Fri Dec 8 05:21:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121129 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp230567qgn; Thu, 7 Dec 2017 21:25:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMbAnCBP0n2bY+IDaECF6FBuVxwb70oR6zsSS6axjNkosxFl2es7/fmbgywoORwAO9vJPCSv X-Received: by 10.223.133.183 with SMTP id 52mr22975045wrt.188.1512710710559; Thu, 07 Dec 2017 21:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710710; cv=none; d=google.com; s=arc-20160816; b=GqEQt49BQCkKkqMVmDoRHXSCrztTHm/owJNv7O3UND48V6lT28AwLBLlyJuRCttD/X BNSrDk9eCkw9VJIm6NYrJEPJrHnfw+Z8WKP/d7jTei0iogm+CfICdzWQ8FlD5Hv+5744 /2hM/sDBcpsm6sKhUeXqxHvNe8G7TES9ZBfm9ePdxwha1rTAg65l+7ExsK45GGHS0igi 6p9T5nBTczcb/UqiCn81KBdXZMVDDqDJam9NMErTqcyJqgVRlXhW+nmOgWBsGwE8iC9K sJqOZcslo8gcO4TSHnHjsbVmKiEwh6PSXIM5k8EJJJshljJemq3WDugLEDiQGqgGICiZ Fj/Q== 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=3QoNCSWBtqCxXSEbdSuGtEUQP3Bie/mCzSneCzzPqic=; b=QDlaMuaM7gr7yOCdNW56+nvxh8RcPB5skXpEC2XjzZuqMHyLXKGH4IFXxnqhndLZKl rT7C84R0EpfI/VTnOPsfLVBdCSU5PzfEAhSU+QUcwH7sslSuruK8UzXfpKBSJ3utp96g 7j3VnUiSxHrHQHQyFZcvbo6Irikeh9YwyVIvAytX0+9Ax9BNrkm0o5ZQTaKKlooBUgI5 olWSRhlMc57oJbp/tNsqchZfkItWGPL/QxN3u9Bxcj7SzWXu3iznotKCW5Af6YCfkGhV VkukckbXAn0dMijAyHwoiRyshLzyW7vutP8swk4V5aiyT/ABLtQ/FxojWbaVPA/J+jYB XAwg== 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 e21si5460979wrg.110.2017.12.07.21.25.10; Thu, 07 Dec 2017 21:25:10 -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 549A31AEF0; Fri, 8 Dec 2017 06:23:00 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) by dpdk.org (Postfix) with ESMTP id 9A533199B5 for ; Fri, 8 Dec 2017 06:22:58 +0100 (CET) Received: from MWHPR03CA0015.namprd03.prod.outlook.com (10.175.133.153) by MWHSPR00MB229.namprd03.prod.outlook.com (10.175.8.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 8 Dec 2017 05:22:57 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:112) by MWHPR03CA0015.outlook.office365.com (2603:10b6:300:117::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:57 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:53 +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 vB85MKGl013022; Thu, 7 Dec 2017 22:22:53 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:27 +0530 Message-ID: <1512710487-32388-15-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841738588327; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(5660300001)(106466001)(2351001)(105606002)(81156014)(81166006)(50466002)(8676002)(48376002)(8656006)(51416003)(76176011)(498600001)(97736004)(104016004)(296002)(47776003)(16586007)(4326008)(2906002)(316002)(77096006)(68736007)(6916009)(54906003)(86362001)(85426001)(50226002)(2950100002)(53936002)(305945005)(6666003)(8936002)(33646002)(356003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHSPR00MB229; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:6/B6PTN8iCJNiD3G5V9Z1q2m7HhS1RplEoYaWza7zb4XgMU6RkoSMozAIRe/EMctHqvhi6h3Ha7h7+vQWXv95U7/hIDa8fw49dy558GMo4CMREEZJ2CwW2l2b+1WQ51c MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d02ade2-4201-43ad-5f48-08d53dfbbbba X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:MWHSPR00MB229; X-Microsoft-Exchange-Diagnostics: 1; MWHSPR00MB229; 3:tHMlZ/aWGkoCZHAIKhZknis4oWrH8q5JqeUoISHlRaC2YeCJHhgcvnrMULztG7UTDx6+2Yes0hUip616kzEv+wNzARniJ3A/7/fj3CLE768tWmG1O3IbVPkDb1ZufF7zXrzj29jRS2HnTTOgkttrLG9wy6G4he05G9ernF+0r/yG4DGRNfmkY3c0oAVCrYVxg7McgxT0JV2rA0iS7SQ8lxeTL1oJWiTUGTvM5ypgUXRVbedhEKHT5jBXPq/7mesKjBNSvF027ZSp7j7sP4zwRPt3P4KrpRaZdBx8ts0anojWt6zejSWS6LBV53WAk6AXhr8qFqXboJ30crPqsC7jmont0JjHYT5slY9K4bUE9Lw=; 25:YzAxIxvHuzYWggpUclst58SEgv04PH0KcITJI4U3mPf52nVNtNm/v9vikJi1JalZHDeKenxVzDq9v28fC5sLKlkK4KIorvc3ca6Mk6qnajoXtVdSB19jssU2YVH7NN34T3ns0JskJtLQBtx/zsc6SA6EBj5lN7oY6r8wPhXCtYRwZclh6JNmFHN1gTg8NY6qbLpd3zGewUQyJoyoH4Ha0SnG1UVUcMiEG+JOm+BdEcsh0F74K0w32SxkbQC4laiXXuu6kURwmaVeVVVRRfltW7cYlqnwdlFl8Umxopi4rJKP57RWFFdUsx6Va2GMDrdoQVVq8GPT3EwYXj13jxXfPQ== X-MS-TrafficTypeDiagnostic: MWHSPR00MB229: X-Microsoft-Exchange-Diagnostics: 1; MWHSPR00MB229; 31:7yYbxBInHNLobsGQHcV4bTqMLfs3i/oxKMR2PXruJeJ0xrXfW7xsJPyx4YhOyCfYnMKXEBZ1rxl0CUMSBZKCj2Xkjx/M+3b+2up03UEBBsK4DlPkbEqivu6AADfJeaRTqE48IuzT4ZVoLnuje3wPSqFLkYRiSjW9hMV3VeL8E080AoO6tHHi17GoPU0CQJsFZZPsGxiPxnQoNxEZeXUwC2f8N85vfTs+1nLwSb+T8jA=; 4:7iVC/VmoQOOWvGl+Qkekx+TjvqCElvPBpQhsrQqszoHRlceDcm3pT9vEUsOMGFAunvHyclSw+P4/5f+cdkUGw04LXSuKD5P2I5hs+m+E0a6JM3AP9VMYyRPWd2zZhZp2iMxiVnQv6EfWTiqa0xWVxT8XB4GydoHbjSMy0wo1mIgidxv72/bIw7Zr1XRxU9f/cAb8z9tj1NtXj1BOqH2YqcOJUTWfWo/i6Ro71W5zY7PSyWWBURgB1PtDo+20lAKilPFTHklnY/hMlBqKK6ks94W+f/8TnJd5EtVmD3JByyW9zixm8YFXFm3wfwhdgg/5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231022)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(20161123561025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123563025)(20161123559100)(201708071742011); SRVR:MWHSPR00MB229; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHSPR00MB229; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHSPR00MB229; 23:vlgxtlqEZ/WZsxGmoFjsB3iRpzCbM8DR1Di+xUMgG?= xNWwxROh033b8dS2ZzkvG05Urs451dA3EjeUtviyljsyELS/UWWdtQewsywuMuttYxWOZ/GAnec4kyjjrNa+Z3UV+M3tLvBAYGaw2RCHi3kF562H7ro6oHxz6zyM/hAX2pWkf/ROsrUFBPbmz/tIyu/XT+Pua5JBAqP7H2hA1BKmHkbo9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Dgw5H3SCCSsdYRqoYieRZdes10hDjeBIqjttvG7vSJYyRkSdQIVyVqEnQaj/bf/hzu1Tihqg7FBps4zHpFn1dKV0MV9GjQebUTGF+xHn1+uIgE3/u9Moew6FSbpfT2pe+FWk0Mdjp5F73Q4x0w5tXAdO3T+bgqm/JaN4jumIn9q+v5A6XTNEjOZX+o+1ttHtiR8d24bdmh1lYs4j/w8vpPp9xmaG74Mj34SqHQzXJrynjT8xXoVkvF+si9SLVo=; 5:WGwcPy7IOl/46x+oINETYVdxWjznty2ZiBl679I+wTIlImuGNSI6gCvanv2sixm5FM5qn9iXXmFGv7r+CLLKKEhTmqduFxo3sCYdan6vEXjpRxzwtu/4bOvgKBWYBxtERy9c3qw/9kyAriQh6U8ofPodTQFutys5yQLLBShVOW4=; 24:f9jZm2ZmzaTTlECCOdIuAp12CId8S/SaEIGCuYgvuiG92AECiblDD7hVsjbk3ie9EcHC+imxN7zbAjRNnfjWBwRN9qgc27NqgwpOk+TwyCk=; 7:KxumyqjdQIzKIn6y86cIpIF9hAhyFvTGxyAMBQUy0U6+WjsYPBlpUmOdPdm8qakU4XA5haMNOVHS81KUwZwZxr8Urm5Fw5cXLZVWf6YtRzAYAODX+Ow+QDaiCyS4RnV0LhLZtoeM1/u1qmjzWBvT+zsjKfJmxKS5V1kn+DVTKIglW+T/V4UZ5IzrqtHs/Dbe6P2cyAwfESFDCXUCAvznNfjLaaOW3UdFn5L2/PSUlC3BMJXh+RD4uMTMxuTi4xDf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:53.6716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d02ade2-4201-43ad-5f48-08d53dfbbbba 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: MWHSPR00MB229 Subject: [dpdk-dev] [PATCH 14/14] net/dpaa2: prefetch the parse results from next fd 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 As there were less number of cpu cycles in between when we access the parse results and when we prefetch them, this patch modifies the prefetch of the next parse result. Signed-off-by: Nipun Gupta --- drivers/net/dpaa2/dpaa2_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index e8edc67..9b66bd3 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -526,7 +526,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) int ret, num_rx = 0; uint8_t is_last = 0, status; struct qbman_swp *swp; - const struct qbman_fd *fd[DPAA2_DQRR_RING_SIZE]; + const struct qbman_fd *fd[DPAA2_DQRR_RING_SIZE], *next_fd; struct qbman_pull_desc pulldesc; struct queue_storage_info_t *q_storage = dpaa2_q->q_storage; struct rte_eth_dev *dev = dpaa2_q->dev; @@ -569,6 +569,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) set_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index, dq_storage); } dq_storage = q_storage->active_dqs; + rte_prefetch0((void *)((uint64_t)(dq_storage + 1))); /* Check if the previous issued command is completed. * Also seems like the SWP is shared between the Ethernet Driver * and the SEC driver. @@ -583,7 +584,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) */ while (!qbman_check_new_result(dq_storage)) ; - rte_prefetch0((void *)((uint64_t)(dq_storage + 1))); + rte_prefetch0((void *)((uint64_t)(dq_storage + 2))); /* Check whether Last Pull command is Expired and * setting Condition for Loop termination */ @@ -596,8 +597,9 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } fd[num_rx] = qbman_result_DQ_fd(dq_storage); + next_fd = qbman_result_DQ_fd(dq_storage + 1); /* Prefetch Annotation address for the parse results */ - rte_prefetch0((void *)((uint64_t)DPAA2_GET_FD_ADDR(fd[num_rx]) + rte_prefetch0((void *)((uint64_t)DPAA2_GET_FD_ADDR(next_fd) + DPAA2_FD_PTA_SIZE + 16)); if (unlikely(DPAA2_FD_GET_FORMAT(fd[num_rx]) == qbman_fd_sg))