From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0054.outbound.protection.outlook.com [104.47.38.54]) by dpdk.org (Postfix) with ESMTP id 489B21B7DE for ; Tue, 17 Oct 2017 11:49:34 +0200 (CEST) Received: from BN3PR03CA0053.namprd03.prod.outlook.com (10.167.1.141) by CY4PR03MB2695.namprd03.prod.outlook.com (10.173.43.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 17 Oct 2017 09:49:32 +0000 Received: from BN1AFFO11FD046.protection.gbl (2a01:111:f400:7c10::101) by BN3PR03CA0053.outlook.office365.com (2a01:111:e400:7a4d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Tue, 17 Oct 2017 09:49:32 +0000 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 BN1AFFO11FD046.mail.protection.outlook.com (10.58.53.61) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 17 Oct 2017 09:49:31 +0000 Received: from [10.232.133.65] (B10814-12.ap.freescale.net [10.232.133.65]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9H9nQTu000498; Tue, 17 Oct 2017 02:49:27 -0700 To: Santosh Shukla , References: <20171016134247.5431-1-santosh.shukla@caviumnetworks.com> CC: , , From: Hemant Agrawal Message-ID: <36f3ca70-b038-724a-1364-38f1d9455ea9@nxp.com> Date: Tue, 17 Oct 2017 15:19:26 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171016134247.5431-1-santosh.shukla@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131527073722089041; (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)(336005)(7966004)(346002)(39380400002)(39860400002)(376002)(2980300002)(1110001)(1109001)(339900001)(24454002)(377454003)(189002)(199003)(2950100002)(77096006)(86362001)(81156014)(81166006)(575784001)(33646002)(4326008)(53376002)(8676002)(6306002)(68736007)(189998001)(50986999)(105606002)(6246003)(76176999)(23746002)(229853002)(53936002)(8936002)(106466001)(31696002)(54356999)(230700001)(104016004)(5660300001)(65826007)(58126008)(356003)(97736004)(36756003)(31686004)(69596002)(53546010)(110136005)(966005)(64126003)(50466002)(65806001)(2906002)(305945005)(316002)(498600001)(83506001)(54906003)(47776003)(65956001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2695; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD046; 1:AGV3lyawSaereX/HJm3p5wzJqeOdIN38IfMNVfI8ZvOxvt0IIQ1lc8aeu7eqz/206D7bS+Xm05Y0L0HJb2JOQy3sP89kDZe6I+agloPbAsjUL3Lx3QR0lL5rK7Flh1cF X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03619c00-c1fa-4a56-3e51-08d515445e04 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2695; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 3:WJAsjf7no1t/rldl7SDhMqMOkkDIYl0+tm7PPKjvf9Mu26dvth+RfWhvdi7Q59PIu4sDB1AFIsMAMqS7ZCLDbvhyZB7xMu+1m+VDXkTR6PRlgFNw4Aa0VNJh6ebIf/fxYuZC3/dXsHnmKF9XJeZ+AYvKtj6I48Or7yf30YHI+be40GblNRr7tSKXfTULWPYrFyqzgX850bnOriYh/oYw8MXG7r+4D/HV0BsZpsY+ezfWtgCm/AnoL1HfU5VCQFl+xFcA1dknN+6h304INjRaG7Ygj+U2CYgD2G3wyxsqn2K1mkyVVmkeRCz3G3S5FjtJfQjoPBD/8iBlsAdm5lvfIeNfCFUHYm84ZDZ8cNWmtLQ=; 25:XugYoARe6JDU0zvDuNqhKoV0GAO8AMjd2hoHaDEsBB35AgjcvYgOhHnVoHLDF9BjnHDbvGT6krCyz5SEWRyANTCwoXa0BBTTZVIsw7b2hIDYBN8ww0esx6/YH7gbSVI8DhpnIMk+ITBEhWGVhOoQdLLbqXFQ4o8rFzrax8A2ZI/d9Bbigom+UUf39SaJhHLYlR5qK5T10tHU636oSGdRI9nvIyDvX4XlyjNJpHI8wQkE/om3e8Gn3gIyaGo/obClDnnHIdaMEl6f0lmtms/kHiZcFGaY6qTkef0OXRqN7eCO8FOQzyNlZu5rXLTRd0UNfxibnfSu5jD3RnR5lk9bew== X-MS-TrafficTypeDiagnostic: CY4PR03MB2695: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 31:Xqbs01OVvLWSunZGGoMcd+NJg3RTDk1Q0i8K4qGrkHQfGUB2n5GmX4u+fGSz9Srtq9JSMGFwKWQfESM3qowmcoWEz2UoXhzASCIp/4xeCDJFlxdWncAnjA6dNHYeC2R/wq4VhMCiQoy3SUJe3rosSxBFBZR/Kmt5rhkq9tOu66jy0PtPNUW9HHzBrsCxa5QAhl8lfkD6lOcN4XRhA/QTnMSzm1O03p8j+aw10HOk/ls=; 4:w0QieM3V9urRzDceyaNlQlqAIaQ7k38/xTwubx3Mhcr5TChqtSXIYeLWPVzj5nBAGuLOqrDo+B9Qj51UHulstPgSqziUvPSBwZpIDv21lLWKgKubULoKlX0obYSH3VBFeK1qNfFp/BNA6VItFXy5GSMibnl1oVscpGzLJjTaT9p4ohxjZ/A10cP9Vz9tkquDJcjrfj6kwRXcsdsRU99OgfH0o4pB/OcJ2RnhxESVrtNchfSnjSzUV+3/u0SodGFJj55KZnwnXGD4/QibERFjRo1BF33jxJ2N895XmxM9YZ8= 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)(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123561025)(20161123556025)(20161123559100)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2695; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2695; X-Forefront-PRVS: 04631F8F77 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY4PR03MB2695; 23:44Z4xgxzUVrIQ+ZCQCezkpHbv8InGh7cxj9G6?= =?Windows-1252?Q?MGA+NuaG7u+z8RwPIBAa/bXNOOTeemaJRsGAQ968hxNAGoHOAdbisn4c?= =?Windows-1252?Q?tvdOE3+o6WrWEqwkMV6qiQP4tZelOnLCaGrHDtNNeYa/eNyb0SknSArV?= =?Windows-1252?Q?+1wyzQiivXUnuk0fPAtxMYjdXkLJLVKLVzB6TJaiLdw2jeUTVGPsflRj?= =?Windows-1252?Q?uBZsOLr0NCdRDiD+AfqYmWySju4Zf2aYsuiuT6ki8C/ANQsk+lGgS9a7?= =?Windows-1252?Q?owXxn5Am8T3QwJAeuNhr0lXiVRaSRR+2hJAKp1JzpHDY+G80BMIGHLUg?= =?Windows-1252?Q?dkk5KgQcFooZSwKQM3r5iJn7keWOQCds78OkTVUatnwl2F2eJ8oBNg+H?= =?Windows-1252?Q?BktGw1cNgqCa9f5uI2E6Hm9k1h+k6lav74hnpecvMgoynLRb4VoL9MIm?= =?Windows-1252?Q?Oeb0TyxlcUsL+Ft2r4O2rxGMRgunHOriZm4DeiZFmEyM1LTuYc8m6gFp?= =?Windows-1252?Q?xuVeXjlcEIkJtVNS/qmTG+kPWZcI07QYZZgVS7ni1J2KCI9KDVSI1+lE?= =?Windows-1252?Q?dZve4+p/Dpye5Hno6s/jAmewl1pP6oqk6hS0AjO3PhIZlDU46qQRf/zG?= =?Windows-1252?Q?wYyNOaWcwFnz/LlCaQlSj/vyigYRbv7MwYRqRaKC2sZEmo4aNd4epZv/?= =?Windows-1252?Q?Ves2EiYfmyzQ6XeaJcF1Iz/kzFTnTuWOWYup32oU32Q/rP7YSM8pE1bh?= =?Windows-1252?Q?splbVuaFH5gwzCA+F3i9DsRtXKruUkY7z4XUSywxWQV71FXanVufQgw7?= =?Windows-1252?Q?MjCIQeDSWXSbqHTs4P3zMllLY6Q3hyFPvP6y6/e6nh2I8nDFDurHg2Dm?= =?Windows-1252?Q?8B9gw1MbWqcnKATT4UzcKkeavoJD7nDW2sKDc0O/DF5pMd3S89/TD7RF?= =?Windows-1252?Q?w8cmt1VpXKdZPSKjd/FBVsSL9xv/W6uQyKi+C/0NUIyOgBZuAJmHZoE8?= =?Windows-1252?Q?rPLeDh6C+5/qoioPDEN+bPGf6WkCd8/xLoowjToXxyRoZxVfWnokYrmI?= =?Windows-1252?Q?YWFtnUJxUTKqN/pWCqUYcMd2vWkLeAqnKSc6ROAGUvPPUjP8EE9zrpDp?= =?Windows-1252?Q?KoH9ZWUyvmMB2kNHURD04sMf6DGeHHVsaduH32dNdewSHKSZwetrF0Ky?= =?Windows-1252?Q?8wR8wf2oHkImpIA4TgOnMck3lgeyJO+YVtbIj3vXT+sEnlY72sQkoC8u?= =?Windows-1252?Q?TBv6M5IAOjvQ7XlZ5dRdYXMWkkJZkgYANbKIo2kZKm+rQJmo7NFmPyFz?= =?Windows-1252?Q?h9VovgSoFky8PXKUPPp67x1HGZhIjdhmXNBFsGI8Pf6LhgCnWxVuiipy?= =?Windows-1252?Q?Dmy77tOjunsFAlbyaS/xnAMoOz7LPf0aKS55mebVpzyejGZ2YTclgd97?= =?Windows-1252?Q?r4gOfqSNm/ne6rODINWumz0JT4ss8I+EqpCaJQc/HNwHnZOALmfOPEVq?= =?Windows-1252?Q?GF20ZtgAhsIIR8tfppxA/l/UDFJsyoNqBFYUe0nmPWew853EMxh4sLOp?= =?Windows-1252?Q?yl4m47BC0vRoXgEme3em+N+7w3an28+87nO?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 6:qfYzrF35xTLYQVaFkbCpuw79K0NR8dDlALIYSaD9/+rxvrFw8e9jzDcbH+g91TKiXnlrHx3vJmpGenhN0O2vo+WoEoyFFqtX4xII/pzXBqosSA909DkCnRMHV5o95deMAdxjY9wQBwUEA2tzDMlg9tYx2IMjFgnVD5uY41UolZqZpEY+msR82/XN0YtMNDT6K3BGemk9vFUc4wrjGTqTeNCWqwxInog/wog7zTnJBfGsc6lK5o4A0QUUncvOmLdFRe0sOTcAi9txsJ3NorhqiyNY6nO16YgHl9tarVXNAFYH+xslnb0PJt7F6wlI0S7/8TXvrELXoDImuBpQFTS/Mw==; 5:NKVCkJUss+v7DuP9frM1NL5Tp3n5rKWAu5KJqSoHGRMoRgFM+xD6J2MVAYvp5uTipKOT1+XLvMNuPmhnqRlpG7TqOZyxDwKIIcn8kVKMaDYDfS4JRZpY+yxH/ZCAtW5MtZM0Cq/+A6+RrMOY++xVaA==; 24:CwUCUff5NVRExAcE/xPCSTglb9gwSlbHXTRXVYVqNQoJZag8pm09fsuzXpgz+nM7nfMpLJzZKckbMdUPtre+z22wNjXE1XcFItGKlQN9SmE=; 7:qyk3nj+t4hz3we3f41WC+AZu+rWlGYEbh5ErX/9SzNXWIfEI3dM90t3jNjjwv87Lmqb5FX5zMYWOZxrbCT+CxWaodQiks9lSUXFZOPjbV06WhXNZBz9Gt10OX1WRj83AAMJD+yoe0uMLiTG8csDcJMNP47mNwDD1hSx1Py5Om3Kj/aYIF6Z+2m3fRGpealPcpi5gR/KJhanlxyWC3/FPW1yK/lZK2f721OCpNxDnqP4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2017 09:49:31.9905 (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: CY4PR03MB2695 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: Tue, 17 Oct 2017 09:49:34 -0000 Thanks! this patch solves the issue. Tested-by: Hemant Agrawal On 10/16/2017 7:12 PM, 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 > >