From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0045.outbound.protection.outlook.com [104.47.42.45]) by dpdk.org (Postfix) with ESMTP id 8D7011F716 for ; Sun, 10 Jun 2018 12:39:00 +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:X-MS-Exchange-SenderADCheck; bh=yjue7PHyQ5gxM9XVY56OJlSqZoPNp7MhwDM9E9MgjEU=; b=eShG39AK/PL1zQBcOFLPzMeWxAgdSbL2xOvWFeOpP2p5/wbBiKmO27DdOW/2p3K85+zxFfk/sh1jDUddDqtEzaPLUnPW3Zv1n1M68rr0K6gZ5xBhPFgPoihJlFXI64rZLig88A1+apkLgu+KgMPRHGaqjkhzV19d5FcOZvL2DX0= Received: from jerin (118.143.155.128) by SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.15; Sun, 10 Jun 2018 10:38:54 +0000 Date: Sun, 10 Jun 2018 16:08:39 +0530 From: Jerin Jacob To: Shally Verma Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, dev@dpdk.org, pathreya@caviumnetworks.com, mchalla@caviumnetworks.com, Ashish Gupta , Sunila Sahu Message-ID: <20180610103838.GA5152@jerin> References: <1528194913-25893-1-git-send-email-shally.verma@caviumnetworks.com> <1528194913-25893-2-git-send-email-shally.verma@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528194913-25893-2-git-send-email-shally.verma@caviumnetworks.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [118.143.155.128] X-ClientProxiedBy: CO1PR15CA0101.namprd15.prod.outlook.com (2603:10b6:101:21::21) To SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 3:zXYS2wNjYFJVj3YaY+jF/+iO4iRC1fzMNVkYtGoquK9PXVkUziIxKgusjps1noGoBkh448raW8zm3q3j8z6XpLg7Z4BtZ8KZoVIxyJ/yBcBbYJenaw+sZdYUCR/Uo97mhRpouvfggV3Y2dTH7sntWJw4+j2QJkr0RN6poZ5OJwB42wlc/8x8Ds1U/4xIU/UhlG+1YrzYIj82zktQFxWHPNZ3vKAVwqRzfclTmpi38+Xb8OniSQrIRLUexUGgyxP/; 25:PVvsRdOkmnVWIOxQhD0XpvOyxXVmapuKNKw5EcBrq2mia6he3SqekU+XC/6RoTVQgpUynC3jawexzEAVJ/wlhDQEKcLIgGsXc4ir2fK0wSOLb+k/brlceY8C9ThlISkpdxmuc9DlFSSrxIoNqBiLuxYeTZab2fTNBwRRdfpBim34ChCciAiDEtHbwBySAIvwvhIZjd5UNfgo11CimRm2VtEyW9XBpLwSu4QlnLGErh5psHXxORGIk0ytrtPBAojK8lzN2NS79VjMMTTnHVV5cTTtER9k3sLGbfKNhDqC8Sv6HgXvi2/L/e3cCn/XxgbtA9xFntXJsiW7nRJzIsxfTQ==; 31:G0uQnZ7UthKfzjqt122LHlvwt6ACARxFXGXU3y4DLF4dBy8md3Rc1t1AaQykP45kBxqjdMPpQj9TweWr0CjC2TbbX4GVE3Ht9JMzIcuNZGLY3f8MO7ovMoUuhnE/v4H/oHSl0WWZw1eJe7Fy1NDM2PY9usITKQbVlSE7hV0qGKoulO00zlUb6RSEmMcZeEn8Noolu6AADlPlhB3kpSWX7m22uoMkLKsZsHrZ4uvPmWw= X-MS-TrafficTypeDiagnostic: SN2PR07MB2525: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 20:QCtMCS7d1Vji7aRwzSav66whgZotxQG7uC473Pjyq6cQEg2KtMR9dRNN9WqBG3Wd9oQGNRxiNLusE0t1GhjopocwQbV/uUqwOMjdatwRyAgHQHr2myZ0C9W+ZfvOInbEw10v84xEWPKkkyTiOTeUdwY09AH06dQWvjgTuMvYxhRI02W5IwzVwT9ruBKueLdqIKJZAZ3t3pZ5ROYprwWrKt63oXopsqdQBhRmUUS4Y9I66QBvpXczh34IQBbTLGhng1djUQQNckZHD3m62W95RQ5MNWpjAyqJpnQHTWsUH/P8NoAMMQIxwFGsOBOEpGN1D/xsoNDo4HXZZ8A7AbUmUs6rGkJPb9ULP16WO7lJpEhZDdcCTpr0Ki/BGpPGTEEHi+smAlK7AfhsH7a86MIqsl+K60wVcQrd7DC/XCf4msB+oToeZJVQsU7J4h0VNT/uSxtYwr/j6T97xq15c1grCVTlqfbK5/4HFFCUNvEahdjWAx+folt0k+euw7X0JXOjsnNNm0g1wKdd4zj3sGUtlKCHIcyZkfBp5Wc3qClsCGK6e1DvLIitzJN+/eclRg5F1ebC+JT8HSrZU8qGYKx13ukZ3zIElxZtzVbQIKMsYUc=; 4:sV96K/OzSTzKgLe5HM+3k0YS69KB//Mcl3J5/UcL3ylvUHzfz7mUvnaVz91LzyvlA6acTcy8jmGYaqdZH+BreW/GzCwW7d27cxDMG3YNGoTLPwvAWR8EvimOyGAT2XhFefTkOy2a5qM8lcQl3RqdPI+c7shiOJe5LRzV4ydvpP82prQtxssQ0aomGCAbK2bxpZpFCy26h+zJ4sz0qMIBh1h7wGlzJLgtFj2I+6/EHJMWQ2KG1xiMDevzqION7OBDycvtLRJX8S5o6UYuAjkHqxj4WA1vDLqeyChkDJokHNJj2OtTxYWlNv3zDvHNL0Df X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:SN2PR07MB2525; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2525; X-Forefront-PRVS: 0699FCD394 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(396003)(39850400004)(39380400002)(13464003)(199004)(189003)(8936002)(107886003)(305945005)(486006)(6246003)(44832011)(6862004)(26005)(386003)(4326008)(7736002)(59450400001)(16526019)(6116002)(47776003)(3846002)(1076002)(23726003)(55016002)(52116002)(446003)(76176011)(25786009)(33896004)(478600001)(6496006)(956004)(476003)(11346002)(72206003)(42882007)(53936002)(81166006)(9686003)(81156014)(33716001)(97736004)(33656002)(8676002)(68736007)(58126008)(316002)(16586007)(50466002)(105586002)(6666003)(54906003)(229853002)(66066001)(2906002)(106356001)(575784001)(6636002)(5660300001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2525; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2525; 23:0etlrsmW6TMdCVHcUQSukbTb16Z40GM74HYEypgDw?= =?us-ascii?Q?wyrPvDCRiHlsv8XNeEG2PflD5YLMdypSuo3qvkCXrEZQgxS8PeZ9jVNSvfTU?= =?us-ascii?Q?zAh6AWqI8MSoqdUU6zUJ4QAnbnzFnANJUKYiQfMNA+cFyq1sH9yqIyhwDq8E?= =?us-ascii?Q?WSzzjXf6LWyq0pzA4b5/BqRmvPDw3rxA/lW+rqocYom2IDMHMUoAmEm79B5V?= =?us-ascii?Q?th2Eo3cZVi1Ku0SJvX82ugiroA0FPLbRg3q1ncf7uJc2fGgT545NF7vv4ddw?= =?us-ascii?Q?UK4ylk6K9Sea+3/VcTYvsEZnUV9r3iDc7EDel0BAwpYfCBgSZRuC4C+bUZrN?= =?us-ascii?Q?nYoAQ1lS1/KDw947BwSSjA9znBctAN3NmtUfXmCPyKTQgvFQZSnaSM4rOn/3?= =?us-ascii?Q?jjivYwaKVEDUFg7qSrC7oYHXCI6QMnUmrTi0bSvx3rMuaUSAvGEWapcARBBl?= =?us-ascii?Q?UEy/PGNy1oRqN+qNC9p0cBUP01TWwczX45EKPxMbKcSGCEUJYdmq7AKvB9gJ?= =?us-ascii?Q?oUUWJM5bdjRvaIfPAnzwiEtF2GxEsWsoHaxT9fKSQk14aay2vkdaiuzww6Pt?= =?us-ascii?Q?AZOFC37I78u0uP9caHJ017LpmfW04sRA6J8z54IOo9TwX2o70OjnIQl8sj2X?= =?us-ascii?Q?mUPgYVgzNxRdPlLS3isXFkSieqx815FgII0MRf2jTeJowAUrdqfc0x4qI16M?= =?us-ascii?Q?6DC5KMBUodFsUCJCUXfGOsoYdu3rO81dxBPAUeFocJcZfzMFH56cdGAFkj5s?= =?us-ascii?Q?Q1GGCEjSrofejAXV+Hkk1INFwna/Uv9+gHYWpQIOYgpD/D0yemeWcPYK/Ia4?= =?us-ascii?Q?WFHQz5/+BIJCkphGKcGdo2W/Qf5LuOEdQuY7vGzskRM/xAL7VH8QQ2T04Rdy?= =?us-ascii?Q?xls/8cqcfVDJosJm0mQpn/lfNbJU6EruTzr/XNPEod0bsq3hB/hat/L4JKIv?= =?us-ascii?Q?LdL26kedppV3KXHngqofBLBnMO3uwN1JAk4Ret54pmp1ZgZus2Hs3UgTsOXO?= =?us-ascii?Q?SOaVjX4Bp9bARbnOCfvgz0PXYHVFA+5I1aXKeqUBiWZKi5uac0obCcNmYegn?= =?us-ascii?Q?XRQOlPA1hxGWqntWEoHlOSS6qJdoDWjcDsUmma+aGbxUiIcCFOjOhdFe/Wbp?= =?us-ascii?Q?mXFVeIuWILxi1FkFW9XQ+chSalaJEKL8PJTZW/Y4vRIn66hIKnf4lkUyiZgC?= =?us-ascii?Q?T1/LotzeyDdTkryF3Vnd9U7vDtRw24wYFFrEr6BJq8flr6VeWfcWvtd+fWxX?= =?us-ascii?Q?LbHnqgzQoHWPMb/l2S/RLsKb9fXadDBoj+qZungtpkC+quiLaOgdQlChxsxH?= =?us-ascii?Q?CkvE0La0tJO4AZHjVj7z4RaYm7gr7m6MR/BM7OS+IiFDXcX6BINBvrh72Agt?= =?us-ascii?Q?yxAjpiN8JfgArEuAoWGxqskrL6Y19iVnIOe7Uj41/yCNvp+T0ohCMM/86nVe?= =?us-ascii?Q?M0BaxXrvA=3D=3D?= X-Microsoft-Antispam-Message-Info: bTCzb2m9LzkjT/hOlNPod8r9sZ1Of3n5vqTUBg741oO9N/glX1rLQrjpQQZiiXOiTNFkj1nkV9P+dpJs5/SBqgrF0U/xX5c1hvfoiQtXEvzNOe+tB392NRs39Nj+6aBCCwglxSDMUAUFy6FdJbfmY/BgThtSDCw5xAZTC+576HUA00ykA1HPOxHN55nQzWLu X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 6:nMF037h6NqfFG6YWELJ1dEY8GnEIhuJ3sPen0PPGqVPCNJID/cywj9r0dZjSOsAS4kPEY7XFqWPuEKa2O0vFPuqOUhmnOdeChbveVS84umZdKomhdifIOx7mlNE6Ts5y79oSr1gnOPairbaFhUB6ulI4xNtJNos44468gGoHj5OZ1g6przdeFvht7Zp58Bfh5uecqTZADOvoPsQ22FUzLhGNafjcaOnKc+MwqHpGBVM4PstzW0k5qYVSk3Ir16Ui5H3WpmRg1RgTQr9wrdq90FwkuAAAfnExe9jj94pR5wwlRPRnENj6zMiWxliN/2F9PoQOaPnHQqXXIRmJaUy+vyfSkHtiXb9ymPdFv97KtYA+SzBtDa3at649fqry4G9C1/6gpBpfOB32qxjEEAVqPbwLWDI70tV/fT8t9xYr7IoZ+PCH4nNjkyfujhVEUGR7rNHZujWrKPIOmCDBGRkW/A==; 5:C53wznBcHIRhUOWoNGfJg4pTNYoAsxMk0iOELVlK1x48C8ro9LoIoTOxas4RQ4WnWxJRbGVcP5fcaWaAJrL6beYXli04oyn1fNZfCffEGE7PcQ/zTWa8zBHSupPSd46ePkYsvm6WhN6BrjmkRTZZ2plvtT9F+G1EKRQgR53pFvY=; 24:ZRE8sBsr4NqwV07EQZvPindrabD1DoqdsJXS1ZpjTnvSK59TcTZmk935N+ff03Ov301eKsU5V5ZhqLkKMDRNO072GarFwY0F6z5gUuagxAw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 7:SZKv3bhd0wSdfWRQQe/+I3D/m5MAQgm7p0gRqowTif7BE3Krh3BJ4FpadNN2Cb8wSQ4EKBR3s4ouSq4a0VF3yEafGJiAhUIQfXsPxmx0EU4jkj9BX2Bm6yxtDgb0m+HSlHgJP+MIrj/4Y7a3BsoaMMz5dYOTPNVteBeYsG29urQbIESB9KdLH0nc3MOZS6NbUOXtvJCxUgSSJKRJ60eWL4N7qApH0dDxrne4DIAtvYiWqbe9mQzq9LNhLEA29vmT X-MS-Office365-Filtering-Correlation-Id: 93969817-d839-45ed-ee95-08d5cebe5f6a X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2018 10:38:54.6915 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93969817-d839-45ed-ee95-08d5cebe5f6a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2525 Subject: Re: [dpdk-dev] [PATCH v1 1/7] compress/octeontx: add octeontx zip PMD support 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: Sun, 10 Jun 2018 10:39:01 -0000 -----Original Message----- > Date: Tue, 5 Jun 2018 16:05:07 +0530 > From: Shally Verma > To: pablo.de.lara.guarch@intel.com > CC: fiona.trahe@intel.com, dev@dpdk.org, pathreya@caviumnetworks.com, > mchalla@caviumnetworks.com, Ashish Gupta > , Sunila Sahu > > Subject: [dpdk-dev] [PATCH v1 1/7] compress/octeontx: add octeontx zip PMD > support > X-Mailer: git-send-email 1.9.1 > > Add octeontx zip pmd support in compressdev driver. > Add device probe and remove support. > Update makefile to build octeontx zip pmd > > Signed-off-by: Ashish Gupta > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > --- > config/common_base | 6 + > drivers/compress/Makefile | 2 +- > drivers/compress/octeontx/Makefile | 33 ++++++ > drivers/compress/octeontx/meson.build | 10 ++ > .../octeontx/rte_pmd_octeontx_compress_version.map | 3 + > drivers/compress/octeontx/zip_pmd.c | 129 +++++++++++++++++++++ > drivers/compress/octeontx/zipvf.c | 48 ++++++++ > drivers/compress/octeontx/zipvf.h | 47 ++++++++ > usertools/dpdk-devbind.py | 9 ++ > 9 files changed, 286 insertions(+), 1 deletion(-) > > diff --git a/config/common_base b/config/common_base > index 6b0d1cbbb..e56d14b7f 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -584,6 +584,12 @@ CONFIG_RTE_COMPRESS_MAX_DEVS=64 > # > CONFIG_RTE_COMPRESSDEV_TEST=n > > +# > +# Compile PMD for Octeontx ZIPVF compression device > +# > +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF=n Please enable this option by default, If there are arm64 specific usage then please stub it out so that it can compile on all architectures. It will help to verify the API changes across the architecture by author.(i.e author should not depend arm64 box to verify the compilation changes) > +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF_DEBUG=n This config option is not required when we are using dynamic debugging. > + > # > # Compile PMD for ISA-L compression device > # > diff --git a/drivers/compress/Makefile b/drivers/compress/Makefile > index 592497f51..62b4e5abe 100644 > --- a/drivers/compress/Makefile > +++ b/drivers/compress/Makefile > @@ -4,5 +4,5 @@ > include $(RTE_SDK)/mk/rte.vars.mk > > DIRS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += isal > - > +DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += octeontx > include $(RTE_SDK)/mk/rte.subdir.mk > diff --git a/drivers/compress/octeontx/Makefile b/drivers/compress/octeontx/Makefile > new file mode 100644 > index 000000000..89078f085 > --- /dev/null > +++ b/drivers/compress/octeontx/Makefile > @@ -0,0 +1,33 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2017-2018 Cavium Network We are using the following copyright header across DPDK, Please use the same schematics new. example: Copyright(c) 2017 Cavium, Inc > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# library name > +LIB = librte_pmd_octeontx_zip.a > + > +# library version > +LIBABIVER := 1 > + > +# build flags > +CFLAGS += $(WERROR_FLAGS) > +CFLAGS += -O3 > +CFLAGS += -DALLOW_EXPERIMENTAL_API > +CFLAGS += -I$(RTE_SDK)/drivers/compress/octeontx/include > + > +# external library include paths > +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > +LDLIBS += -lrte_compressdev > +LDLIBS += -lrte_pci -lrte_bus_pci > + > +# library source files > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += zip_pmd.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_ZIPVF) += zipvf.c > + > +# export include files > +SYMLINK-y-include += > + > +# versioning export map > +EXPORT_MAP := rte_pmd_octeontx_compress_version.map > + > +include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build > new file mode 100644 > index 000000000..cce404337 > --- /dev/null > +++ b/drivers/compress/octeontx/meson.build > @@ -0,0 +1,10 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2018 Cavium Networks > + > +sources = files('zipvf.c', 'zip_pmd.c') > +allow_experimental_apis = true > +includes += include_directories('include') > +deps += ['mempool_octeontx', 'bus_pci'] > +ext_deps += dep > + > + > diff --git a/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map b/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map > new file mode 100644 > index 000000000..33c1b976f > --- /dev/null > +++ b/drivers/compress/octeontx/rte_pmd_octeontx_compress_version.map > @@ -0,0 +1,3 @@ > +EXPERIMENTAL { > + local: *; > +}; > diff --git a/drivers/compress/octeontx/zip_pmd.c b/drivers/compress/octeontx/zip_pmd.c > new file mode 100644 > index 000000000..1181bed19 > --- /dev/null > +++ b/drivers/compress/octeontx/zip_pmd.c > @@ -0,0 +1,129 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2017-2018 Cavium Networks > + */ > + > +#include > +#include > +#include > +#include > +#include Use alphabetical order. > +#include "zipvf.h" > + > +/* global structure to keep driver info */ > +struct zip_pmd_private zip_pmd_priv; Remove global memory. Use name based memzone infrastructure to allocate the memory. > + > +static int > +zip_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, > + struct rte_pci_device *pci_dev) > +{ > + int ret = 0; > + char compressdev_name[RTE_COMPRESSDEV_NAME_MAX_LEN]; > + struct rte_compressdev *compressdev; > + struct rte_compressdev_pmd_init_params init_params = { > + "", > + rte_socket_id(), > + }; > + > + ZIP_PMD_INFO("vendor_id=0x%x device_id=0x%x", > + (unsigned int)pci_dev->id.vendor_id, > + (unsigned int)pci_dev->id.device_id); > + > + rte_pci_device_name(&pci_dev->addr, compressdev_name, > + sizeof(compressdev_name)); > + > + compressdev = rte_compressdev_pmd_create(compressdev_name, > + &pci_dev->device, sizeof(struct zip_vf), &init_params); > + if (compressdev == NULL) { > + ZIP_PMD_ERR("driver %s: create failed", init_params.name); > + return -ENODEV; > + } > + > + /* > + * create only if proc_type is primary. > + */ > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + /* create vf dev with given pmd dev id */ > + ret = zipvf_create(compressdev, zip_pmd_priv.num_zipvfs); > + if (ret < 0) { > + ZIP_PMD_ERR("Device creation failed"); > + rte_compressdev_pmd_destroy(compressdev); > + return ret; > + } > + } > + > + /* TBD: check if driver global structure to be shared > + * too among processes. if yes, then zip_pmd_priv > + * had to be allocated from shared memzone. Currently > + * it is in global data segment > + */ > + zip_pmd_priv.zipvf_table[zip_pmd_priv.num_zipvfs] = > + compressdev->data->dev_private; > + zip_pmd_priv.num_zipvfs++; > + > + compressdev->dev_ops = &octtx_zip_pmd_ops; > + /* register rx/tx burst functions for data path */ > + compressdev->dequeue_burst = zip_pmd_dequeue_burst_sync; > + compressdev->enqueue_burst = zip_pmd_enqueue_burst_sync; > + compressdev->feature_flags = RTE_COMPDEV_FF_HW_ACCELERATED; > + return ret; > +} > + > +static int > +zip_pci_remove(struct rte_pci_device *pci_dev) > +{ > + struct rte_compressdev *compressdev; > + char compressdev_name[RTE_COMPRESSDEV_NAME_MAX_LEN]; > + > + if (pci_dev == NULL) { > + ZIP_PMD_ERR(" Invalid PCI Device\n"); > + return -EINVAL; > + } > + rte_pci_device_name(&pci_dev->addr, compressdev_name, > + sizeof(compressdev_name)); > + > + compressdev = rte_compressdev_pmd_get_named_dev(compressdev_name); > + if (compressdev == NULL) > + return -ENODEV; > + > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + if (zipvf_destroy(compressdev) < 0) > + return -ENODEV; > + } > + return rte_compressdev_pmd_destroy(compressdev); > +} > + > + > + > +static struct rte_pci_id pci_id_octtx_zipvf_table[] = { > + { > + RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, > + PCI_DEVICE_ID_OCTEONTX_ZIPVF), > + }, > + { > + .device_id = 0 > + }, > +}; > + > +/** > + * Structure that represents a PCI driver > + */ > +static struct rte_pci_driver octtx_zip_pmd = { > + .id_table = pci_id_octtx_zipvf_table, > + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > + .probe = zip_pci_probe, > + .remove = zip_pci_remove, > +}; > + > +RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd); > +RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table); > + > +RTE_INIT(octtx_zip_init_log); > + > +static void > +octtx_zip_init_log(void) > +{ > + octtx_zip_logtype_driver = rte_log_register("comp_octeontx_zip"); > + if (octtx_zip_logtype_driver >= 0) > + rte_log_set_level(octtx_zip_logtype_driver, RTE_LOG_INFO); > +} > + > + > +#endif /* _RTE_ZIP_VF_H_ */ > diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py Addition to usertools/dpdk-devbind.py, please send it as separate patch as it is an common code change