From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0076.outbound.protection.outlook.com [104.47.32.76]) by dpdk.org (Postfix) with ESMTP id 54721F937 for ; Wed, 15 Feb 2017 20:06:50 +0100 (CET) Received: from BN6PR03CA0005.namprd03.prod.outlook.com (10.168.230.143) by BY2PR0301MB0728.namprd03.prod.outlook.com (10.160.63.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 19:06:48 +0000 Received: from BN1AFFO11FD046.protection.gbl (2a01:111:f400:7c10::178) by BN6PR03CA0005.outlook.office365.com (2603:10b6:404:23::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13 via Frontend Transport; Wed, 15 Feb 2017 19:06:48 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; dmarc=fail action=none header.from=nxp.com;caviumnetworks.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 BN1AFFO11FD046.mail.protection.outlook.com (10.58.53.61) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.904.16 via Frontend Transport; Wed, 15 Feb 2017 19:06:48 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v1FJ5fLp020023; Wed, 15 Feb 2017 12:06:44 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Thu, 16 Feb 2017 06:09:20 +0530 Message-ID: <1487205586-6785-22-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> References: <1485172803-17288-1-git-send-email-hemant.agrawal@nxp.com> <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131316592082231353; (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)(7916002)(39450400003)(39380400002)(39850400002)(39860400002)(39410400002)(39400400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(189998001)(54906002)(97736004)(86362001)(2906002)(68736007)(33646002)(5003940100001)(104016004)(81156014)(8676002)(81166006)(356003)(4326007)(8936002)(305945005)(50226002)(2351001)(36756003)(106466001)(8656002)(5660300001)(77096006)(48376002)(50466002)(6916009)(53936002)(626004)(2950100002)(6666003)(92566002)(76176999)(110136004)(50986999)(38730400002)(105606002)(47776003)(389900002)(85426001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0728; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD046; 1:k5Wd83qJy1HGoBDCkdXLChXE4aBx3Wh+roEncrZjMknx8aNcnghhGKz+BkQlmfIFhoECaYnL3ZA8X3C9H8QhuiLx27T953hJWBG6QCf4a0WSPdOYV4w1g28WIO3QMDiaUSNzVuhJGmuWwm0upC2wTDsiSub5pS7U6aL3gquISv1vOxxDUKoXo9Ul88tyZdEK4gFrIJroSUfpS9oLAU8PNp3Q/THgas4wBMUsj7ZI0in4+zTEEOvVIK+jlop43/05kE3Yxa4agtBWQQSvhsq2LgPI6s+6d7mVE63YVTvBAJpQyVbRbrHr6/cPlS1JIIaCPHLyrMLE8lLlwvfQBHEqJLIesWn7iQM+sVXPvoG2fg1EPe6uHBpOvBjTwrVCrBaX1xrOGkgHKZ59VKYyI4eF6G6HhaUMxyfyZQOETgdz8R6LjRh2dweu8Po5rzKvcSXrwtzPJ7efnhnTpF1pDbrehnWn4NGNc1xZqcH07zmfi1Ezyyhcxypb5ZZzHRB5Wrjp7B6pvGM4NA6G6mIWCzC8C0kY6cEi6fxDGxNU5qzq8lvuqRaUE0exXId196fK1vn7MEjwNycW99g+Z6knpTkta8krrvDHboGwK8Y+i7CyQc4diIQXiyRpUcIGk5udzAvmf4+pvLhM5gchBkV6WWREuQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b6b56e0f-0e4e-4183-beda-08d455d5caa1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 3:pYRUmfZT0SC4xVj8ai1qP2UzFskhJOv61G/FFp3vUxPKVW0KFjFWEAaC5ZDmyL2Jq47OkBFD2raxSzg/xvjn3PIK4D4r6E4OuM23blEPzN/0S/IzbA0BUsMznFcFacgacNklRDH31bOI8mTJHTUmcE6rncs9gmnEsUReKG/V5etfz3RczkHENLGvYgm+bhL4gJlmM0CAwqrjNobg1ICxpw2t76kLimRMCQ6UDVdixQGxgybXg2/t+u1xPAruRI55DKH6qi/XhzcsPdrbXHbqwXjhSvaNYleBbKxjLXhNKvkeAoVazH+pRBPcVLLwlTW0OjcIMXR5WiQPnR6cE4K5clWr8C7woiOLFEdqsctN0tFNE5eDg7HoS/7QAZK+MGb+; 25:zRQ3yJ9Enp0UrWHvF61fO7zUcZ9UckltAQ8lcQAd5lGcnUF4+eCrEuwZGY+iKRng6kw7+juNJePzcOZ1YguLu7ZGZ1myZxWjILQu4pIuUWcGgKh0x4GC0ws2/IpfFCnvtyAGc1fqIqBlwze5/5+YnGYTy4RFwptbb8LqqCCwKFX3SVOaVw6ivj0aC+bAxkW5dBDt1c5KsgaLtCS2wc5eHRSjQM9NVaOiTm5mtGghGuYjD+EnLzXRNCZggOhhPAXkhGilFW+fT9xsR/gxzdiLBJ2f49zpn0NFYvVRtoE/m0VsKglWO2E5vokP/b0PlF4A8JUCqYBMIvd4vxmjddR7aw1gT3rQe0+vBGafa81TgSXd03ailoVe8zvSAcewIgDy9U8LCwdxpygDGiCpn/qXJJBcLQ18VsmybGEcc2RQeBJpiT+gOXisJ3KgBPMApU8t7nCsKi71bvW72AWM52IsUw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 31:CJJGfwthmTOlSqiFMMvUGUQ1uBUm5h0jF9BcppyDw48mOe1LpRdyfYaNc7CmQWLH4Ys0TyW6VrpeQ5KGsiQIV6BZ+oNTs2M9CcwEvjd5n7nciSK4N5h5nHXHwhGy7qpbV+mlOLQMrYvTuHYU+p2fYLnwXsSZ/AMGZawRHG4J/3/4JYkGnIhNhS7iDxX68NqGmng6JxmOP+yZjAiD/6zyIA0eijju5J/A5YDXQLBgAu9CQFRrQoz1cuJtnhgebK2Y7u8XYrbjVmf6L6r2G1nfLLvqmBlou7w2wqFud9dNrCg= 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)(13018025)(13024025)(13023025)(13015025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123556025)(20161123559025)(20161123563025)(20161123561025); SRVR:BY2PR0301MB0728; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 4:OkBFJ+oYaZb2/oi98t556VQic0Yk3hY0OdjMnSOiIhHORGD0k4um+ccAQDaSp5mVFT40O/gBK+au9eDF466Me5L+6eJStJbF1xu9TGMYwY1wTn14p9T4Uli9a16uoaKFofxI2itDTQx9LijRJ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uzIaDK+atuNgOsvhqQj7sg+ktKgkZEdymql+pHjrweoMVLQ9fP5Pg3BGJVH6kFXydF8sIbH9S3cT4ULilig/4jiLhIBxvieVH/NgWNH12hMEwvHD0rwuz0TQGOoUjiqmI7r8HlMlYKxX1LL98/Xssipoue5Hj+b1T4O8frlMUXSnJE1vy+MwICpGEiK3OUwPOQBSB0OUzRzUxl9+fdu8oxdJATmPJ6pG96orRjtcJ60RNzf/pLZraVQQgyY9ETYJYSqhZStt+WeGNlkZPvSgugY5lIQ4J8ZQu9MYKBq3hTwF22vr3UtpLUiRac+pAjqSZn3mYGQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2017 19:06:48.0203 (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: BY2PR0301MB0728 Subject: [dpdk-dev] [PATCHv7 21/47] 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: Wed, 15 Feb 2017 19:06:50 -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