From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0069.outbound.protection.outlook.com [104.47.41.69]) by dpdk.org (Postfix) with ESMTP id BFAE0F96B for ; Tue, 17 Jan 2017 14:20:12 +0100 (CET) Received: from BN3PR03CA0112.namprd03.prod.outlook.com (10.174.66.30) by MWHPR03MB2477.namprd03.prod.outlook.com (10.169.200.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Tue, 17 Jan 2017 13:20:11 +0000 Received: from BN1BFFO11FD029.protection.gbl (2a01:111:f400:7c10::1:132) by BN3PR03CA0112.outlook.office365.com (2603:10b6:400:4::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Tue, 17 Jan 2017 13:20:11 +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 BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 13:20:09 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0HDJ8mO021741; Tue, 17 Jan 2017 06:20:07 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Wed, 18 Jan 2017 00:22:38 +0530 Message-ID: <1484679174-4174-18-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> References: <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131291328098637645; (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)(39840400002)(39410400002)(39850400002)(39450400003)(39400400002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(104016004)(36756003)(85426001)(81156014)(106466001)(92566002)(4326007)(626004)(47776003)(68736007)(2906002)(50466002)(6666003)(50226002)(6916009)(2950100002)(33646002)(2351001)(110136003)(48376002)(97736004)(105606002)(8936002)(8676002)(81166006)(50986999)(77096006)(38730400001)(76176999)(305945005)(356003)(5660300001)(575784001)(189998001)(8656002)(86362001)(30001)(54906002)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2477; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD029; 1:8fIaUp7UqXa0crFrT0p1L8HczTlo//49Az8D/Huk+brF7Rk3qhiDi9mCOUWT2/TaMtceaZZ41OJJTevhIVZVTh8EmZI9qQVnw02q6D3lOBmXoA5CRputBWoXoTNWmqkKekXtVSu3doKv5hPu+hs8EXd3XMrNnCA6N7i8IWHSnx6BysjQ6xYb5Ke6wlph+Ge5a+173W/BjpES9kJkV58KHpLLe0QCnkepn+5QZFGPX2zPA88/iPODpVyAgI8TFKT4r7eNBbbfD1kPUpkQyhsfcX1ReJDlkdhpsYREfaU+wpS9PqK2c/d6UalGcy1Pigv3cewlQEgVEkHFqJaoEcE7DYkKaFIC3JmQt1fG5Zp97idYsT4tgoXv4il4zsRDGCa0gb02qX+MLu0DaLvhZ3AnZ2ho76ii/C4MuVB/vAnM7/wo1VLvnow9riXPKpNLpyt0KPajzeN+3YP3owTrOmsmN2KtxjC84DHU+YZ0icSKbx7pDyCipCqQkqxnxT2CfuOqxmYGRN9yryxfEqWHgfnnGS/3VbvhqTZh8sNWE4pOVJz3W05sV/FtF4g+Qgr00KFAHIq2BpP+ag8JnKQ0H0Y9+A6EcBK2BttMWMBcJPFzIWFMNU5Mc6dnjTL3u1pu2hgdeZg8L+MIzf/P6UJlqK/L8FpU4uvwVNVEVBieZao2gcAqUutUji8Q9kgxJyNqbA3XcTFIp14eiC1y3DI7WYJUWkDCOoXCBgybedlOCvcv3A+A/XgfKmwdlB72RBdeWQLT MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a562d676-32ec-45c5-35f3-08d43edb8fdd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 3:3+h+CHPesoPh4YaVOrnOUZsrf/4kGYuh+YgZWwbGsjCBfLA/VgQuNymv4/gnzHV4UuhOWlkijzZvdVNDA7OdKe4mqCxSPi70ytAKXtX2yt+VDmWuNB4cpetK1O3VaeY5NFZX8oI8X70INdzkJRGGNKdDQ9MEDBMFxcJ/Q3jiVyHuPYBYm0ssbIb6pw5kJre9DEWvB7ikHR8ellfouaf4Dah1/fxQW7IJnPHHvNfnNS5aUci7HiRW5HS2baUtDOVP2f6gq1KOKcYV+vWMMJpMbOAr7HN9a+wvgSvf5tMnwDmryu8cBUDqR9oQBoW9PWX73V41m3tK3oqBfGFgmkySLBeyRfDFgi3YoFqZlNVGMtM8YTDtgyezTJ8InI9de6Oo; 25:QvmS1arAPYE8FzcKnFlWnq8v7GlYh9SbKs2HYPtLVZLaEcKJDG5PsmV08nKMl8yR1Iba/rB+aHPcB8vKpiA46mYL86A7w5acYqTLFbaYHYNJdeOXIArsguUxAXE7+6/CGCLJCsQ2oVDADeiFtdHlt3MKZpxu97TCwMMx0iY3Z2gnzOHyWmRTA0D0P2HRST3Pw8/c9gzHtZz4ZDbl3A7I4qNF4FjCxYbx2Wh/eH5s6ywfPE21azvmBpZQY7ucW/ISFAMdxIbHMWTUAjYJ1LmdA+TFxHwEhdpSzFYXbcStwHhLfx//XkFV1q+IUR8klGI+R2Tfwte3C73e4TpI2FW3QtsimS7IJATNKBAo4UKsQlLCzO32+lmclwkNbR3W7wc2ZU3Snuy95LEVCAiFu5OTjx8UQr8rq79iEdlXgEDmyzKWGzoRTbDAHIujhkXpljXRwRqZ2rahdok3aqoU+cJCtQ== X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 31:5DD1CBzreja6LT7CIwA+/FQ5habFGjQVFd4jP3bqfgKv71D5pb4PDKxgzRxTOXh2/C5AhPmRJMRtHiRaAU72X8XzN3tsX8QMIm0cT7ERNl+/nKWS/oP32QmamXYO4RiZb+kBhVdiSHv6le4szYaVMAT/lhZ4V9tnhIjXdRjQDjk0Kj9UbsfiANgm83mRjKnYMUQL0aPq5tBQoaSvDzoomPoXPZorcFl4kA33LkwnjQYEUjoPywWpP3a7L7+NRQwQVj+EUHAwZquMbv4v/TQnatx8+ZCb3k6gOE/ZbGvdRxc= 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)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:MWHPR03MB2477; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 4:it8rJHgF67JF6l0lUQcw1b4rqhvIWSB9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nfTLDPDIcNUTXkn5ZxVtXGs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 7:hulFbffeIJnT29vwNesqG38mJ1ti+PkjTNLPrSGRJrR6Ba6/9u2Q7MBMlZbsXNeh1F8kWu44z7QHtuNm9JlMA4TzrjLnhkuhvQIWuv+9KqP5QXsi1S/vqyUjnefjSnhg7jSm175u482it35niK6dz79qCWXlC/aWIhRmdQ0AkhPwPJ1d6HcO1OsKeu5fXf8sJmODcpmIpRfBcoTHsEnbf0M3qQNJ00tSX4MNB++DolV0Cw/FuY0Sr1N6p7ytA9couuuE2nrLodn66JbdFPhqTKgOsLAf38B/IrqBIubCLxIax5Ggw1unNNAOEbkNINxNYX04HCrLyuueerHZ1IThinTUuC9VWq2k38188a5B/VfqkYSlg+8pHCqSPIH8gX2/bW05SqMxV23K1ZFNn6PcWkrO9JCaB8KrbrpniO5MYAkHpmc+XsyYGbOBNuacbOUsHMCQb4QuQNPF/rRGHQ26xA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 13:20:09.6609 (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: MWHPR03MB2477 Subject: [dpdk-dev] [PATCHv4 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: Tue, 17 Jan 2017 13:20:13 -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_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 @@ 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_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; -- 1.9.1