From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0074.outbound.protection.outlook.com [104.47.42.74]) by dpdk.org (Postfix) with ESMTP id 80FDE6A71 for ; Sun, 9 Apr 2017 09:48:52 +0200 (CEST) Received: from CY4PR03CA0019.namprd03.prod.outlook.com (10.168.162.29) by BY2PR03MB288.namprd03.prod.outlook.com (10.242.37.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Sun, 9 Apr 2017 07:48:51 +0000 Received: from BY2FFO11FD046.protection.gbl (2a01:111:f400:7c0c::171) by CY4PR03CA0019.outlook.office365.com (2603:10b6:903:33::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Sun, 9 Apr 2017 07:48:50 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD046.mail.protection.outlook.com (10.1.15.170) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Sun, 9 Apr 2017 07:48:50 +0000 Received: from DTS-02.ap.freescale.net (DTS-02.ap.freescale.net [10.232.132.223]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v397mBLW024015; Sun, 9 Apr 2017 00:48:47 -0700 From: Hemant Agrawal To: , CC: , , Date: Sun, 9 Apr 2017 13:20:16 +0530 Message-ID: <1491724224-6319-14-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> References: <1489754838-1455-1-git-send-email-hemant.agrawal@nxp.com> <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131361977306212569; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39860400002)(39840400002)(39410400002)(39380400002)(39850400002)(39400400002)(2980300002)(1109001)(1110001)(339900001)(3190300001)(189002)(199003)(9170700003)(2950100002)(6666003)(77096006)(48376002)(85426001)(50466002)(356003)(4326008)(36756003)(54906002)(53936002)(189998001)(2906002)(38730400002)(33646002)(8656002)(104016004)(50986999)(86362001)(76176999)(47776003)(5003940100001)(81166006)(8676002)(50226002)(8936002)(5660300001)(305945005)(106466001)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB288; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD046; 1:zb8AJ7OmPcZk92rm/8FYLDSyPUQ68GSB0nq4nNqFlxMBW+pwjaBwKtiP81u8PH4CZ4J/eXlHVCshUaJ6RCM9PQgPu+RWpmWpwW3LKPnh2ae+Ul2uONFwSIm/oZh70WbTFbAIhGSW4u1M3BQPwTHPPMajv/1a7kxgUBJ8yvfGlc4wpoQA0L3YLc/LebyGLlkPZnjagtA2EmfsQxRpwpN+Yc1o/U+3xCxe+GKCiG0ZZ2qvc1O0LQ/gW8UhkSY8em5v0QK/f+jccIbv8fybM9TGnvRpNLAKeggnDjFXa15JeljX7W6doDWdsNgSsfi7LAffFm88NIrNilF2NYLZdM9eKEgNdDUi45twI2h8/H/ZTWe/ytSz+QBWfYpJ6Z62XlvZxYOKUpJbgtGS+l+MBRcZC5v9/GDMddYINl+hHPnY5kqJw1Y6vhJ1mh7PzcBeq8XPtO9U9wjJ7zuE6z0NBqWyQvDQC08o0MWBOdpBIeRpLzfDjNkVd7XG1VmHBwq83at3QrnxzfPVBQbCdy+zsfBR91/P+MCJBrC70XVxkTEbEF4D2t4wqu3CNiyqswX8qyaTDAzE34PYh/peqpcXAhUDpORj74wuXwmOjhIDEzu3HjTgIprgwQcLaoPz4Dnf/JPCZdCxsIn+0C/FII9x+nDGs+TBtegtiKdxgNRPRVW3LGbEP3nCC/fLmDgtr7oInTPI MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 1f305e0c-da9e-4bb8-68d9-08d47f1cdccb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY2PR03MB288; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 3:c3jL7FOc42s/iPmEAyJGIxgqkVLNHLpNavt64+MCW7qhJqXyXOr+eliPIOff0k4zOcB+se4HJ3J4px1wR2AiUinMiTH5pTzI0pEsePvpeZtBZylwCluYJJZjEof/HfSMJtYVLmNYkjuTniVOlMwIhCcLkgle4F/70Rluefc9rkABI1J2h+pLw7z5lVKsfSaBF6T0RHWslixF/+nIZvEPbLDNLq1iz5eev0pCS8T5ZRr0AGdRa7jJWpCScyVUNYn1mgXaDdNB2Y1DfPnP+Ne5oE3UDLs8vOTW3wfeFqu0szY/Bv+5bkcbKKSxgAdG9LN7BQc4YYWyybHiEMZl7d6PshSz/GQWGFUz0J1emIfTEPV2xjbtd7MHCbTGgBywSXgLtZ/k7SaQetAXLwtFWNfC6k3cxZhENft0C6eYU47sZApinfspGpTd6f7Sg/ahtb/7; 25:t92bnUvC5qFLFTClL/w4AC4/OOwr3re3sbhNcZQftwdz0Fyi8Sb8+eHrVlQIwcnZm5LQppgpyg9HXnV2qckyY12+Gitu+zwubV1amET21+q/4RCr6k0XQ6owKFljYfjGVxt6aZH8IzPqzLQFQZg3+F4fYBgcVejOW4JD3AacJjqDMmRhnWbhYdM9mYxqfmwwfLDKuDVVETQPT4pip0ikKqzQirEYnmItcQHPl/la/P8fgOz3Ve7Hs1SET9jdV9PEnSoA6fFcdyM8jWEHQnCxgTHJ19t/iG4D9IVxq6DZJzcz/rvb7IVrCDEGdnsy6cFbXz3daUjJ8vMXgy4Cw4sWqNPsWQ56Kz+cL1MGC1N12KeIoY4X01iF+cqCR+elAv7YvxgfVsnLMKKBDILVcYfVle0sJjt0RRljyw/Et/FCFpekSj8Xcm1qXWx1FKhYstNhejXIuukqjXWktbkdps+QOQ== X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 31:xsvKiaPEuHWKBNL6D5jVbiwFyQ3J8bNTUOtR9j6/xTgeH5TpAN9HFUP8wZasteUzmksCBL4zqQ1Z88LS4+agmodiBbfVugeqV2+wOKCfBSMx0tAh/5jNkJw4qqDx0cDQf682tN3E2jz+TqqTRNttoFcZ+g8Pla/xzTihn5Hq+kfXo8zpRtGt7DC5PCD0TK3gmQf8ZNygkuW3XvU4VjZEe0voYlW4AM5XWjDowtrxa/uLr/IqYxMYAy24v6YDg2BITOqF+w8dw7g8Zg8sKyUo3kI2lw1PXgNlGXhHk8VYZvY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13018025)(13017025)(13024025)(13023025)(13015025)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123556025)(20161123563025)(20161123565025)(20161123561025); SRVR:BY2PR03MB288; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB288; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 4:AYTtgu7Tjs6yq6+a3VFej1HO0BxOswhmeSUmkv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TxzV4q+lzCySNR2K+4tgeqPMLIw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB288; 7:QNPo4hPcC8RMTWT+s0FJMDvmGNE1MVAhPFsoYrIcyZL1GZBvJs6b7IXrlCHVeJ6140n4vHJg82Tosg3e/NlJN/AOtUKPYwRDfSb0jobcxzdJNsjZGid1CK1juUfHw7yL7K6RlPb7suwSNA6eucaaVF72QNpW+50GTVC0ctrcDnISYMzUu8kbVKbBtQSAf9fDz7qid8D/wP0N7KcqYhAdeO0X2/Z0wyx5LGlXJ4vQyzBMjWbzKdRPeJvOf6ujoP1eYv5phffnjnMUeaZSRzSpoZvcRE2Com7CW4RpcI5z8llyUoRwo1COaUcAkRGT6/iC7rh+bs6KYETCE3lfxwjr+g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2017 07:48:50.4340 (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: BY2PR03MB288 Subject: [dpdk-dev] [PATCH v3 13/21] bus/fslmc: affine dpio 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: Sun, 09 Apr 2017 07:48:54 -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 3e1993e..0de67e8 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_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 3d5c1ad..ed445e2 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.05 { global: dpaa2_affine_qbman_swp; + dpaa2_affine_qbman_swp_sec; dpaa2_alloc_dpbp_dev; dpaa2_free_dpbp_dev; dpbp_disable; -- 2.1.4