From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0074.outbound.protection.outlook.com [104.47.41.74]) by dpdk.org (Postfix) with ESMTP id 1C771F94F for ; Mon, 23 Jan 2017 13:01:11 +0100 (CET) Received: from BN6PR03CA0070.namprd03.prod.outlook.com (10.173.137.32) by BY2PR0301MB0744.namprd03.prod.outlook.com (10.160.63.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Mon, 23 Jan 2017 12:01:10 +0000 Received: from BN1BFFO11FD034.protection.gbl (2a01:111:f400:7c10::1:136) by BN6PR03CA0070.outlook.office365.com (2603:10b6:404:4c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Mon, 23 Jan 2017 12:01:09 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD034.mail.protection.outlook.com (10.58.144.97) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Mon, 23 Jan 2017 12:01:08 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0NC07ef019311; Mon, 23 Jan 2017 05:01:05 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Mon, 23 Jan 2017 17:29:47 +0530 Message-ID: <1485172803-17288-18-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485172803-17288-1-git-send-email-hemant.agrawal@nxp.com> References: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> <1485172803-17288-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131296464687773744; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39380400002)(39860400002)(39850400002)(39840400002)(39450400003)(39400400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(92566002)(8656002)(50226002)(54906002)(33646002)(53936002)(189998001)(2906002)(305945005)(8936002)(76176999)(50986999)(50466002)(8676002)(81166006)(626004)(38730400001)(48376002)(81156014)(2351001)(5003940100001)(77096006)(36756003)(110136003)(85426001)(6916009)(5660300001)(105606002)(106466001)(86362001)(2950100002)(356003)(6666003)(97736004)(68736007)(4326007)(47776003)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0744; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD034; 1:MeU8K6BEHmCsa1ESnO9NBx/tXshOahYuSF87ZoglKiW7Q21sa/w2m05VX//3Gxb4i7JKPjSAXsXNis4Z/qj4ByLC38Sgdw9b73yYv+ZdA8p1YF2R0bgyLyCpmhLABUq8OpDhspaHH3LrtuXc1NbSESExuDcODTV41N3O8H5oFPdAKb8L+kAtFrjBz7evIfznHtT3PMzhW0HBNnHok8wlgD8lwy8WE0NAxtUrYIPNfYBIWOYi+fj5DCIfuGaxrbB2Q9zUYZLX1BXmFSf4UCytydhbsZUNzagyWZ2z2egtzhQCDo85mmpTnPB+1OrrE3B7sl2R1uNUVopVm2TF4D4WeqciAkjb6yZlWaS2wcsKws1XZw1qdz4Sgz0APtz5jK3f4BfEycbeNWMX7jnuFcxEw8oZZJqNVVdP+YQaMiBE2TM3iI5xWLxa4pV3ba/q5eeOazOWPs6DfyCT4J8aVMfBll5PyKWdGdxd9ee1QvT70e2D0KzoZgOnod2dSx3KfHVLciyt87LVxOVAYIy2bGzcIXk0wWELa4jtIv7zZy49WmneKyoTHsdE8nMNEJuYBHxlGHi0RKNKxww9ZwGAidZ4Y0KvlgzWps7LXpcVsvsvDndQkhfQSS3MTOyfx3K00HpZglgdp6kMFSSfWW0l2i4X98Yed/Ue4CDcjFg2ow31hCkqfnW5difqQCAJU09W61Su42lUEjSt7uR0xYwkH1ZMRvjZvSmXoQeLW4RwCwgl35+K/rJyP86BbGhZz/w05r4U MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 4427e01f-2650-4ae0-56d1-08d44387846f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0744; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0744; 3:OL3yoFT0mpWQ+DAIZjeO4tqfCeWANdaFVJrb1K9oR8V62K7loguojePwtiCsgt/9lTtNqVg3KeIivr7EIUbR1wScXlOX5234QoS3xpwDARYcuQFHNYhSsDj+rJV7SGYjdLIZmMx6FnNaWTB8MJpgPeFLhxS1XRTTC3Zc+IEeFFCmIcNP+j71CisxZqNGHt9tvVMp7MYoVc/SW+dq0TBIJBEJ1/uvnejydXNljooI73JcsVn1unDPMAAre8iKx/4TzKWOCDUgFlhyK0ncCGNobGwDxyDZeGTiVn0TUxxOablsp+AS+8UpCOgV6Tl0AvGmQB0D91lwLM+TQGRPKmxutsKn2DQu0z6OexdYg3c4itgver7nAXS/nNE8LoWTh06A X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0744; 25:A4XEVEE023Gy3cdjdGot7UK+DH5eBj3ztOjduiS062vscjh5IfcoFFDwXkoXwmO6gx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ft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BY2PR0301MB0744; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0744; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0744; 4:d5HoyR0a+KxKcP0OkZ35r2WKVsvk4LEcAczrHsVHcQeLOXFmoZYWsB4yQaHISkLcAwqxs+XMWVBRLSQ5R/B2NRJeBlbvmpCyEGsRpfZykxxxJA0Zr4UBPHgxDAfTAV5MnIwjMReI/qlPyTyooiB7PQb7BA+m2ymgluYFCV0uyCE1kWCC5aaLkXQRgTuE16ksIJbKWXBzMFSc09wifyKJ5jxua4gP3FYTzEPNhevvS9bP9SsgySsxbI1TjTgNpBmdyqEoLqZiOQ4v9ypyeQdG8SEbVeK0zUqxXT/AI82byQIvkZrOoFYSC9Ae/P5SNPSA/6i1UXAWs/ZFE8YQ7jvYcsAnzLiOg1J8S3sLpwJxHaFmB/S0+wZ/PbUd/tWH08lA8IpPLFUNX4AuLWKZNzSAHwGJ4IbB9gsBhBG4ZRhx3q0U+oTkOj8delo9e3sMlKVpbGSvbXQi1b3XBw8YnECSvT8M3F8rkyCJRQe2ND5lGk8LGC19jsPST1aCcIXmAC5nQ0Cdq5eNsRjS0OJsOCfVdlrp1/m0fW9lRHFR+LzIV6jljdie0E4wEuyeqfo34GNWrAVwv4sE6AZKkGNlRMLpdoGeTOXTaEm+8hmN/8B3hZCOY3CoPJItjWasNv/AIe5SeiCrGv+ZNryXYepWONUaqf6XPuoXLFVdA5DzhXXS8k2gJobVkk0zYe4MsWwYt986njAVzoL85VKYz4IbQObOWfm3XuUp/Sv1GQT3SBU7Y5nU6hchfwM9Ipz746Ymgf5cRChWHE7DQ0MDXHHnwvpQlw== X-Forefront-PRVS: 0196A226D1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0744; 23:34RUYk9vpLgMkqzxfcOgZxxm4aE9rvK1GKvuBZy?= =?us-ascii?Q?7BJ37kBedzQfbyPb9KoCnfMRSuun8ezzq/J/EIncckUcm8L/8WRRLnEgFniW?= =?us-ascii?Q?eJex5/RD424N88ud1MwQZ0NfKMdkzBQaEgzVMEm3f3Xw8IA5AiwT30TDhSRl?= =?us-ascii?Q?/RiUHPySEhnG7MV0LjRkneuiXkUh8WGMOJWCl0xpdTstEL4rEPSlcWtEwo5M?= =?us-ascii?Q?WviEjOMkRFKPJ7VbJcmwAvVAxJPxGU/I8VwBP2mwv28sOSa4Vuy/5d7kVVjz?= =?us-ascii?Q?oSDVjBIKUtIWWDamawVVJ5sk43J5NUmLQziQn+QM6rRazb+qvz5gJ7fSp9KT?= =?us-ascii?Q?2qC2xd4G1IommjnvQifP0cObzsyGFUVB9qBhUNrroZCz8cLRIaLfk6kgmWu+?= =?us-ascii?Q?38bPvkft+1doGhItPY1+b/klGpSPEqLbMUfc50gA+PMX6M9oV0I25zAdxSZf?= =?us-ascii?Q?OtueAHTtH5fuR32Cmln5P6IYqHT5l35A7IRZ7MVyGRwvezXD7BFoQYFbB7eq?= =?us-ascii?Q?85WvgknIoqddOcpycaBFcg8dYUz/GzndM5oTZlyEckbS5WdfwNM1Wf2qhQ4D?= =?us-ascii?Q?I1kNsTR5BJqlNjgfn25iaBuER/DqeE76fHFFaozusR3K3QkqHLb5PCHm2a3i?= =?us-ascii?Q?P+ENEMta9Egl3iIVtukZHjZ6O96dapOAx5i8o63roAX3n7Pk9ItZwfBmJT+I?= =?us-ascii?Q?vc4xI6D1kbzjYWED/TKaPnWq6WOoxlPlu6iDvqvS0H/nYgIc3dJDG/azcpIT?= =?us-ascii?Q?+xOE9mRS44T93i2Gpbda+Evh39QaPixd5nzxIjCaGR2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M6oYX+lSE+FXgHBmtyErCcRgG1zZYyOfwTQ8u8VeEuz6mT4J22kskbk0; 5:dOi+PkVdb9YIMakYY9JQxWCq3ZVwZoHsIbvg1C790Q48ewZGt6m9HNHnB5EhduiCAEi2GKUaQ5EZxXoScQ5xkipJC8Kx+kzvLJgDADdhDbrbFUM/A4HJLc631f76Lmfh8J5i1+gFBkKsmeKzkYdw1nYvk04z03m5vdfmqDxvx5WVylm0I1VLx0PUoUD22E41; 24:dRUNDnl8kAeBkv2Ld3iUqZXv/dIkSaEtWiEJ7JNiOdqe4fYal5jurqLCcyVo+mAJGT+t012ad3dp8RRF10TnLuRvZ4xu3BSfS8bj9Qb8ztI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0744; 7:gUAIeR8t5mYf51+BP3ScVa81kDpDLaL8xtv0Gx7QC17DUFGBbmPU8996azoeVzB81zu+AOOq73jKoahGgG2gP9wEzHEnM4hieSXX1tOhJQcafcDu6KYPh4x+y0cJ90MbZHwCk0lHMBcAfmjUkuMalwTEuBBgFM6n0iEdU/uIvlf+BWvW2Ky2aduUAf2qCkjhVwRerw6T5NE2IenJG9abSCV/dIf/99r3RN2EIxTp0g7Xg5WxmBnrfSZzls/cb3PM9+kAgVwU4blJnNRf3J5Tr9ItzE0y5lKnkq7qS5cdNIiGavpPoPL9yv1Lh+EScwx/89A3F0BE1CGpuP0rBUjUr+w31RSX9LGhDKFhrbwKLM4BXC9dkBEmA/5VTVruanoEpEMt6sBWkdui1ChcJHwlotzpaUw2AGJTxrNaakIBqRjKLHJMnhgQRhd+yFFLltlzIHDZaTEJ59ObOwF718+ahg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2017 12:01:08.5745 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0744 Subject: [dpdk-dev] [PATCHv6 17/33] drivers/common/dpaa2: dpio routine to affine to crypto threads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 12:01:11 -0000 Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 45 +++++++++++++++++++++++++++++ drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 3 ++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + 3 files changed, 49 insertions(+) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index dd6de4c..bd1f643 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -276,6 +276,51 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) } int +dpaa2_affine_qbman_swp_sec(void) +{ + unsigned int lcore_id = rte_lcore_id(); + uint64_t tid = syscall(SYS_gettid); + + if (lcore_id == LCORE_ID_ANY) + lcore_id = rte_get_master_lcore(); + /* if the core id is not supported */ + else if (lcore_id >= RTE_MAX_LCORE) + return -1; + + if (dpaa2_io_portal[lcore_id].sec_dpio_dev) { + PMD_DRV_LOG(INFO, "DPAA Portal=0x%x (%d) is being shared" + " between thread %lu and current %lu", + dpaa2_io_portal[lcore_id].sec_dpio_dev, + dpaa2_io_portal[lcore_id].sec_dpio_dev->index, + dpaa2_io_portal[lcore_id].sec_tid, + tid); + RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev + = dpaa2_io_portal[lcore_id].sec_dpio_dev; + rte_atomic16_inc(&dpaa2_io_portal + [lcore_id].sec_dpio_dev->ref_count); + dpaa2_io_portal[lcore_id].sec_tid = tid; + + PMD_DRV_LOG(DEBUG, "Old Portal=0x%x (%d) affined thread - %lu", + dpaa2_io_portal[lcore_id].sec_dpio_dev, + dpaa2_io_portal[lcore_id].sec_dpio_dev->index, + tid); + return 0; + } + + /* Populate the dpaa2_io_portal structure */ + dpaa2_io_portal[lcore_id].sec_dpio_dev = dpaa2_get_qbman_swp(); + + if (dpaa2_io_portal[lcore_id].sec_dpio_dev) { + RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev + = dpaa2_io_portal[lcore_id].sec_dpio_dev; + dpaa2_io_portal[lcore_id].sec_tid = tid; + return 0; + } else { + return -1; + } +} + +int dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, struct vfio_device_info *obj_info, int object_id) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index 682f3fa..b1a1b8f 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -56,5 +56,8 @@ struct dpaa2_io_portal_t { /* Affine a DPIO portal to current processing thread */ int dpaa2_affine_qbman_swp(void); +/* Affine additional DPIO portal to current crypto processing thread */ +int dpaa2_affine_qbman_swp_sec(void); + #endif /* _DPAA2_HW_DPIO_H_ */ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 028f55e..4a8f478 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -2,6 +2,7 @@ DPDK_17.02 { global: dpaa2_affine_qbman_swp; + dpaa2_affine_qbman_swp_sec; dpaa2_alloc_dpbp_dev; dpaa2_free_dpbp_dev; dpbp_disable; -- 1.9.1