From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 6F15F1B73F for ; Thu, 5 Jul 2018 13:21:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2018 04:21:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,312,1526367600"; d="scan'208";a="70269585" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga001.jf.intel.com with ESMTP; 05 Jul 2018 04:21:10 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by irsmsx110.ger.corp.intel.com ([169.254.15.152]) with mapi id 14.03.0319.002; Thu, 5 Jul 2018 12:21:09 +0100 From: "De Lara Guarch, Pablo" To: "Verma, Shally" , "Gupta, Ashish" , "Trahe, Fiona" , "Daly, Lee" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3 4/4] compressdev: add huffman encoding flags Thread-Index: AQHUE+SrQSqs5ANIwEyRF3UPZJfc2qSAN84AgAA0FyA= Date: Thu, 5 Jul 2018 11:21:09 +0000 Message-ID: References: <20180627055031.24394-1-pablo.de.lara.guarch@intel.com> <20180704141037.44021-1-pablo.de.lara.guarch@intel.com> <20180704141037.44021-4-pablo.de.lara.guarch@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjQ3MWEyMmUtNDUwYi00ZWQ5LWE3NDktZTQzZmYxM2I5NWIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRHFneGFzVFdhSm5YaUxlYUFcL2tDVk4yam10NWtXaGtUd0ZubWhpcDNyMmpLQ3NJbkdqRVVRbk5CaUhFTEh6eFAifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags 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: Thu, 05 Jul 2018 11:21:14 -0000 > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 9:14 AM > To: De Lara Guarch, Pablo ; Gupta, Ashish > ; Trahe, Fiona ; Daly, Le= e > > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 4/4] compressdev: add huffman encoding flags >=20 >=20 >=20 > >-----Original Message----- > >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 04 July 2018 19:41 > >To: Verma, Shally ; Gupta, Ashish > >; fiona.trahe@intel.com; lee.daly@intel.com > >Cc: dev@dpdk.org; Pablo de Lara > >Subject: [PATCH v3 4/4] compressdev: add huffman encoding flags > > > >External Email > > > >Added Huffman fixed and dynamic encoding feature flags, so an > >application can query if a device supports these two types, when > >performing DEFLATE compression. > > > >Signed-off-by: Pablo de Lara > >Acked-by: Fiona Trahe > >--- > > > >Changes in v3: > > > >- No change > > > >Changes in v2: > > > >- Fixed typo > > > > drivers/compress/isal/isal_compress_pmd_ops.c | 4 +++- > > lib/librte_compressdev/rte_comp.c | 4 ++++ > > lib/librte_compressdev/rte_comp.h | 4 ++++ > > test/test/test_compressdev.c | 16 ++++++++++++++++ > > 4 files changed, 27 insertions(+), 1 deletion(-) > > >=20 > //snip >=20 > >diff --git a/lib/librte_compressdev/rte_comp.c > >b/lib/librte_compressdev/rte_comp.c > >index f5bd3a6c0..5ed1d0daa 100644 > >--- a/lib/librte_compressdev/rte_comp.c > >+++ b/lib/librte_compressdev/rte_comp.c > >@@ -36,6 +36,10 @@ rte_comp_get_feature_name(uint64_t flag) > > return "SHA2_SHA256_HASH"; > > case RTE_COMP_FF_SHAREABLE_PRIV_XFORM: > > return "SHAREABLE_PRIV_XFORM"; > >+ case RTE_COMP_FF_HUFFMAN_FIXED: > >+ return "HUFFMAN_FIXED"; > >+ case RTE_COMP_FF_HUFFMAN_DYNAMIC: > >+ return "HUFFMAN_DYNAMIC"; > > default: > > return NULL; > > } > >diff --git a/lib/librte_compressdev/rte_comp.h > >b/lib/librte_compressdev/rte_comp.h > >index 6660cee82..c9245cce1 100644 > >--- a/lib/librte_compressdev/rte_comp.h > >+++ b/lib/librte_compressdev/rte_comp.h > >@@ -62,6 +62,10 @@ extern "C" { > > * to create as many priv_xforms as it expects to have stateless > > * operations in-flight. > > */ > >+#define RTE_COMP_FF_HUFFMAN_FIXED (1ULL << 13) > >+/**< Fixed huffman encoding is supported */ > >+#define RTE_COMP_FF_HUFFMAN_DYNAMIC (1ULL << 14) > >+/**< Dynamic huffman encoding is supported */ > > >=20 > [Shally] As such okay to have this feature. But while looking at this, go= t a > question: >=20 > rte_compressdev_info_get() returns feature flags of type > RTE_COMPDEV_FF_xxx and, rte_compressdev_capability_get() returns PMD > capability for specific algo using feature flags of type RTE_COMP_FF_xxx.= So, >=20 > 1. should rte_compressdev_capability_get() and "struct > rte_compressdev_capabilities" be changed to > rte_compressdev_comp_capability_get() or > rte_compressdev_algo_capability_get()? I would prefer to leave it as it is, as it matches the function name in cry= ptodev, which is doing something similar. However, I don't have an strong opinion on this. Maybe Fiona can break the = tie? :) >=20 > 2. where does RTE_COMPDEV_FF_HW_ACCELERATED be set? in dev_info- > >feature flag or capability->feature_flag? > What if PMD support hw acceleration of one algo but have sw support of > another. (say, deflate HW accelerated and LZS sw?) It is set in dev_info->feature_flag. As far as I know, this is not expected. HW_ACCELERATED should apply to the = whole device. The device will be either hardware or software. If it is hardware, but it u= ses software-based Implementation for an algorithm, still the device is hardware. >=20 > Thanks > Shally