From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03hn0232.outbound.protection.outlook.com [104.47.40.232]) by dpdk.org (Postfix) with ESMTP id 5F40B5F5F for ; Mon, 19 Mar 2018 10:28:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AGWadJlJE1jH/+Xqrh62wGEaiuEM+WlDMZvUI01jqgI=; b=Bbi6YfsA38bDrCUeMDmtymRAyKqDl8KAp9JfatxNI94jynpt/YXDTeqSbe2+fH6SxB2R+YkuUAlNvHAJSOQYduaN3JPE4jgfzYu6SjebFvkpdz3XL0+ZNjwxfQlGW4/ezioZsxm5/Mdv497pEEMBiWlf2EADsJe6kTaWXBT+kc4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by CY4PR07MB3461.namprd07.prod.outlook.com (2603:10b6:910:75::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Mon, 19 Mar 2018 09:28:09 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, lironh@marvell.com, bruce.richardson@intel.com, fiona.trahe@intel.com, shreyansh.jain@nxp.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 19 Mar 2018 14:57:26 +0530 Message-Id: <20180319092726.10153-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319092726.10153-1-pbhagavatula@caviumnetworks.com> References: <20180319092726.10153-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0013.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::23) To CY4PR07MB3461.namprd07.prod.outlook.com (2603:10b6:910:75::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4ccb5d7a-231e-4650-4c73-08d58d7bbc87 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:CY4PR07MB3461; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 3:hTui8t1QWSqf9je2IEOaKVYUDkggLND94R5K4JgEkSMzqmOLWEcHthhrMSEOuJG3MKrm4neqlV5ZAqrHonos62joZiB8wFF3CIx9WK05DJzBozS/UeY1utn+VrHYK8VKvPzyPi8G+pEGHW69dLJ6af8e9VpxA37l7kuWfBMwW545MBMSY2Pczmuy66aWByWG2J0SuO3Yr1Flihhpt+X/sViyM7dK/nbcPqo2UPRpoE7SmjAwKDJ82xDrJ8jim5vz; 25:suiyI4Uuhs4vAm7Pd/zO/oOy1wwErhC4fKwchMQDhKFov8RBX3dQ9deTvgV/eVEHvnfOP6l4R/rz4TtsicbWy3MCc2az6iZZc22tYqTmZwy2mubp4Q3WzYcBP/0vDaQ+n8fmnv1QQrNaXZ5oOY80pOtz7/jc3IIe7exMlP4o5+HGLwv0Xp5DM+FkFgtyPoWZpCnEcNeOKMFsJQrfHpyrJRGIpTb7o937o1uitUOgQbWIleRjJXhfG8a49CVdgsg5nyF90OZAU3DoXbltTuDzfmpJD2Ruxxlr1K0xMB0p9EBZLFuUinKNAQaMRTbOuE/QBD8Vo3tc6c29xgCi4qbCCw==; 31:B3rk1nm2UtJOPM92SXnLh/6aQ1CmF2I7EGwK/1qFdDjz4GLZfo29MVwTN17SBG+yAGiBq69fCoZuH9e+oqBuNN0/W4E1MBoHiM1t222+siT3pGusNnwGiG9XR18F00yXLvTMLhTLAgsVyuK/qRa3yqp1qZALZjkI405fc3R0g+6Dwou/LCdPsGhSYx7W6DofJ5qCDepYk6ED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-Antispam-Report-Test: UriScan:(66839620246622); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(2232076)(944501244)(52105095)(3002001)(93006095)(10201501046)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR07MB3461; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB3461; X-Forefront-PRVS: 06167FAD59 X-Forefront-Antispam-Report: SFV:SPM; SFS:(10009020)(6069001)(376002)(39850400004)(396003)(39380400002)(346002)(366004)(199004)(189003)(53936002)(6512007)(105586002)(50466002)(6486002)(48376002)(575784001)(106356001)(305945005)(7736002)(5660300001)(2906002)(316002)(5009440100003)(36756003)(51416003)(52116002)(6116002)(3846002)(76176011)(66066001)(1076002)(59450400001)(68736007)(16586007)(478600001)(2950100002)(72206003)(8656006)(6666003)(97736004)(42882007)(107886003)(25786009)(6506007)(4326008)(47776003)(1857600001)(16526019)(8936002)(26005)(50226002)(81156014)(81166006)(8676002)(386003)(59010400001); DIR:OUT; SFP:1501; SCL:5; SRVR:CY4PR07MB3461; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3461; 23:vBadL1j6cFrjZVCV0T1WkhLCHjpgIh40hJlt9RJl/?= =?us-ascii?Q?Yv2u0bbWkCPV8he/Ea7mO0yybbtGCw2EP5CzgnMg6xuS0EvE1c/RCKlO9i/a?= =?us-ascii?Q?21CyRaZUKTCJsCXdRFHXy1nlIwj8rl5OiSTZeAc//f9dFZ6i+4fyirUEAAk9?= =?us-ascii?Q?hj6L6Z+y1BLYDGJ8mmbh6SgVXv23oNdMDMh7Trqpwn+dTKIlHx4vpTWjcQc+?= =?us-ascii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I1WLUJdbMHoRpvmJBJRrf8QICeBK7YUm44a7vZIYCJj+E3aDR1r7/Hqrow24WUIuee/EWosiy2LGdJXqadR/qm+JpNk2s3FhblkQxnJfj45az474cT/ngWGF9gz28Z+IhXqn8C8E6pIgKC1KzN1ach//M0zg6dwGupfIH72cCSwmmRlWB8eH8bYqExOxdhA9QAf2k1bdA1g1BS7/DBe/+NVSHZx0RN4Bb4Sw==; 5:EQCwEafjAlYVay4bcsA1mqfOTCqw+h1Xs0AiOPwCbcQcGZXcatOIZIXgXYSdXX65nteuqajanPZrfUFiAmu0/TawEBCy3MMuqZUQOkQZfC5X0na+MjHP+65nGINL5xaieeQlcRsHuNFq8GlYRnZ9HXZOAvRPDBHdFSrfk1rSBVs=; 24:3rjiDKZEKf7wdQCEqi0MThLF9Ztfg9fVFB5AH1xHUMJVzq8D5udyrllwYYR+DlGGUjyhlyEFSt3AJ+ofYP1CMw==; 7:HnjGLbUCljeM4l8YcuFDosJTbi4F1NYR4dpV7GtpgIaHlAp0Vd2sXiO14p9A8HDZsfPkH3+ksq9vbjBHUepA8oELOIvcq7W0VDm7kvftRKpdpaWtuuDdoFjTaDR/n1kfOl17IhThrlrF0uJxK19ib+qsxSebskAkfZQRUKHtaNAuF38vO8jwpEfvADIPp/N3OkSvQja22+PXiJNJquYPnmfILV39dzMamjFz3ChYYLhAeWzwaqy/Wiu6S20R3a6U SpamDiagnosticOutput: 1:22 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2018 09:28:09.4863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ccb5d7a-231e-4650-4c73-08d58d7bbc87 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3461 Subject: [dpdk-dev] [PATCH 2/2] octeontx: move mbox to common folder 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 Mar 2018 09:28:15 -0000 Move commonly used functions across mempool, event and net devices to a common folder in drivers. Signed-off-by: Pavan Nikhilesh --- drivers/common/Makefile | 4 ++++ drivers/common/meson.build | 1 + drivers/common/octeontx/Makefile | 25 ++++++++++++++++++++++ drivers/common/octeontx/meson.build | 8 +++++++ .../{mempool => common}/octeontx/octeontx_mbox.c | 12 ++++++++++- .../{mempool => common}/octeontx/octeontx_mbox.h | 11 ++++++++++ .../{mempool => common}/octeontx/octeontx_ssovf.c | 1 - .../octeontx/rte_octeontx_common_version.map | 7 ++++++ drivers/event/octeontx/Makefile | 3 ++- drivers/event/octeontx/meson.build | 2 +- drivers/mempool/octeontx/Makefile | 5 ++--- drivers/mempool/octeontx/meson.build | 6 ++---- drivers/mempool/octeontx/octeontx_fpavf.c | 4 ---- drivers/mempool/octeontx/octeontx_pool_logs.h | 9 -------- .../octeontx/rte_mempool_octeontx_version.map | 6 ------ drivers/net/octeontx/Makefile | 3 ++- mk/rte.app.mk | 5 +++++ 17 files changed, 81 insertions(+), 31 deletions(-) create mode 100644 drivers/common/octeontx/Makefile create mode 100644 drivers/common/octeontx/meson.build rename drivers/{mempool => common}/octeontx/octeontx_mbox.c (95%) rename drivers/{mempool => common}/octeontx/octeontx_mbox.h (72%) rename drivers/{mempool => common}/octeontx/octeontx_ssovf.c (99%) create mode 100644 drivers/common/octeontx/rte_octeontx_common_version.map diff --git a/drivers/common/Makefile b/drivers/common/Makefile index 192066307..0fd223761 100644 --- a/drivers/common/Makefile +++ b/drivers/common/Makefile @@ -4,4 +4,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL),yy) +DIRS-y += octeontx +endif + include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/common/meson.build b/drivers/common/meson.build index 20d4a30ba..558fe7186 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -1,6 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium, Inc +drivers = ['octeontx'] std_deps = ['bus_pci'] config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON' driver_name_fmt = 'rte_@0@_common' diff --git a/drivers/common/octeontx/Makefile b/drivers/common/octeontx/Makefile new file mode 100644 index 000000000..1fe0ca35c --- /dev/null +++ b/drivers/common/octeontx/Makefile @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Cavium, Inc +# + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_octeontx_common.a + +CFLAGS += $(WERROR_FLAGS) +EXPORT_MAP := rte_octeontx_common_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-y += octeontx_ssovf.c +SRCS-y += octeontx_mbox.c + +LDLIBS += -lrte_eal -lrte_bus_pci + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/common/octeontx/meson.build b/drivers/common/octeontx/meson.build new file mode 100644 index 000000000..654eb482e --- /dev/null +++ b/drivers/common/octeontx/meson.build @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Cavium, Inc +# + +std_deps += ['bus_pci'] +sources = files('octeontx_mbox.c', + 'octeontx_ssovf.c' +) diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c similarity index 95% rename from drivers/mempool/octeontx/octeontx_mbox.c rename to drivers/common/octeontx/octeontx_mbox.c index f8cb6a453..23e90711c 100644 --- a/drivers/mempool/octeontx/octeontx_mbox.c +++ b/drivers/common/octeontx/octeontx_mbox.c @@ -11,7 +11,6 @@ #include #include "octeontx_mbox.h" -#include "octeontx_pool_logs.h" /* Mbox operation timeout in seconds */ #define MBOX_WAIT_TIME_SEC 3 @@ -60,6 +59,17 @@ struct mbox_ram_hdr { }; }; +int octeontx_logtype_mbox; + +RTE_INIT(otx_init_log); +static void +otx_init_log(void) +{ + octeontx_logtype_mbox = rte_log_register("pmd.octeontx.mbox"); + if (octeontx_logtype_mbox >= 0) + rte_log_set_level(octeontx_logtype_mbox, RTE_LOG_NOTICE); +} + static inline void mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size) { diff --git a/drivers/mempool/octeontx/octeontx_mbox.h b/drivers/common/octeontx/octeontx_mbox.h similarity index 72% rename from drivers/mempool/octeontx/octeontx_mbox.h rename to drivers/common/octeontx/octeontx_mbox.h index 1b056071a..f40b8fb5f 100644 --- a/drivers/mempool/octeontx/octeontx_mbox.h +++ b/drivers/common/octeontx/octeontx_mbox.h @@ -10,6 +10,17 @@ #define SSOW_BAR4_LEN (64 * 1024) #define SSO_VHGRP_PF_MBOX(x) (0x200ULL | ((x) << 3)) +#define MBOX_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, octeontx_logtype_mbox,\ + "%s() line %u: " fmt "\n", __func__, __LINE__, ## args) + +#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__) +#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__) +#define mbox_log_err(fmt, ...) MBOX_LOG(ERR, fmt, ##__VA_ARGS__) +#define mbox_func_trace mbox_log_dbg + +extern int octeontx_logtype_mbox; + struct octeontx_ssovf_info { uint16_t domain; /* Domain id */ uint8_t total_ssovfs; /* Total sso groups available in domain */ diff --git a/drivers/mempool/octeontx/octeontx_ssovf.c b/drivers/common/octeontx/octeontx_ssovf.c similarity index 99% rename from drivers/mempool/octeontx/octeontx_ssovf.c rename to drivers/common/octeontx/octeontx_ssovf.c index 97b240665..778fb7f79 100644 --- a/drivers/mempool/octeontx/octeontx_ssovf.c +++ b/drivers/common/octeontx/octeontx_ssovf.c @@ -10,7 +10,6 @@ #include #include "octeontx_mbox.h" -#include "octeontx_pool_logs.h" #define PCI_VENDOR_ID_CAVIUM 0x177D #define PCI_DEVICE_ID_OCTEONTX_SSOGRP_VF 0xA04B diff --git a/drivers/common/octeontx/rte_octeontx_common_version.map b/drivers/common/octeontx/rte_octeontx_common_version.map new file mode 100644 index 000000000..cd9ddc9ac --- /dev/null +++ b/drivers/common/octeontx/rte_octeontx_common_version.map @@ -0,0 +1,7 @@ +DPDK_17.11 { + global: + + octeontx_ssovf_info; + octeontx_ssovf_bar; + octeontx_ssovf_mbox_send; +}; diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile index 0e49efd84..102cad08c 100644 --- a/drivers/event/octeontx/Makefile +++ b/drivers/event/octeontx/Makefile @@ -10,10 +10,11 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_octeontx_ssovf.a CFLAGS += $(WERROR_FLAGS) +CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/ CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/ -LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx +LDLIBS += -lrte_eal -lrte_eventdev -lrte_octeontx_common -lrte_pmd_octeontx LDLIBS += -lrte_bus_pci -lrte_mempool -lrte_mbuf -lrte_kvargs LDLIBS += -lrte_bus_vdev diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build index 358fc9fc9..4d70ce2bb 100644 --- a/drivers/event/octeontx/meson.build +++ b/drivers/event/octeontx/meson.build @@ -6,4 +6,4 @@ sources = files('ssovf_worker.c', 'ssovf_evdev_selftest.c' ) -deps += ['mempool_octeontx', 'bus_vdev', 'pmd_octeontx'] +deps += ['octeontx_common', 'mempool_octeontx', 'bus_vdev', 'pmd_octeontx'] diff --git a/drivers/mempool/octeontx/Makefile b/drivers/mempool/octeontx/Makefile index dfc373e62..7d12094bb 100644 --- a/drivers/mempool/octeontx/Makefile +++ b/drivers/mempool/octeontx/Makefile @@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_mempool_octeontx.a CFLAGS += $(WERROR_FLAGS) +CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/ EXPORT_MAP := rte_mempool_octeontx_version.map LIBABIVER := 1 @@ -17,8 +18,6 @@ LIBABIVER := 1 # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += octeontx_ssovf.c -SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += octeontx_mbox.c SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += octeontx_fpavf.c SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += rte_mempool_octeontx.c @@ -36,6 +35,6 @@ CFLAGS_rte_mempool_octeontx.o += -Ofast endif LDLIBS += -lrte_eal -lrte_mempool -lrte_ring -lrte_mbuf -LDLIBS += -lrte_bus_pci +LDLIBS += -lrte_bus_pci -lrte_octeontx_common include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/mempool/octeontx/meson.build b/drivers/mempool/octeontx/meson.build index 1e894a56b..86c2ba104 100644 --- a/drivers/mempool/octeontx/meson.build +++ b/drivers/mempool/octeontx/meson.build @@ -1,10 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc -sources = files('octeontx_ssovf.c', - 'octeontx_mbox.c', - 'octeontx_fpavf.c', +sources = files('octeontx_fpavf.c', 'rte_mempool_octeontx.c' ) -deps += ['mbuf', 'bus_pci'] +deps += ['mbuf', 'bus_pci', 'octeontx_common'] diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c index 61c72c7c8..85c361d20 100644 --- a/drivers/mempool/octeontx/octeontx_fpavf.c +++ b/drivers/mempool/octeontx/octeontx_fpavf.c @@ -115,10 +115,6 @@ otx_pool_init_log(void) octeontx_logtype_fpavf = rte_log_register("pmd.mempool.octeontx"); if (octeontx_logtype_fpavf >= 0) rte_log_set_level(octeontx_logtype_fpavf, RTE_LOG_NOTICE); - - octeontx_logtype_fpavf_mbox = rte_log_register("pmd.mempool.octeontx.mbox"); - if (octeontx_logtype_fpavf_mbox >= 0) - rte_log_set_level(octeontx_logtype_fpavf_mbox, RTE_LOG_NOTICE); } /* lock is taken by caller */ diff --git a/drivers/mempool/octeontx/octeontx_pool_logs.h b/drivers/mempool/octeontx/octeontx_pool_logs.h index 958651924..7b4e1b387 100644 --- a/drivers/mempool/octeontx/octeontx_pool_logs.h +++ b/drivers/mempool/octeontx/octeontx_pool_logs.h @@ -11,21 +11,12 @@ rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf,\ "%s() line %u: " fmt "\n", __func__, __LINE__, ## args) -#define MBOX_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf_mbox,\ - "%s() line %u: " fmt "\n", __func__, __LINE__, ## args) - #define fpavf_log_info(fmt, ...) FPAVF_LOG(INFO, fmt, ##__VA_ARGS__) #define fpavf_log_dbg(fmt, ...) FPAVF_LOG(DEBUG, fmt, ##__VA_ARGS__) #define fpavf_log_err(fmt, ...) FPAVF_LOG(ERR, fmt, ##__VA_ARGS__) #define fpavf_func_trace fpavf_log_dbg -#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__) -#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__) -#define mbox_log_err(fmt, ...) MBOX_LOG(ERR, fmt, ##__VA_ARGS__) -#define mbox_func_trace mbox_log_dbg extern int octeontx_logtype_fpavf; -extern int octeontx_logtype_fpavf_mbox; #endif /* __OCTEONTX_POOL_LOGS_H__*/ diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx_version.map b/drivers/mempool/octeontx/rte_mempool_octeontx_version.map index fe8cdeca0..a75303172 100644 --- a/drivers/mempool/octeontx/rte_mempool_octeontx_version.map +++ b/drivers/mempool/octeontx/rte_mempool_octeontx_version.map @@ -1,9 +1,3 @@ DPDK_17.11 { - global: - - octeontx_ssovf_info; - octeontx_ssovf_bar; - octeontx_ssovf_mbox_send; - local: *; }; diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile index 3e4a10662..efe38c4ac 100644 --- a/drivers/net/octeontx/Makefile +++ b/drivers/net/octeontx/Makefile @@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_octeontx.a CFLAGS += $(WERROR_FLAGS) +CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/ EXPORT_MAP := rte_pmd_octeontx_version.map @@ -46,7 +47,7 @@ endif CFLAGS_octeontx_ethdev.o += -DALLOW_EXPERIMENTAL_API LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_octeontx_common LDLIBS += -lrte_mempool_octeontx LDLIBS += -lrte_eventdev LDLIBS += -lrte_bus_pci diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 94525dc80..452020ac0 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -118,6 +118,7 @@ ifeq ($(CONFIG_RTE_EAL_VFIO),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += -lrte_bus_fslmc endif + ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) # plugins (link only if static libraries) @@ -223,6 +224,10 @@ endif # CONFIG_RTE_LIBRTE_DPAA_BUS endif # CONFIG_RTE_LIBRTE_CRYPTODEV +ifeq ($(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL),yy) +_LDLIBS-y += -lrte_octeontx_common +endif + ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += -lrte_pmd_skeleton_event _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += -lrte_pmd_sw_event -- 2.16.2