From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0072.outbound.protection.outlook.com [104.47.41.72]) by dpdk.org (Postfix) with ESMTP id 38A00F91B for ; Thu, 29 Dec 2016 06:15:14 +0100 (CET) Received: from BN6PR03CA0022.namprd03.prod.outlook.com (10.168.230.160) by CY1PR0301MB0746.namprd03.prod.outlook.com (10.160.159.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Thu, 29 Dec 2016 05:15:13 +0000 Received: from BL2FFO11FD016.protection.gbl (2a01:111:f400:7c09::193) by BN6PR03CA0022.outlook.office365.com (2603:10b6:404:23::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:12 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD016.mail.protection.outlook.com (10.173.160.224) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:12 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBT5DOHx010218; Wed, 28 Dec 2016 22:15:09 -0700 From: Shreyansh Jain To: CC: , , , , , Hemant Agrawal Date: Thu, 29 Dec 2016 10:46:36 +0530 Message-ID: <1482988612-6638-18-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> References: <1482180853-18823-1-git-send-email-hemant.agrawal@nxp.com> <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131274621129207101; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7916002)(39840400002)(39380400002)(39860400002)(39850400002)(39400400002)(39410400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(575784001)(110136003)(356003)(305945005)(105606002)(4326007)(626004)(85426001)(2906002)(6916009)(86362001)(69596002)(5003940100001)(92566002)(2950100002)(6666003)(81156014)(50986999)(68736007)(8936002)(50226002)(76176999)(33646002)(47776003)(5660300001)(104016004)(81166006)(8676002)(50466002)(8656002)(48376002)(36756003)(189998001)(2351001)(77096006)(106466001)(97736004)(38730400001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0746; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD016; 1:G/RDipQNjPjoQTZq44XfxzsnNciQPeuZkniCO4OmL2VbdIT7HUbc7r87hWRgsE8WIif7HMdJAHS46eG18xvkgOG+IHOd4gL0V5dh7ZmbuntQw5u+j1nlsZqfEtSTnYijBKW4Pz3BTSIVK9w/nDadc1rbIB2YoO1ZCTjZ4/vhigNL2NoF1+K3wrme1t5Is9+AEBSCCYkhyKcjtdq3D3M42iDf+F+eeTrYKCAyihW6rpF8b5157bNwVCgXgRGRC+KLp6j3ZBwfAMMkfptSKaYeEUYGYWZIVL4/V7Zqch9pbELoEDxL4ql+TLQB5LsW6zgFLX2/Hup3EjVe/BMnbJ/nT8IYYtX9hgHhsa0ia9z3yfx0Vl/EAEU/6bFzv8Jzy53JdFNKUMdVdjJHOfKfxvCbQ/KGXaT2hbvJtIwOGbZl3bC0Sc5dIdly2iG8z3P3c7wAAmeUoeYAk1sNU7gvno9dijZf5o0fnRp95d+VFmnpFF4wixd+vsrGsvI7kNt5rDAlP++xkA5r/N7X4CRP4H7js5R1JDKdpKalEyyaBSyP8Hrds/3RXQPZCxMc8LrYVR1SXJAR5FLQJ8/7qvkIshK0SUDcbbj9DLGB5ec2nUnSLLhSMPbQ1sLcHibc5GjSHlQooE9Svj93v3ew/9+OqTmtCjE99gbV6zp/TX5eFdnXEFR0CF1lBkh455v3VL+U3VxPsVg7u0GFJfyf3Ml5jr2rQLXXSJq3klmCYtMw9oba/Z7KYAl07B/FSiKo8Miq89eDUzs+Qq64nL6Iw/YL6CG5Cg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f4c6f144-9031-41f2-2235-08d42fa9aad2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0746; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 3:4DcIm3oAszaOCgyBWISCkK2JAyE52StMirOkiPAO8guYJ1BgmB47mrX4fnVX7Zhcpd0KfPKwhg72uVrZHqFc/eXLZOzsUqwvlNC0YfyNAOhDWOFakZoc96MLdXH1gXvEywUfMBlz5lFrkQWOR1hQApHGyZtFkJIhEFFQzQHoAunTatRdiFM6Puq6Vtrp0AsFXudplpBwTVMZQHIIXxg2TI/SoG+j7faHZ8ILG7+5UCISTtcy/J9AoT/p8WttfcIOyTo8BJla6uSnLbW2Xoll//Ra7b7CG84TClq48ZREkW0wffuz/presX2TvTiRkXeVMJxFotvVo1dLJ+HSrhWJBdHFLeUDHju9Iau62+HBcMA=; 25:yfgPRABxxOVVViEuak4HAxjritJEzRnR4Ofi4WS7gJt9XHuCZaYIvYHK6KR8NBLRWEu9XgR9Q2jiu/40UCJ2q0wWCHT36+9yugc/xYEpb0ljy+4u3LR/PsLh6IPBaqWExu5aZVzAGAyBlIz1xNGsOtifd5KTHbYeN3cX5M0PUo96ORTBSlRtK9BftoIdSSjJ5gYeU45r6sqSfzZ3sg3OuczXIGpyfp2RbkJn7cyuVZUo/8SigTEwWuCEq7SWVfx3Rye5KyBoFWIcbSPmF1maKjidr+d9wphBKud1GU62ZNFrIgOXdfrV2ruivOHHSaBvpDVABcW6VmLwPFGCHfPycFfdCcZ4FZrmhSJbN/JtksZl0ZKBe5B80xU0k79/xC22T/Zd2Ywxd2TfJO8vLPmvE6XEAdDaEbUmjwrlY2LuG3sP9OGbRmyz/r5OplwcvVUYogHVIDn7fEHw9xvd8HVNCA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 31:3dwySccHJee8s31Y8BIpO7vipWcU8AoCgfmtIYp6wfFEMGmLtXbLLVZnTVEY5uHNPGEp+eMMw88ZnxG538HdKg5fqR30MZwS2bauy3eabWQCVJvHYjXRq7EVeZGcSptEaGLWBlNCdNCAjHHDB/h9op1Sxv9GJq0hBavSPhhfWMAGA5d+LjY6v2j1gLFMBUCGrmgiXRmx904KX6amjLsWwTMSCmDnvIpnaeFdd1Fn3XjbY/2aCc8HxCwhKgmv52ue1CvNF3Cp+uofbCV69YfElw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13024025)(13023025)(13015025)(13017025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123565025)(20161123563025); SRVR:CY1PR0301MB0746; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0746; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 4:+0gTCGD6hpVZ3c5x/3/BbpTvMmGbXVe+It+J5zuRSk9/JhexSsI3Ff07B3pK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J7gIKDpF0L70a9ibWl/BwcZ5cchr7Lk3zInY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 7:l/zM596k8FaafotoCWjtcbaphWvEDZT0+6utq2O44OJs9KFEmpkxCPjMGCUMaza+du2r/qVx0RVCj0L3B9tJ9FnoMtMtRvV0m3IfpUO9mGI1yGgmutaoLLPag4ZVjgRmX5qwvjD0jGFJf2lWmzIyiDCLtmFBfX3HMnjEnDWbyu9HcrHpPlBqXdEfDSho5XAzsGUU6O/qMnZXEbbtjG+u46PbxMXrU8WeDx09eBWPKju0CeY438MEvuzqZGqzaIdcS4N/nH7uOMxAM6pXwXLAgvL8nHPelU4dw7PMqz7rX8ER5tWax/CXUVonpz4Ym4+yWbfQjIGLkKwp1F+3iBY+v0NkOTOBu7Eq/Uh3PEC6dciXz3YFdoqYa1F/ktPwMIIzU2Xfxb0ufGoKo22grgTI2o0/V7ECz4Dlqki///5M2ZidS4zsySDN+xw34JoFVX2bZ10AjWGJ7/zBqVTtdiQB0w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2016 05:15:12.5619 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0746 Subject: [dpdk-dev] [PATCH v3 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: Thu, 29 Dec 2016 05:15:14 -0000 From: Hemant Agrawal 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_pmd_fslmcbus_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 011bd9f..d7de0d5 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -276,6 +276,51 @@ dpaa2_affine_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 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io); /* 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_pmd_fslmcbus_version.map b/drivers/bus/fslmc/rte_pmd_fslmcbus_version.map index 76029b9..6937ad0 100644 --- a/drivers/bus/fslmc/rte_pmd_fslmcbus_version.map +++ b/drivers/bus/fslmc/rte_pmd_fslmcbus_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; -- 2.7.4