From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0049.outbound.protection.outlook.com [104.47.38.49]) by dpdk.org (Postfix) with ESMTP id C936C1B62E for ; Wed, 18 Oct 2017 06:46:36 +0200 (CEST) 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=FTCJ26wvffoMopuxFYVCzavKuEgpAeZo7Ba0vN3NjuE=; b=SPpx7wiBMQGIwqdggh5OhTSdf6+1de3M5tn7tRmbVnZwP8auX9zJfPz8h8pU1OqaVr0ym5WRnOmEjLRbgGP/OzUvmxHFmbixPiq5WyfKbN1+xOaZOfITEXKng65Qyvi6Co6ekgBl8A51enM9tkmK3sNtrnCNBdEEUbIXzoXmK54= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (103.16.71.47) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 18 Oct 2017 04:46:33 +0000 Date: Wed, 18 Oct 2017 10:16:13 +0530 From: Pavan Nikhilesh Bhagavatula To: Santosh Shukla , jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org Message-ID: <20171018044612.GA3800@PBHAGAVATULA-LT> References: <20171016134247.5431-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171016134247.5431-1-santosh.shukla@caviumnetworks.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR0401CA0017.apcprd04.prod.outlook.com (10.170.128.155) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce832900-98b3-42b3-bf96-08d515e3361d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:TbKdHAPJLg2md5H2aKkmt0Gqf2zUqXUn1bPtPEAyIzAXDiqmyOKoH0GacIC8yxeJiLmrhx8eyUGL9CNJqyRfecQj2PygQw2hGhV6tPSpjlJxjKwF6mvH4nNrSBsC7V9Z0wQhjpawJ5rbSVRXCqstCeL1jcGNAJlErKB292mAonpvoSDi+Mw+Oz1wr7LgG00dOHW2LvZxNmZp76sn9EWPSIeQ5e3DgeqVCeh0X/XU0Zwm5OZJ/UH5mL1cWpdDMlvC; 25:oT8NM15OE6Vf/aI8jV8o2CyZ2Yx69++tgT+MpC16hm9ISKnmFpu/7AdxRht5ZWlWmHBtdlQaXYViCILCVkJYohOyR4o76BvrOZ/xPtgAZeiqKvVI3z6o452qVpKzXWY9K5LoyQgb4AXuXbNYKIkyMD5PFuOjMut+5w1+JVdZ43+nkHxzi/4JBlJBR8CXgfjo39Z4D0NQQl3rwkv/vObh7VBosxjbVdLiXV+0pk2FbAWq2nVrbSStqPKfprvep3JjZ7B3MPal4USTRQAF/gmPEUV5vK82CuxcsgQaLPcbHSD0nHWRRmmqQQpBrAGiUNv/ZtJyE/ue2ewX8vQuQj2XPw==; 31:FCWnbyFx8WbdYk4uJ/dZ4jEagssWNYBnd7IXZbYkioVkGmZ+wNARFo6MibMOKyWa57A7PzQivAwtZ5ZBs9y7bojqIOcgiuhz6F6aG1jWZvGNvvo3OAYpBn/v5ftz6bwIUuIKNKMDR+o7GstsMO2azD65TWc8eBpvrMSysmQH6X+p8SAoXWTrMdWaGS7Y4XELykP6wMkb9oMdfnVnLShAdZf4yeO47kyvUG953nhaVgg= X-MS-TrafficTypeDiagnostic: DM5PR07MB3467: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 20:XJ+XYGiLUZBEExUzAvijLYentk5XJMa6CGiVFW0XsAwIRyHhA/wKE73zXgChi8w4KvytwlyMU2cLEXmIrWeOTJOZyQ92TbJaQdZ7C136zL+wejjdLm0rXKG3mCZYrk9ScDiY6gpSqtSiX28RU2h+D0wK99qI9Un6nPvkoX6x4a5QJB31U2mvdbDCVfD5SzWqx/xlNpB87Dqegz4Z7sfJ3X94QREABbN3HFiahGD/Hl6Ehqy2ry+73Y2D1nq78fgf26PLGvkfULxEyHHy85zxNaSwRjwDixcerjMcZHjeJlvt/Ue21a+U/RqQ5t6aY9kYvMGom/an1ilrvBzRvGCyZVZFwFCSnOq3NePRKrP4PlNQxVWD+oHSvWIKCzFRMvmfkTeq7qtZbaC+cTMXAGvitbWVj0ZZ06mrqeADGLeL2yNQqFnAM1WheyOmzFFrLqAhcEiLoDr38gK/D9oYwQoeRpEPGm2d4F/8Qia8CwF51Y891CmY3mUfqKNe9kd7K+eBQ3dwiHY9qihn6CuzolJ+L2zCtbP8vYYLUdHhfThvCn93QONc0h7nI2ZThKIXn6hrKloxHUYGLU3tdXauflnUcaWjexWQYA8Wop9en2BR1tg=; 4:OgRav6T6oBwmk0ej4s8ie6EECo2cnT3nof1BdItpIdaXSgvPlvJsBbJ0UWfZBUnETaftW9stP6kSiEzGuAp2vAnWwQAvbSf/91mEeBXwhmnpSXAVSrAtLETOprg+KN3jafurNxiW5aIYeIjk7xBaHoOqJB+MfgV/QCwT/to4ZyfHg/cxuLsGYiMx5/HF8YF/iO1pPjTW3eTYs8NPOiZrCBkupTGzReV4DsCoRchwcXXAdJ+mA7qrZFvNOgnaBY0RKaHFDV2OuE6wpWLMvNcQZGsHd/Vptx3vje4MLUco9Yg= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123558100)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(24454002)(316002)(72206003)(478600001)(58126008)(575784001)(106356001)(16586007)(6246003)(53936002)(25786009)(23726003)(2950100002)(6306002)(33716001)(105586002)(6666003)(6636002)(53376002)(6496005)(55016002)(42882006)(9686003)(50466002)(189998001)(6116002)(5660300001)(4326008)(33656002)(1076002)(97736004)(81166006)(2906002)(7736002)(229853002)(3846002)(101416001)(305945005)(81156014)(66066001)(54356999)(8676002)(8936002)(76176999)(16526018)(83506001)(68736007)(50986999)(966005)(47776003)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-LT; 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; DM5PR07MB3467; 23:OF1beGfO3Kv52703UrQZPPx+WYgSUT7joCCIpcJCu?= =?us-ascii?Q?+cycYYA3zotR8Tn3QObahAxBzTBjQ7ZivgHh1F2Wq1Jgus6neoREJtcPJcak?= =?us-ascii?Q?9rOSR9F22MNQmD3GXZXQkKwR2FIEaVQt2ZXgXu9Yym6H/Oh+m5kousPVUw1R?= =?us-ascii?Q?vvAhWc2qWZXCLnLtqXbSB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qPlK5tkoCqDMDP9BjY5U7qJpWdM/t4la3n43Ob62y+vwOdaajpbyIg990bPiCjqmuRFNPH5AjjcmP7qqDCjPGwAIWTmX6ly5Bs/86ceWJz7sXSCcHJk1ICcNzYQEiRZM2INjOxqmnScEWlphfgj+QMZJskGQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2017 04:46:33.9346 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: Re: [dpdk-dev] [PATCH v1 1/2] mempool/octeontx: move mbox from event to mempool 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, 18 Oct 2017 04:46:37 -0000 On Mon, Oct 16, 2017 at 01:42:46PM +0000, Santosh Shukla wrote: > Octeontx mempool pmd need mailbox for pool setup. > That mailbox was defined at drivers/event/octeontx. > So mempool has dependency on event/octeontx driver and > commit:8700239f7767 has added make rule which makes sure event/* > get build before mempool, but this rule introduces > cyclic dependency and may create problem to future > feature addition in drivers/Makefile. > > Same problem noticed and reported in below thread: > http://dpdk.org/ml/archives/dev/2017-October/079187.html > > The patch solves problem by moving mbox definition from > drivers/event/octeontx to drivers/mempool/octeontx. > Moving mbox files involves below changes: > > * Renamed ssovf_mbox.[ch] --> octeontx_mbox.[ch] > * Renamed ssovf_probe.c --> octeontx_ssovf.c > * Introduced pool logger file. > * Moved API from rte_pmd_octeontx_ssovf_version.map to > rte_mempool_octeontx_version.map. > * Respective Makefile changes done in > drivers/event/octeontx/Makefile and drivers/mempool/octeontx/Makefile. > > Fixes: 8700239f7767 ("mempool/octeontx: add build and log infrastructure") > > Reported-by: Hemant Agrawal > Signed-off-by: Santosh Shukla > --- > drivers/Makefile | 6 +- > drivers/event/Makefile | 2 +- > drivers/event/octeontx/Makefile | 6 +- > .../octeontx/rte_pmd_octeontx_ssovf_version.map | 6 -- > drivers/event/octeontx/ssovf_evdev.h | 9 +-- > drivers/event/octeontx/ssovf_worker.h | 1 + > drivers/mempool/Makefile | 2 +- > drivers/mempool/octeontx/Makefile | 10 +--- > drivers/mempool/octeontx/octeontx_fpavf.c | 2 +- > drivers/mempool/octeontx/octeontx_fpavf.h | 19 +----- > .../octeontx/octeontx_mbox.c} | 12 ++-- > .../octeontx/octeontx_mbox.h} | 9 ++- > drivers/mempool/octeontx/octeontx_pool_logs.h | 68 ++++++++++++++++++++++ > .../octeontx/octeontx_ssovf.c} | 30 ++++++---- > .../octeontx/rte_mempool_octeontx_version.map | 5 ++ > drivers/net/Makefile | 2 +- > drivers/net/octeontx/Makefile | 1 - > drivers/net/octeontx/base/octeontx_bgx.h | 2 +- > drivers/net/octeontx/base/octeontx_pkivf.h | 2 +- > 19 files changed, 120 insertions(+), 74 deletions(-) > rename drivers/{event/octeontx/ssovf_mbox.c => mempool/octeontx/octeontx_mbox.c} (95%) > rename drivers/{event/octeontx/rte_pmd_octeontx_ssovf.h => mempool/octeontx/octeontx_mbox.h} (93%) > create mode 100644 drivers/mempool/octeontx/octeontx_pool_logs.h > rename drivers/{event/octeontx/ssovf_probe.c => mempool/octeontx/octeontx_ssovf.c} (89%) > > diff --git a/drivers/Makefile b/drivers/Makefile > index 3a5b22342..0467250aa 100644 > --- a/drivers/Makefile > +++ b/drivers/Makefile > @@ -32,13 +32,13 @@ > include $(RTE_SDK)/mk/rte.vars.mk > > DIRS-y += bus > -DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event > -DEPDIRS-event := bus > DIRS-y += mempool > -DEPDIRS-mempool := bus event > +DEPDIRS-mempool := bus > DIRS-y += net > DEPDIRS-net := bus mempool > DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto > DEPDIRS-crypto := bus mempool > +DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event > +DEPDIRS-event := bus mempool > > include $(RTE_SDK)/mk/rte.subdir.mk > diff --git a/drivers/event/Makefile b/drivers/event/Makefile > index 3f6b8988a..d09be74da 100644 > --- a/drivers/event/Makefile > +++ b/drivers/event/Makefile > @@ -38,7 +38,7 @@ DEPDIRS-skeleton = $(core-libs) > DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw > DEPDIRS-sw = $(core-libs) librte_kvargs librte_ring > DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += octeontx > -DEPDIRS-octeontx = $(core-libs) > +DEPDIRS-octeontx = $(core-libs) librte_mempool_octeontx > DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2 > DEPDIRS-dpaa2 = $(core-libs) librte_bus_fslmc > > diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile > index e5661ca82..50434a384 100644 > --- a/drivers/event/octeontx/Makefile > +++ b/drivers/event/octeontx/Makefile > @@ -38,6 +38,7 @@ include $(RTE_SDK)/mk/rte.vars.mk > LIB = librte_pmd_octeontx_ssovf.a > > CFLAGS += $(WERROR_FLAGS) > +CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/ > > EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map > > @@ -48,8 +49,6 @@ LIBABIVER := 1 > # > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c > -SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c > > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays > @@ -64,7 +63,4 @@ else > CFLAGS_ssovf_worker.o += -Ofast > endif > > -# install this header file > -SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)-include := rte_pmd_octeontx_ssovf.h > - > include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/event/octeontx/rte_pmd_octeontx_ssovf_version.map b/drivers/event/octeontx/rte_pmd_octeontx_ssovf_version.map > index 3810a03f3..5352e7e3b 100644 > --- a/drivers/event/octeontx/rte_pmd_octeontx_ssovf_version.map > +++ b/drivers/event/octeontx/rte_pmd_octeontx_ssovf_version.map > @@ -1,9 +1,3 @@ > DPDK_17.05 { > - global: > - > - octeontx_ssovf_info; > - octeontx_ssovf_bar; > - octeontx_ssovf_mbox_send; > - > local: *; > }; > diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h > index 1cdc81047..933c5a365 100644 > --- a/drivers/event/octeontx/ssovf_evdev.h > +++ b/drivers/event/octeontx/ssovf_evdev.h > @@ -37,7 +37,7 @@ > #include > #include > > -#include "rte_pmd_octeontx_ssovf.h" > +#include > > #define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx > > @@ -58,10 +58,6 @@ > RTE_LOG(ERR, EVENTDEV, "[%s] %s() " fmt "\n", \ > RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args) > > -#define PCI_VENDOR_ID_CAVIUM 0x177D > -#define PCI_DEVICE_ID_OCTEONTX_SSOGRP_VF 0xA04B > -#define PCI_DEVICE_ID_OCTEONTX_SSOWS_VF 0xA04D > - > #define SSO_MAX_VHGRP (64) > #define SSO_MAX_VHWS (32) > > @@ -76,7 +72,6 @@ > #define SSO_VHGRP_XAQ_CNT (0x1B0ULL) > #define SSO_VHGRP_AQ_CNT (0x1C0ULL) > #define SSO_VHGRP_AQ_THR (0x1E0ULL) > -#define SSO_VHGRP_PF_MBOX(x) (0x200ULL | ((x) << 3)) > > /* BAR2 */ > #define SSO_VHGRP_OP_ADD_WORK0 (0x00ULL) > @@ -107,8 +102,6 @@ > #define SSOW_VHWS_OP_GET_WORK0 (0x80000ULL) > #define SSOW_VHWS_OP_GET_WORK1 (0x80008ULL) > > -#define SSOW_BAR4_LEN (64 * 1024) > - > /* Mailbox message constants */ > #define SSO_COPROC 0x2 > > diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h > index 55f72555a..8dc1264ab 100644 > --- a/drivers/event/octeontx/ssovf_worker.h > +++ b/drivers/event/octeontx/ssovf_worker.h > @@ -35,6 +35,7 @@ > #include > > #include "ssovf_evdev.h" > +#include > > enum { > SSO_SYNC_ORDERED, > diff --git a/drivers/mempool/Makefile b/drivers/mempool/Makefile > index 18cbaa293..ce5d02cf7 100644 > --- a/drivers/mempool/Makefile > +++ b/drivers/mempool/Makefile > @@ -41,6 +41,6 @@ DEPDIRS-ring = $(core-libs) > DIRS-$(CONFIG_RTE_DRIVER_MEMPOOL_STACK) += stack > DEPDIRS-stack = $(core-libs) > DIRS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += octeontx > -DEPDIRS-octeontx = $(core-libs) librte_pmd_octeontx_ssovf > +DEPDIRS-octeontx = $(core-libs) > > include $(RTE_SDK)/mk/rte.subdir.mk > diff --git a/drivers/mempool/octeontx/Makefile b/drivers/mempool/octeontx/Makefile > index 0b2043842..f2fa22b9b 100644 > --- a/drivers/mempool/octeontx/Makefile > +++ b/drivers/mempool/octeontx/Makefile > @@ -36,13 +36,7 @@ include $(RTE_SDK)/mk/rte.vars.mk > # > LIB = librte_mempool_octeontx.a > > -ifeq ($(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG),y) > -CFLAGS += -O0 -g > -else > -CFLAGS += -O3 > CFLAGS += $(WERROR_FLAGS) > -endif > - > EXPORT_MAP := rte_mempool_octeontx_version.map > > LIBABIVER := 1 > @@ -50,6 +44,8 @@ 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 > > @@ -69,6 +65,4 @@ endif > # this lib depends upon: > DEPDIRS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += lib/librte_mbuf > > -LDLIBS += -lrte_pmd_octeontx_ssovf > - > include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c > index 8d5c2a689..3c441fd3e 100644 > --- a/drivers/mempool/octeontx/octeontx_fpavf.c > +++ b/drivers/mempool/octeontx/octeontx_fpavf.c > @@ -48,7 +48,7 @@ > #include > #include > > -#include > +#include "octeontx_mbox.h" > #include "octeontx_fpavf.h" > > /* FPA Mbox Message */ > diff --git a/drivers/mempool/octeontx/octeontx_fpavf.h b/drivers/mempool/octeontx/octeontx_fpavf.h > index 7a39cd22c..1d09f0079 100644 > --- a/drivers/mempool/octeontx/octeontx_fpavf.h > +++ b/drivers/mempool/octeontx/octeontx_fpavf.h > @@ -33,25 +33,8 @@ > #ifndef __OCTEONTX_FPAVF_H__ > #define __OCTEONTX_FPAVF_H__ > > -#include > #include > - > -#ifdef RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG > -#define fpavf_log_info(fmt, args...) \ > - RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \ > - __func__, __LINE__, ## args) > -#define fpavf_log_dbg(fmt, args...) \ > - RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \ > - __func__, __LINE__, ## args) > -#else > -#define fpavf_log_info(fmt, args...) > -#define fpavf_log_dbg(fmt, args...) > -#endif > - > -#define fpavf_func_trace fpavf_log_dbg > -#define fpavf_log_err(fmt, args...) \ > - RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \ > - __func__, __LINE__, ## args) > +#include "octeontx_pool_logs.h" > > /* fpa pool Vendor ID and Device ID */ > #define PCI_VENDOR_ID_CAVIUM 0x177D > diff --git a/drivers/event/octeontx/ssovf_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c > similarity index 95% > rename from drivers/event/octeontx/ssovf_mbox.c > rename to drivers/mempool/octeontx/octeontx_mbox.c > index 9ed417d1a..9525da1aa 100644 > --- a/drivers/event/octeontx/ssovf_mbox.c > +++ b/drivers/mempool/octeontx/octeontx_mbox.c > @@ -38,10 +38,11 @@ > #include > #include > > -#include "ssovf_evdev.h" > +#include "octeontx_mbox.h" > +#include "octeontx_pool_logs.h" > > /* Mbox operation timeout in seconds */ > -#define MBOX_WAIT_TIME_SEC 3 > +#define MBOX_WAIT_TIME_SEC 3 > #define MAX_RAM_MBOX_LEN ((SSOW_BAR4_LEN >> 1) - 8 /* Mbox header */) > > /* Mbox channel state */ > @@ -87,7 +88,6 @@ struct mbox_ram_hdr { > }; > }; > > - > static inline void > mbox_msgcpy(uint8_t *d, const uint8_t *s, uint16_t size) > { > @@ -181,7 +181,7 @@ mbox_wait_response(struct mbox *m, struct octeontx_mbox_hdr *hdr, > return len; > > error: > - ssovf_log_err("Failed to send mbox(%d/%d) coproc=%d msg=%d ret=(%d,%d)", > + mbox_log_err("Failed to send mbox(%d/%d) coproc=%d msg=%d ret=(%d,%d)", > m->tag_own, rx_hdr.tag, hdr->coproc, hdr->msg, res, > hdr->res_code); > return res; > @@ -195,7 +195,7 @@ mbox_send(struct mbox *m, struct octeontx_mbox_hdr *hdr, const void *txmsg, > > if (m->init_once == 0 || hdr == NULL || > txsize > MAX_RAM_MBOX_LEN || rxsize > MAX_RAM_MBOX_LEN) { > - ssovf_log_err("Invalid init_once=%d hdr=%p txsz=%d rxsz=%d", > + mbox_log_err("Invalid init_once=%d hdr=%p txsz=%d rxsz=%d", > m->init_once, hdr, txsize, rxsize); > return res; > } > @@ -219,7 +219,7 @@ mbox_setup(struct mbox *m) > m->reg += SSO_VHGRP_PF_MBOX(1); > > if (m->ram_mbox_base == NULL || m->reg == NULL) { > - ssovf_log_err("Invalid ram_mbox_base=%p or reg=%p", > + mbox_log_err("Invalid ram_mbox_base=%p or reg=%p", > m->ram_mbox_base, m->reg); > return -EINVAL; > } > diff --git a/drivers/event/octeontx/rte_pmd_octeontx_ssovf.h b/drivers/mempool/octeontx/octeontx_mbox.h > similarity index 93% > rename from drivers/event/octeontx/rte_pmd_octeontx_ssovf.h > rename to drivers/mempool/octeontx/octeontx_mbox.h > index ba6d51422..49f38257e 100644 > --- a/drivers/event/octeontx/rte_pmd_octeontx_ssovf.h > +++ b/drivers/mempool/octeontx/octeontx_mbox.h > @@ -30,11 +30,14 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > -#ifndef __RTE_PMD_OCTEONTX_SSOVF_H__ > -#define __RTE_PMD_OCTEONTX_SSOVF_H__ > +#ifndef __OCTEONTX_MBOX_H__ > +#define __OCTEONTX_MBOX_H__ > > #include > > +#define SSOW_BAR4_LEN (64 * 1024) > +#define SSO_VHGRP_PF_MBOX(x) (0x200ULL | ((x) << 3)) > + > struct octeontx_ssovf_info { > uint16_t domain; /* Domain id */ > uint8_t total_ssovfs; /* Total sso groups available in domain */ > @@ -58,4 +61,4 @@ void *octeontx_ssovf_bar(enum octeontx_ssovf_type, uint8_t id, uint8_t bar); > int octeontx_ssovf_mbox_send(struct octeontx_mbox_hdr *hdr, > void *txdata, uint16_t txlen, void *rxdata, uint16_t rxlen); > > -#endif /* __RTE_PMD_OCTEONTX_SSOVF_H__ */ > +#endif /* __OCTEONTX_MBOX_H__ */ > diff --git a/drivers/mempool/octeontx/octeontx_pool_logs.h b/drivers/mempool/octeontx/octeontx_pool_logs.h > new file mode 100644 > index 000000000..58ccb0f0e > --- /dev/null > +++ b/drivers/mempool/octeontx/octeontx_pool_logs.h > @@ -0,0 +1,68 @@ > +/* > + * BSD LICENSE > + * > + * Copyright (C) 2017 Cavium Inc. All rights reserved. > + * > + * 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 Cavium networks 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "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 THE COPYRIGHT > + * OWNER OR CONTRIBUTORS 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 __OCTEONTX_POOL_LOGS_H__ > +#define __OCTEONTX_POOL_LOGS_H__ > + > +#include > + > +#ifdef RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG > +#define fpavf_log_info(fmt, args...) \ > + RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > +#define fpavf_log_dbg(fmt, args...) \ > + RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > + > +#define mbox_log_info(fmt, args...) \ > + RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > +#define mbox_log_dbg(fmt, args...) \ > + RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > +#else > +#define fpavf_log_info(fmt, args...) > +#define fpavf_log_dbg(fmt, args...) > +#define mbox_log_info(fmt, args...) > +#define mbox_log_dbg(fmt, args...) > +#endif > + > +#define fpavf_func_trace fpavf_log_dbg > +#define fpavf_log_err(fmt, args...) \ > + RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > +#define mbox_func_trace mbox_log_dbg > +#define mbox_log_err(fmt, args...) \ > + RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \ > + __func__, __LINE__, ## args) > + > +#endif /* __OCTEONTX_POOL_LOGS_H__*/ > diff --git a/drivers/event/octeontx/ssovf_probe.c b/drivers/mempool/octeontx/octeontx_ssovf.c > similarity index 89% > rename from drivers/event/octeontx/ssovf_probe.c > rename to drivers/mempool/octeontx/octeontx_ssovf.c > index e1c0c6d50..9953b2eac 100644 > --- a/drivers/event/octeontx/ssovf_probe.c > +++ b/drivers/mempool/octeontx/octeontx_ssovf.c > @@ -36,7 +36,17 @@ > #include > #include > > -#include "ssovf_evdev.h" > +#include "octeontx_mbox.h" > +#include "octeontx_pool_logs.h" > + > +#define PCI_VENDOR_ID_CAVIUM 0x177D > +#define PCI_DEVICE_ID_OCTEONTX_SSOGRP_VF 0xA04B > +#define PCI_DEVICE_ID_OCTEONTX_SSOWS_VF 0xA04D > + > +#define SSO_MAX_VHGRP (64) > +#define SSO_MAX_VHWS (32) > + > +#define SSO_VHGRP_AQ_THR (0x1E0ULL) > > struct ssovf_res { > uint16_t domain; > @@ -86,7 +96,7 @@ octeontx_ssovf_info(struct octeontx_ssovf_info *info) > if (sdev.grp[i].vfid != i || > sdev.grp[i].bar0 == NULL || > sdev.grp[i].domain != domain) { > - ssovf_log_err("GRP error, vfid=%d/%d domain=%d/%d %p", > + mbox_log_err("GRP error, vfid=%d/%d domain=%d/%d %p", > i, sdev.grp[i].vfid, > domain, sdev.grp[i].domain, > sdev.grp[i].bar0); > @@ -99,7 +109,7 @@ octeontx_ssovf_info(struct octeontx_ssovf_info *info) > if (sdev.hws[i].vfid != i || > sdev.hws[i].bar0 == NULL || > sdev.hws[i].domain != domain) { > - ssovf_log_err("HWS error, vfid=%d/%d domain=%d/%d %p", > + mbox_log_err("HWS error, vfid=%d/%d domain=%d/%d %p", > i, sdev.hws[i].vfid, > domain, sdev.hws[i].domain, > sdev.hws[i].bar0); > @@ -169,7 +179,7 @@ ssowvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > if (pci_dev->mem_resource[0].addr == NULL || > pci_dev->mem_resource[2].addr == NULL || > pci_dev->mem_resource[4].addr == NULL) { > - ssovf_log_err("Empty bars %p %p %p", > + mbox_log_err("Empty bars %p %p %p", > pci_dev->mem_resource[0].addr, > pci_dev->mem_resource[2].addr, > pci_dev->mem_resource[4].addr); > @@ -177,7 +187,7 @@ ssowvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > } > > if (pci_dev->mem_resource[4].len != SSOW_BAR4_LEN) { > - ssovf_log_err("Bar4 len mismatch %d != %d", > + mbox_log_err("Bar4 len mismatch %d != %d", > SSOW_BAR4_LEN, (int)pci_dev->mem_resource[4].len); > return -EINVAL; > } > @@ -185,7 +195,7 @@ ssowvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > id = pci_dev->mem_resource[4].addr; > vfid = id->vfid; > if (vfid >= SSO_MAX_VHWS) { > - ssovf_log_err("Invalid vfid(%d/%d)", vfid, SSO_MAX_VHWS); > + mbox_log_err("Invalid vfid(%d/%d)", vfid, SSO_MAX_VHWS); > return -EINVAL; > } > > @@ -198,7 +208,7 @@ ssowvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > > sdev.total_ssowvfs++; > rte_wmb(); > - ssovf_log_dbg("Domain=%d hws=%d total_ssowvfs=%d", res->domain, > + mbox_log_dbg("Domain=%d hws=%d total_ssowvfs=%d", res->domain, > res->vfid, sdev.total_ssowvfs); > return 0; > } > @@ -239,7 +249,7 @@ ssovf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > > if (pci_dev->mem_resource[0].addr == NULL || > pci_dev->mem_resource[2].addr == NULL) { > - ssovf_log_err("Empty bars %p %p", > + mbox_log_err("Empty bars %p %p", > pci_dev->mem_resource[0].addr, > pci_dev->mem_resource[2].addr); > return -ENODEV; > @@ -252,7 +262,7 @@ ssovf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > rte_write64((1ULL << 33) - 1, idreg); > vfid = (val >> 16) & 0xffff; > if (vfid >= SSO_MAX_VHGRP) { > - ssovf_log_err("Invalid vfid (%d/%d)", vfid, SSO_MAX_VHGRP); > + mbox_log_err("Invalid vfid (%d/%d)", vfid, SSO_MAX_VHGRP); > return -EINVAL; > } > > @@ -264,7 +274,7 @@ ssovf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) > > sdev.total_ssovfs++; > rte_wmb(); > - ssovf_log_dbg("Domain=%d group=%d total_ssovfs=%d", res->domain, > + mbox_log_dbg("Domain=%d group=%d total_ssovfs=%d", res->domain, > res->vfid, sdev.total_ssovfs); > return 0; > } > diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx_version.map b/drivers/mempool/octeontx/rte_mempool_octeontx_version.map > index a70bd197b..fe8cdeca0 100644 > --- a/drivers/mempool/octeontx/rte_mempool_octeontx_version.map > +++ b/drivers/mempool/octeontx/rte_mempool_octeontx_version.map > @@ -1,4 +1,9 @@ > DPDK_17.11 { > + global: > + > + octeontx_ssovf_info; > + octeontx_ssovf_bar; > + octeontx_ssovf_mbox_send; > > local: *; > }; > diff --git a/drivers/net/Makefile b/drivers/net/Makefile > index 5d2ad2f8a..012af881a 100644 > --- a/drivers/net/Makefile > +++ b/drivers/net/Makefile > @@ -84,7 +84,7 @@ DEPDIRS-bnxt = $(core-libs) > DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null > DEPDIRS-null = $(core-libs) > DIRS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx > -DEPDIRS-octeontx = $(core-libs) librte_eventdev librte_pmd_octeontx_ssovf > +DEPDIRS-octeontx = $(core-libs) librte_mempool_octeontx librte_eventdev > DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap > DEPDIRS-pcap = $(core-libs) > DIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede > diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile > index 4d6c67c54..827319de5 100644 > --- a/drivers/net/octeontx/Makefile > +++ b/drivers/net/octeontx/Makefile > @@ -62,6 +62,5 @@ endif > CFLAGS_octeontx_rxtx.o += -O3 -Ofast > > LDLIBS += -lrte_eventdev > -LDLIBS += -lrte_pmd_octeontx_ssovf > > include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/net/octeontx/base/octeontx_bgx.h b/drivers/net/octeontx/base/octeontx_bgx.h > index 02aa7e6f4..f740a1d99 100644 > --- a/drivers/net/octeontx/base/octeontx_bgx.h > +++ b/drivers/net/octeontx/base/octeontx_bgx.h > @@ -36,7 +36,7 @@ > #include > #include > > -#include > +#include > > #define OCTEONTX_BGX_COPROC 6 > > diff --git a/drivers/net/octeontx/base/octeontx_pkivf.h b/drivers/net/octeontx/base/octeontx_pkivf.h > index b6e9edc6a..7cf8332c5 100644 > --- a/drivers/net/octeontx/base/octeontx_pkivf.h > +++ b/drivers/net/octeontx/base/octeontx_pkivf.h > @@ -35,7 +35,7 @@ > > #include > > -#include > +#include > > #define OCTEONTX_PKI_COPROC 5 > > -- > 2.13.0 > Reviewed-by: Pavan Nikhilesh