From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0086.outbound.protection.outlook.com [104.47.40.86]) by dpdk.org (Postfix) with ESMTP id 9EB43FA61 for ; Mon, 19 Dec 2016 16:21:32 +0100 (CET) Received: from BN6PR03CA0011.namprd03.prod.outlook.com (10.168.230.149) by BN6PR03MB2465.namprd03.prod.outlook.com (10.168.223.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Mon, 19 Dec 2016 15:21:31 +0000 Received: from BL2FFO11FD024.protection.gbl (2a01:111:f400:7c09::164) by BN6PR03CA0011.outlook.office365.com (2603:10b6:404:23::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14 via Frontend Transport; Mon, 19 Dec 2016 15:21:31 +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 BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Mon, 19 Dec 2016 15:21:30 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBJFKMhg029110; Mon, 19 Dec 2016 08:21:27 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Tue, 20 Dec 2016 02:23:56 +0530 Message-ID: <1482180853-18823-18-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1482180853-18823-1-git-send-email-hemant.agrawal@nxp.com> References: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> <1482180853-18823-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131266344912097882; (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)(7916002)(336005)(39410400002)(39380400002)(39450400003)(39400400002)(39860400002)(39850400002)(39840400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(81166006)(5660300001)(5003940100001)(110136003)(104016004)(626004)(6666003)(2950100002)(6916009)(305945005)(47776003)(76176999)(50986999)(356003)(8666005)(2351001)(575784001)(86362001)(69596002)(36756003)(92566002)(2906002)(4326007)(189998001)(106466001)(50466002)(97736004)(48376002)(8676002)(8936002)(50226002)(81156014)(33646002)(105606002)(77096006)(68736007)(38730400001)(85426001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2465; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD024; 1:jmc+gWQLkulBuDlKYvvlnR3cHoPDtoUIKG3Os9svc1j9AbkPPMiSuys7BlBXGUkG9Ck2SnwvCqehU3PipXfyZP37ZPU328BVJI8HCiE+Rao3GxS380J9Qq8CAs4R+5HmCLmF5GcIrgBaBrHUzEW2qQMYfseqbZWXiGZ4lDLbCiEoKmzffBxqsf58spG4nQjhhtcNEwxUjSEUQB+HctBMa7gyTHJpZybIxeOPvJ0N/l2OlOIDJW91PHInFgIziLh7EGLKOuIyzWRx4LGAzQA2uF/Z+Ztmd9EWPdLJ//AaKbpoMcgLt/mm+9P4K+e/deOyRy6yokvWXu/I24x4Sra0lD8A3p82hvXuYMVlDy3jhzfgDQWpi/ahydj2XPYiLO4y17hsdfrXLr69iSqVk/T+49eRoqhjEFKPALjYZ3zxNps3XDSwfCxc0OHDPN3omO8EdgJ3ONXLfruRbpxa2KDY4H03TYqJMEobKwJ4w37+WfaO8q5EkIWHK3f4NBVianHl86XtlOmXHPnAua+KJlBmH9Kn6sKlM13FIm1pv8/XHxCNOJ2RU7TkJRZkAwSbyJh4A4E3SvgSMv0nDsJ46vAGFM/ETsVUAOnxq/dgtYPX6lASWDDIvK9hb3KA5QglVU+CaSrUhn5OpCQrHC2fJ+BJ+Dch2puciQU3DIEC0L6pNYr3ERRj1Vmv7L1WJ6Ry3f2lm0Wq5he3tBRWoTxQ9Yn3JONAXn0sCAMnGfSsNi6BWoQgV3bsMv1SwZ84WjmRuytHvgU2USFi58DigrKH8ZujZw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 26d4dc86-4c8e-49dd-b0fa-08d42822b5e7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2465; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 3:GxK05v6XvbeqvDWznJ5LAc+WGnuLUdmmp4y46kl3nWK4S2d3U+tD6iFaQj5n6x1clcSWIT4B/t2YYURQxzOyW9gdTYD1nv/xR6XEP4XtVq2bF5raYKB8iRZpvx1BAR1rwiSotGzg5WRyjKDit3sUurCj9paZYSpsFw8A5RIc1yKoPL+Ez9HOhYiGzW01VZA31z1V5KLwvkUn+HPMfjzu08tz1xjJ4U5LsV00SXnkX9bZ0zy9VwdSNttPm9R5bhESzarXae4YIeC257+snKjTVIJ735b+1zTsSBFqNsPYL4ymQHK1uWpK3DJ4BXIRLcu4xELQBIKVEcXsUsILNIWdjHhdSpBQ7dAy0u7K3otHDh/n5yJOW5ZhDisZAj3TyDk5; 25:CFA11Tj2/jLUYanUB2mtZiYubeRKorqno20q9Bw9qeM1srIIlgpVEpsl0kb+6qYp9Da6H39pYipHiejufe9kJ/ViQIC6gM2UJ7pyFDbpulV1GnZz13znRJaARzB5tzVscftPmdOMNzF/BaiJZuNrpTaa23IlBFORD1g1+8wR6g9GdoxrthQaZtgMB/Be1fG6jwA3kcNKqoa+pbs/qBd2UDmOXtuGxXqMcMOm65OEMA/tP1VFpDnShkHa+y7zp/n3FrJi0o4cQOWV6rKlrlofAAp4e42T1AZU4g2L50wVoxQg8480et6+CsD116wnQIvus3Yt94oP4TuIpjqDA1E0OVOg2+TwZ6AAtyI/Qo5WteMoM2lwNCU3EBi5mrPOFS2Uf6zW+LwPjSR5t2r0U0erms1d4d7BhpswTImcmUi/06tpJuQNaY77Fte54BroJnvwTEh/4KimRmAb/bvNVDbSpA== X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 31:Ym442RqwQ9DLU3B74LSTY6mIhYJavkYZ0ikDu7e9JaBYGVY1+yp1GYORVYuR0Bm97sHKQwNw2qYDWuICl2djJl60xG5i0Y36nfza3bOK8iKYCMO9XH/0nQquhHmRdlwf0eGnBDV2GMnOd6cCxkaISiVLPZIfmGm6XclrVQ6Ya53ByfvxpqsiA6uNPEG/5ENyPtIWo8zvQVyxrh/qSp20POYACgwGqIwoxQxvEFJ2o0QIN8T6Q0NLEElit65S4XQjNq1hF6UBLxGOLj+c0NuQbWZdDhmm+JGo29DikazUpi0= 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)(8121501046)(13018025)(13015025)(13024025)(5005006)(13023025)(13017025)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(20161123559025)(20161123561025)(20161123556025); SRVR:BN6PR03MB2465; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2465; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 4:/Bp33ZEtEWV7YbngtKlh39W0VUyuPatNZkg5FjC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AyAw4/ThIFFFK6jwSH9UtbeXiM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 7:ivs1dgyAU5aN+6RT8j9VuLG8jjPwI6CdaXjWcOCeanQ9aLb2rJNalKPpzv8k3s0QSxTboiFx9p8C4dDq+NlCKr/baVD2tV/yuueMkFZg6I1DlEhNcHP12MharH/ZLhFfaMMqAXVJXvNRzBkJ5K/im5KfLxbi/RbkoHKpCzU+sCcvo82dvB29zfo1OlYOm2eP21Fd09plP9OeeSHZflytRLsSzXWQz0/TcrTU65Eu1WsDsQTEdtvZakNSbh/mnD4g2eOtXH7A9RnL0e/l5JXrxThoEKfjeFHUNlDAgO0lTzXg7oaB2nOxt/rOuay18QOroHphIWVVqrq1qXQdJQsqQgO73OerJCVbpVXNDf0pel/vyY1/reU1c8npD4AEe/wWwz0XuUqEiHqH9YVn/svbINnKvv5NKlLbusoj3lXKGHmzxegSD24BFCK56VLm7NjAPlNmfAeGW2r9ne/6tRAdHA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2016 15:21:30.9757 (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: BN6PR03MB2465 Subject: [dpdk-dev] [PATCHv2 17/34] 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, 19 Dec 2016 15:21:34 -0000 Signed-off-by: Hemant Agrawal --- drivers/common/dpaa2/dpio/dpaa2_hw_dpio.c | 45 ++++++++++++++++++++++ drivers/common/dpaa2/dpio/dpaa2_hw_dpio.h | 3 ++ .../dpaa2/dpio/rte_pmd_dpaa2_dpio_version.map | 1 + 3 files changed, 49 insertions(+) diff --git a/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.c b/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.c index 011bd9f..d7de0d5 100644 --- a/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.c +++ b/drivers/common/dpaa2/dpio/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/common/dpaa2/dpio/dpaa2_hw_dpio.h b/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.h index 889c2c0..b160c0f 100644 --- a/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.h +++ b/drivers/common/dpaa2/dpio/dpaa2_hw_dpio.h @@ -56,6 +56,9 @@ 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); + /* create dpio device */ int dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, struct vfio_device_info *obj_info, diff --git a/drivers/common/dpaa2/dpio/rte_pmd_dpaa2_dpio_version.map b/drivers/common/dpaa2/dpio/rte_pmd_dpaa2_dpio_version.map index 597cdbd..9ad8f11 100644 --- a/drivers/common/dpaa2/dpio/rte_pmd_dpaa2_dpio_version.map +++ b/drivers/common/dpaa2/dpio/rte_pmd_dpaa2_dpio_version.map @@ -2,6 +2,7 @@ DPDK_17.02 { global: per_lcore__dpaa2_io; dpaa2_affine_qbman_swp; + dpaa2_affine_qbman_swp_sec; dpaa2_create_dpio_device; local: *; -- 1.9.1