From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700068.outbound.protection.outlook.com [40.107.70.68]) by dpdk.org (Postfix) with ESMTP id 6839F1B446 for ; Sat, 7 Jul 2018 08:36:37 +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=MsZVzyrOqfIm46KaO7urGRsJkIw5fvE4MZ42P0S2zyE=; b=SztarZHBLFFa0VASCnoXnqhNyVSk+3a1V/2cLdL69lzQwPqr4nBnTSkz5z0ayqnn/B9hKovfWEANdO3vYmHA4g9aweYrn8pGj6JbnzgNmI/abUcTcsHkSvMMuocY1VviMzKm0sdTrR5LETW2FRjwWFVycQu2+4stw+g/xISWL4U= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3731.namprd07.prod.outlook.com (52.132.102.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Sat, 7 Jul 2018 06:36:36 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927%2]) with mapi id 15.20.0930.016; Sat, 7 Jul 2018 06:36:35 +0000 From: "Verma, Shally" To: Pablo de Lara , "Gupta, Ashish" , "fiona.trahe@intel.com" , "lee.daly@intel.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v5 4/4] compressdev: add huffman encoding flags Thread-Index: AQHUFS33/miyucyQ9kGpKoFF2s1IbaSDTyDg Date: Sat, 7 Jul 2018 06:36:35 +0000 Message-ID: References: <20180627055031.24394-1-pablo.de.lara.guarch@intel.com> <20180706052801.12901-1-pablo.de.lara.guarch@intel.com> <20180706052801.12901-4-pablo.de.lara.guarch@intel.com> In-Reply-To: <20180706052801.12901-4-pablo.de.lara.guarch@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [171.49.225.192] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3731; 7:prjFj4Dvqt/xaQcnhyf0HpXeFbkVecmlQIePEJRL3p7JXn9rzaE1gY0lyMfM1M2JYVowBN8eL2dIKAhHMXFKpFk0ruQaiXGCGAtScNxUKhPdw3oRa9GYkF9HyGeh0B40+1/0vML/4EysybJlTXI7tp36iStuV69P+hJiJkCGUXSHJ5iOq5p15e+cPboSYgZ3rjpW/OWYpMD6J81s20TjmprKNgqsMlIXrKG0m1r+Y1dCArwWaRsMhpDL8s/kRa4N x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(396003)(39850400004)(376002)(136003)(346002)(199004)(189003)(13464003)(55016002)(8936002)(14454004)(229853002)(575784001)(2201001)(86362001)(72206003)(478600001)(9686003)(4326008)(33656002)(316002)(97736004)(25786009)(106356001)(110136005)(26005)(81166006)(3846002)(7696005)(6116002)(105586002)(53936002)(6436002)(186003)(14444005)(256004)(81156014)(2501003)(68736007)(8676002)(76176011)(5250100002)(5660300001)(55236004)(305945005)(6506007)(486006)(11346002)(2906002)(102836004)(6246003)(74316002)(476003)(99286004)(446003)(2900100001)(66066001)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3731; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: 8fced873-6de5-473f-7d64-08d5e3d3fc84 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3731; x-ms-traffictypediagnostic: CY4PR0701MB3731: 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)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3731; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3731; x-forefront-prvs: 0726B2D7A6 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: L/gYhhJMRfO89XIwSAM/X/mD2bTqVVJ29lE8Hg5EEOzt/v2tPB6qQgreYtskQPOF5MBzk48MtXbPfEC6PPRSC66VEmgBj0D4I9I5r94itDbDIBqRUH7G5ZmaN7vh2kc9xUTlQ8o80SJguvraHQxCGpe6tfyn1X0zPkMXynB6OYBvmfmb3Djitq/GIZ3+t5j4gSY1MfB22XQ2j4WqaxWP0RdVd1B01ghUeaMyYYjvOSut5Je+qUWHjHthiQQx0hckihuNWYl5w8HQs2SvfYcNd6LhGfHzeg+S3uMlkge7jDdxcDJ6uddRFzbXjwaNdQ/4FN2+2Bz+13+/zaLbf0jgXT+JMJhbAXLBhRgdwNeaKz0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fced873-6de5-473f-7d64-08d5e3d3fc84 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2018 06:36:35.6001 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3731 Subject: Re: [dpdk-dev] [PATCH v5 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: Sat, 07 Jul 2018 06:36:37 -0000 >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 10:58 >To: Verma, Shally ; Gupta, Ashish ; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara >Subject: [PATCH v5 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 Acked-by: Shally Verma Thanks Shally >--- > >v5-v3: >- No change > >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(-) > >diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compr= ess/isal/isal_compress_pmd_ops.c >index 970a0413b..585f22802 100644 >--- a/drivers/compress/isal/isal_compress_pmd_ops.c >+++ b/drivers/compress/isal/isal_compress_pmd_ops.c >@@ -12,7 +12,9 @@ > static const struct rte_compressdev_capabilities isal_pmd_capabilities[] = =3D { > { > .algo =3D RTE_COMP_ALGO_DEFLATE, >- .comp_feature_flags =3D RTE_COMP_FF_SHAREABLE_PRIV_XFORM= , >+ .comp_feature_flags =3D RTE_COMP_FF_SHAREABLE_PRIV_XFORM= | >+ RTE_COMP_FF_HUFFMAN_FIXED | >+ RTE_COMP_FF_HUFFMAN_DYNAMIC, > .window_size =3D { > .min =3D 15, > .max =3D 15, >diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rt= e_comp.c >index 97ea0d922..98ad0cfd9 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/rt= e_comp.h >index 274b5eadf..1f66945ee 100644 >--- a/lib/librte_compressdev/rte_comp.h >+++ b/lib/librte_compressdev/rte_comp.h >@@ -63,6 +63,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 */ > > /** Status of comp operation */ > enum rte_comp_op_status { >diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c >index 640942bac..f960963a4 100644 >--- a/test/test/test_compressdev.c >+++ b/test/test/test_compressdev.c >@@ -846,6 +846,14 @@ test_compressdev_deflate_stateless_fixed(void) > const char *test_buffer; > uint16_t i; > int ret; >+ const struct rte_compressdev_capabilities *capab; >+ >+ capab =3D rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE)= ; >+ TEST_ASSERT(capab !=3D NULL, "Failed to retrieve device capabiliti= es"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) =3D=3D= 0) >+ return -ENOTSUP; >+ > struct rte_comp_xform *compress_xform =3D > rte_malloc(NULL, sizeof(struct rte_comp_xform), 0)= ; > >@@ -905,6 +913,14 @@ test_compressdev_deflate_stateless_dynamic(void) > struct rte_comp_xform *compress_xform =3D > rte_malloc(NULL, sizeof(struct rte_comp_xform), 0)= ; > >+ const struct rte_compressdev_capabilities *capab; >+ >+ capab =3D rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE)= ; >+ TEST_ASSERT(capab !=3D NULL, "Failed to retrieve device capabiliti= es"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) =3D= =3D 0) >+ return -ENOTSUP; >+ > if (compress_xform =3D=3D NULL) { > RTE_LOG(ERR, USER1, > "Compress xform could not be created\n"); >-- >2.14.4