From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0066.outbound.protection.outlook.com [104.47.36.66]) by dpdk.org (Postfix) with ESMTP id 1A817952 for ; Tue, 21 Feb 2017 14:38:14 +0100 (CET) Received: from BN3PR03CA0100.namprd03.prod.outlook.com (10.174.66.18) by BN6PR03MB2947.namprd03.prod.outlook.com (10.175.126.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Tue, 21 Feb 2017 13:38:13 +0000 Received: from BL2FFO11FD042.protection.gbl (2a01:111:f400:7c09::141) by BN3PR03CA0100.outlook.office365.com (2603:10b6:400:4::18) 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; Tue, 21 Feb 2017 13:38:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; tuxdriver.com; dkim=none (message not signed) header.d=none;tuxdriver.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 BL2FFO11FD042.mail.protection.outlook.com (10.173.161.138) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.919.10 via Frontend Transport; Tue, 21 Feb 2017 13:38:12 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v1LDc81k004161; Tue, 21 Feb 2017 06:38:09 -0700 From: Shreyansh Jain To: CC: , Date: Tue, 21 Feb 2017 19:12:58 +0530 Message-ID: <1487684578-28656-1-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131321578925788947; (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)(39450400003)(39840400002)(39860400002)(39380400002)(39850400002)(39410400002)(39400400002)(2980300002)(1109001)(1110001)(339900001)(189002)(51914003)(199003)(36756003)(5660300001)(2906002)(50986999)(222413001)(2950100002)(33646002)(6916009)(76176999)(4326007)(104016004)(53546006)(105606002)(2351001)(81166006)(81156014)(8676002)(68736007)(153953002)(8936002)(85426001)(106466001)(48376002)(50466002)(50226002)(626004)(54906002)(6666003)(86362001)(575784001)(189998001)(92566002)(47776003)(356003)(38730400002)(110136004)(53936002)(77096006)(97736004)(5003940100001)(224903001)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2947; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD042; 1:3LPzfABThcXE17aIg3phSm/t1XON+/epohZG7qRO0aJ6fjLpU6OkNy+xQ+XqsjYuxyDpKvwFG5WMBfueJoQfQvF9QMviV9I6s2BqIK6hirENtwNv0G387vLkkf/oglAcm8tPPOULaVdhTu6h48yq66+JzgpUHCNgqjqhFDUTwJGLLSRhWONk207DVs2+ir1jFbFIhFNO1rjA2Q4i9sYXDm7enWX/Thk63DT8DKvYmZMkRLzmhMjndH+STKEiFvSU7MgDTku/2wgqmO9D6rFNB5W4xLWmYABNx1r5wk0npn6ONuUoNvq0s8eSqfjbSY1u0eXJncc7WHsgr8R9e6bIq/STQ5MKwtsJGq4V/VjFiq8HE6YFzhCj16vXDEfv3fF+P/yADTlKkx2kqPLGXO/gzX7dJtOhr84gGTrrePh/qleqBzgFzbmHbtX7t0QfUDBqepDdN0EJaFpDz4UM/l7CR6JKMNtz0DsogpuDCtiNjbcYrMyBnUNLvjSsZqnDwsB6/QlhxSb+sO0yIWPzfqEB/Fbp6xVqjSxpIIjSDbmHN+LEf8ZliNG3iEwlgKOOzVYCBP+cIb+9QLcVAntyNmxy2ySEgPRuPPjFL3MFHEgrbKaEejopkOTGWBkDBm61YjRAqzjspg2CEJwM538EV6GbJw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: bd31d9a3-aa17-4623-adb2-08d45a5ee1ab X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2947; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2947; 3:p7eHAmIK/TvPXF7UQ5Md+51RHUlTjTLbOFBt0l6eu57b2dLo0Qw12soBUUCzn4SFQW2zRKIfJFqzYZ4HV0BAgwAm6bhIhE8LW33sDeeg0W5pWoiYZyRbgdoyPay4EL67liPo0mjaJJlv8fCutef47tHf4gg7XrecGltEjV4q8RJkeR1ospd5PfANav48oMCKVDYLF0EqtOIPMnpKoDgrCsLETRHjj8vmZVlhQ/kV1qgCXkLKjEJyrukT+0jBSpSeRlJTy56Dteay/zRCW4E6KNnNW5zQ6dizKCroZ8CnRZqsPHd7BOIvzwZ1+PaxswQj8uFog/n6oUoykTMfaP3i6d3Lm5vn2UkLDtKaJKeqvvJb9YW8iYaVd1sOnJOVYaOF; 25:z4UW/aw9izhw5wnN2+ZIYWue62EIBBKtw7xq6OS5cSYwYw2Vke0uasIVsMKDQwiatsj3YuALaTL/dAtPy2fR4xPlJywf3eBVzBzsm571EDp34cvJlZ4i7jg1zIzCHC2EYP+S8NIrokJGbYZyFSPIy67oU/37wbvgDBN/fnTvya1sDfxsmxdNvjInc9h/VnrLpYUTE/qMY7t6ORt42lZX4bD9+YgdTzOpaBPtftppA3Y4KBjtGo2JRJrHv7UZXdSkki6D9IM4ySWVZb0IJa/VSsnyqvoA0j1qr0ofgcNLwGdfUYNvLTb8f7RZlc5wX3FpMT3Tidyi5dQYj/5tkrMXsWfUqoE6bv0PLs2cKZMCMfTql4KOsEU1LlIXcL50TTJAPIl7EYt5TtgLsLadwD3/cbclycpBZUa3dHDEyYBIoX0aU25I+5veI5mK9TRAWGfExUZw3A2dUDL3smFB2nrkig== X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2947; 31:tQHRtaJIBCydAMD3YJtYFc2svwwB8YLSDJIw5LcLaEakFx3Q1tbh9fREeUVV1DzpmQWyESJkMqG5BGEeRr4ouDi3EbjTjKlugTnoEe6JcbbKB0aLjlBzs5k1D6hP120ZxHD04D7zit3muG1u+gBbDWtOS+schvU5KQw26kBNCS7PO6n5nMl4hkEzCxhRmDVQvgKDSzRSoFuRjqvvipQ4Fg/u2BkUgigqZ8UezLwtgQ3hx7FEtnpcB5xZ9uyA+L3pDBCh8b9OQxLIWPocrttQ2g== 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)(5005006)(13018025)(8121501046)(13015025)(13017025)(13023025)(13024025)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(20161123559025)(20161123561025)(20161123556025); SRVR:BN6PR03MB2947; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2947; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2947; 4:/phK2E74SQYJUh/YGhLE8LkoFXqFDOZs8Mo5xo3WZSbPjaGtA3Yh8spetsTq6zRBtX6b1iNemYLVN7aocA50R58i+ff3juWzp+TV0IjQpEwwjVgImrPuvXl337qdgJSnAmeWyoYjkfcIhwBn8ZkHgcSQJcwDto/3PZPjvLZjuZImlSsx30Xabhr/4FVCtQTZB0G/8Pv0FIsmocjL+bTrnaNZ0Ul30ZTO86sFpPJ7wvy68ROgakZnmjvBqEPPIivuhPVvY+UAtQ6PcLg4fkVTTzngl4aRlxIdl9aI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EwTeoOs?= =?us-ascii?Q?gpS+xxxnA6E8GTGKNYOb1SzGUSIxunt80UwfY4EP9RDg11/rDqOHN6pQOzMR?= =?us-ascii?Q?a9vKJzNLcQTgKN7fOYrtgUO/6aAiLQWT+er8uE64bjEWgZDibKdD4s+87qkW?= =?us-ascii?Q?fOF7Oy5jQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2947; 6:PYXynMg3WyhMRztrdKU7N3iwuitdscFxv5v2Dl/8AEmBTyCXtuUlx6x/tOIM2UMiy+Rfs1EX1XY0TnD8Y8a6Q5SYLAFLweNV2ubGAQ4BRUumg+Q7vAstGgWJjZAuHu8+KUBwp3IALO33yD6lJtfqRvTWZOw/Oi7AzgkPkgjmdnLGQQrY/DFzgShlX+K0806M7XnUvs/yB1tfY6BGLvHdeGyJX+XqQ0xbYEqIz+mIMyNJrl8KvNY0tWCt8ZggUtBUWFynW5qluzoOgO+kz0haxqeJE8rU1QVcGffZDBEBMrxKTmX96uEWGVsoR8Lhqj6pvbc/ztfe5P0t6BDKta8zlJ9rCFiYYNyI6XJeKP8b0jYoXGhjsAjA7xe8QLdzbFmEQWIDbt7MpwBcXr9/t68hUfvh77xag0b4XXNbH1u3rVg=; 5:H1AdCnc5lVfhynlYS7sIVRI3UC2KFLjbGdgOKZHKE92fnEPfSMc3yiS8VVQ6e/0lTiWEK0gFkO0n7XvnstZSuODisYJWmH+B9JyVhD9Hd37TTelreYXbAPGLB8SyH333XJnRQnc+QCsBHk6ZxsyOM3rCBpqbn396V7ESAg2wfWPClupNRd5OfBf6ot+HBfEA; 24:abCoenHBE4KkKX5Gk0zTIA+391TpFjwkIaw98Evihk8pQCOcAsp+fdRaQtzSydkEuGmK1BnCc9/bONEkELWSOfRo5+rV74W2X7Dnjg38/1A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2947; 7:43cUVVEmUWAi8sq7KJx6CSMXSAXpjZm7GrZwdSEh3cwpkkFEmorw7mMAc8KKBYOJuicxS6OODRdQxYrs8bbpuTs+EL7xVS5B+nBkJJHM7d3moFRuAnIAZii2erwlJ418QRL8i2lcixhduq29Ryi4ZQkpe4Z+u44+zEe+QosGIG45g7Z/hGkClzhq5j26ehWQsU0sumtWRNjiO1UcE9DI+ZLKfMDVSS24Wu7H3xUFMkAmGhjFpRdFRu0Pg5sQowckzLFdYBE0ieDCApWlQzqhZl7LArehClODuAjmRqsQiCwQ6z36UktmANfNeuQ7fq12dYGbe+ym42OKcKT0pZ+/Ew== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 13:38:12.3916 (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: BN6PR03MB2947 Subject: [dpdk-dev] Hello Ferruh, Neil, 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, 21 Feb 2017 13:38:15 -0000 Thanks for the suggestions about rte_* renaming in DPAA2 PMD. I create a draft patch for a single symbol change. (applies over v7 of DPAA2 PMD) Can you tell me if this is the direction you were suggesting? I see two issues in this approach which are somewhat problematic for me to change all the symbols: 1) We saw a drop of over 5% when I replaced only 3 symbols (one of the most used ones, just for sampling). This also means that when more of such symbols are replaced, it would bring further drop. This was case when I used the Shared library approach. (*) I am not well versed with gcc symbol aliasing to comment for why such a drop would happen. But multiple test cycles confirm this. 2) I have to include a new header in almost all the source files for PMD/ Pool/Bus etc. This is besides the STATIC_SYMBOL macros across the code. Essentially, any internal repo patch cannot be directly transposed to DPDK repo. Increased effort for each internal-> external release Overall, I would like you to consider if this effort for changing names for exposed symbols is really useful or not. There is another approach - that of not using a drivers/common library. This again is problematic for us - NXP DPAA2 being a hardware, the lib and state for Crypto and Net hardware is tied together - so, having multiple instances of library breaks either of Crypto or Net PMD. Any other suggestions? - Shreyansh --->8--- >>From b9928ed44e69d7f9f9def0f06647a8d3bc25f284 Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Fri, 10 Feb 2017 19:18:55 +0530 Subject: [PATCH] dpaa2: fix for rte_* symbol naming This sample code: * creates nxp_compat.h containing custom version of MAP_STATIC_* and BIND_DEFAULT* Can't use the existing version because they are based on appending a string (_v[0-9]), not prepending as required in this case * creates nxp_shared_symbol.h for appending rte_* to symbols * declares functions * changes map file Hereafter: * for every newly introduced symbol, create NXP_*_SYMBOL mapping * put symbol in nxp_shared_symbols.h * add entry in map with rte_* prepended Signed-off-by: Shreyansh Jain --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 3 + .../common/dpaa2/qbman/include/fsl_qbman_portal.h | 1 + drivers/common/dpaa2/qbman/include/nxp_compat.h | 70 ++++++++++++++++++++++ .../dpaa2/qbman/include/nxp_shared_symbols.h | 41 +++++++++++++ drivers/common/dpaa2/qbman/qbman_portal.c | 2 + .../dpaa2/qbman/rte_common_dpaa2_qbman_version.map | 2 +- 6 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 drivers/common/dpaa2/qbman/include/nxp_compat.h create mode 100644 drivers/common/dpaa2/qbman/include/nxp_shared_symbols.h diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index c80d6c5..1c157b9 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -59,9 +59,12 @@ #include #include +#include #include "dpaa2_hw_pvt.h" #include "dpaa2_hw_dpio.h" +#include + #define NUM_HOST_CPUS RTE_MAX_LCORE struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE]; diff --git a/drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h b/drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h index 7731772..63ffdd1 100644 --- a/drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h +++ b/drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h @@ -29,6 +29,7 @@ #define _FSL_QBMAN_PORTAL_H #include +#include "nxp_compat.h" /** * DOC - QBMan portal APIs to implement the following functions: diff --git a/drivers/common/dpaa2/qbman/include/nxp_compat.h b/drivers/common/dpaa2/qbman/include/nxp_compat.h new file mode 100644 index 0000000..edbbfde --- /dev/null +++ b/drivers/common/dpaa2/qbman/include/nxp_compat.h @@ -0,0 +1,70 @@ +/*- + * BSD LICENSE + * + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. + * Copyright (C) 2016 NXP + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _NXP_COMPAT_H_ +#define _NXP_COMPAT_H_ +#include + +#ifdef RTE_BUILD_SHARED_LIB + +/* + * BIND_DEFAULT_SYMBOL + * Creates a symbol version entry instructing the linker to bind references to + * symbol to exported symbol ; it also appends the symbol version as + * per the map file. + */ +#define NXP_SHARED_SYMBOL(b, a, n) __asm__(".symver " RTE_STR(b) ", " RTE_STR(a) "@@DPDK_" RTE_STR(n)) + +/* + * MAP_STATIC_SYMBOL + * If a function has been bifurcated into multiple versions, none of which + * are defined as the exported symbol name in the map file, this macro can be + * used to alias a specific version of the symbol to its exported name. For + * example, if you have 2 versions of a function foo_v1 and foo_v2, where the + * former is mapped to foo@DPDK_1 and the latter is mapped to foo@DPDK_2 when + * building a shared library, this macro can be used to map either foo_v1 or + * foo_v2 to the symbol foo when building a static library, e.g.: + * MAP_STATIC_SYMBOL(void foo(), foo_v2); + */ +#define NXP_STATIC_SYMBOL(f, p) + +#else +/* + * No symbol versioning in use + */ +#define NXP_SHARED_SYMBOL(b, e, n) +#define NXP_STATIC_SYMBOL(f, p) f __attribute__((alias(RTE_STR(p)))) +/* + * RTE_BUILD_SHARED_LIB=n + */ +#endif + +struct qbman_swp *rte_qbman_swp_init(const struct qbman_swp_desc *d); + +#endif /* _NXP_COMPAT_H_ */ diff --git a/drivers/common/dpaa2/qbman/include/nxp_shared_symbols.h b/drivers/common/dpaa2/qbman/include/nxp_shared_symbols.h new file mode 100644 index 0000000..6faba36 --- /dev/null +++ b/drivers/common/dpaa2/qbman/include/nxp_shared_symbols.h @@ -0,0 +1,41 @@ +/*- + * BSD LICENSE + * + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. + * Copyright (C) 2016 NXP + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _NXP_SHARED_SYMBOLS_H_ +#define _NXP_SHARED_SYMBOLS_H_ + +#ifdef RTE_BUILD_SHARED_LIB + +#define qbman_swp_init rte_qbman_swp_init + +#endif + +#endif /* NXP_STATIC_SYMBOL */ + + diff --git a/drivers/common/dpaa2/qbman/qbman_portal.c b/drivers/common/dpaa2/qbman/qbman_portal.c index 11116bd..f9bad4f 100644 --- a/drivers/common/dpaa2/qbman/qbman_portal.c +++ b/drivers/common/dpaa2/qbman/qbman_portal.c @@ -178,6 +178,8 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d) portal_idx_map[p->desc.idx] = p; return p; } +NXP_SHARED_SYMBOL(qbman_swp_init, rte_qbman_swp_init, 17.02); +NXP_STATIC_SYMBOL(struct qbman_swp *rte_qbman_swp_init(const struct qbman_swp_desc *d), qbman_swp_init); void qbman_swp_finish(struct qbman_swp *p) { diff --git a/drivers/common/dpaa2/qbman/rte_common_dpaa2_qbman_version.map b/drivers/common/dpaa2/qbman/rte_common_dpaa2_qbman_version.map index f653421..1dda776 100644 --- a/drivers/common/dpaa2/qbman/rte_common_dpaa2_qbman_version.map +++ b/drivers/common/dpaa2/qbman/rte_common_dpaa2_qbman_version.map @@ -18,7 +18,7 @@ DPDK_17.02 { qbman_result_DQ_flags; qbman_result_has_new_result; qbman_swp_acquire; - qbman_swp_init; + rte_qbman_swp_init; qbman_swp_pull; qbman_swp_release; qbman_swp_send_multiple; -- 2.7.4