From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 736E62C5 for ; Tue, 24 Apr 2018 11:45:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 02:45:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,322,1520924400"; d="scan'208";a="44195826" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by FMSMGA003.fm.intel.com with ESMTP; 24 Apr 2018 02:45:11 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.155]) by IRSMSX104.ger.corp.intel.com ([169.254.5.171]) with mapi id 14.03.0319.002; Tue, 24 Apr 2018 10:45:11 +0100 From: "De Lara Guarch, Pablo" To: "Daly, Lee" , "dev@dpdk.org" CC: "Tucker, Greg B" , "Jain, Deepak K" , "Trahe, Fiona" Thread-Topic: [PATCH v3 04/11] compress/isal: add private xform related ops Thread-Index: AQHT1lEGArs4nO5xOkeeQKxvT9VP1aQPsI/w Date: Tue, 24 Apr 2018 09:45:10 +0000 Message-ID: References: <1523038388-29964-1-git-send-email-lee.daly@intel.com> <1523972132-6894-1-git-send-email-lee.daly@intel.com> <1523972132-6894-5-git-send-email-lee.daly@intel.com> In-Reply-To: <1523972132-6894-5-git-send-email-lee.daly@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmYzNWRkMDMtOTAyYy00NzViLTllMTItMzIxYzlhMGQ2NDA3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhsTTJobW81dk81XC9PaWJpSXdJQ3VhOGt0eVdJbm02WWRqaU9HR2Z2TWdrPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 04/11] compress/isal: add private xform related ops 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, 24 Apr 2018 09:45:15 -0000 > -----Original Message----- > From: Daly, Lee > Sent: Tuesday, April 17, 2018 2:35 PM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Tucker, Greg = B > ; Jain, Deepak K ; Trah= e, > Fiona ; Daly, Lee > Subject: [PATCH v3 04/11] compress/isal: add private xform related ops >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 187 > ++++++++++++++++++++++ > drivers/compress/isal/isal_compress_pmd_ops.c | 96 ++++++++++- > drivers/compress/isal/isal_compress_pmd_private.h | 12 ++ > 3 files changed, 292 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/compress/isal/isal_compress_pmd.c > b/drivers/compress/isal/isal_compress_pmd.c > index 8e658b4..8db6380 100644 > --- a/drivers/compress/isal/isal_compress_pmd.c > +++ b/drivers/compress/isal/isal_compress_pmd.c > @@ -9,8 +9,195 @@ >=20 > #include "isal_compress_pmd_private.h" >=20 > +#define RTE_COMP_ISAL_WINDOW_SIZE 15 > +#define RTE_COMP_ISAL_LEVEL_ZERO 0 /* ISA-L Level 0 used for fixed > +Huffman */ #define RTE_COMP_ISAL_LEVEL_ONE 1 #define > +RTE_COMP_ISAL_LEVEL_TWO 2 #define RTE_COMP_ISAL_LEVEL_THREE 3 /* > +Optimised for AVX512 & AVX2 only */ > + > int isal_logtype_driver; >=20 > +/* Verify and set private xform parameters */ int > +isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform, > + const struct rte_comp_xform *xform) > +{ > + if (xform =3D=3D NULL) > + return -EINVAL; > + > + /* Check for chained xforms */ > + if (xform->next !=3D NULL) { > + ISAL_PMD_LOG(ERR, "Chained xforms not supported\n"); > + return -ENOTSUP; > + } The next pointer will be removed in the API v6 patchset, so you can remove = this. ... > +++ b/drivers/compress/isal/isal_compress_pmd_ops.c > @@ -16,7 +16,56 @@ static int > isal_comp_pmd_config(struct rte_compressdev *dev __rte_unused, > struct rte_compressdev_config *config __rte_unused) { Remove the __rte_unused here, as you are now using these structure pointers= . ... > git a/drivers/compress/isal/isal_compress_pmd_private.h > b/drivers/compress/isal/isal_compress_pmd_private.h > index efbe68b..5c27939 100644 > --- a/drivers/compress/isal/isal_compress_pmd_private.h > +++ b/drivers/compress/isal/isal_compress_pmd_private.h > @@ -30,6 +30,18 @@ struct isal_comp_qp { > uint16_t num_free_elements; > } __rte_cache_aligned; >=20 > +/** ISA-L private xform structure */ > +struct isal_priv_xform { > + enum rte_comp_xform_type type; > + struct rte_comp_compress_xform compress; > + struct rte_comp_decompress_xform decompress; } Xform will be either for compression or decompression, so use a union with compress and decompress structures inside.