> -----Original Message----- > From: Daly, Lee > Sent: Tuesday, April 17, 2018 2:35 PM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Tucker, Greg B > <greg.b.tuc...@intel.com>; Jain, Deepak K <deepak.k.j...@intel.com>; Trahe, > Fiona <fiona.tr...@intel.com>; Daly, Lee <lee.d...@intel.com> > Subject: [PATCH v3 04/11] compress/isal: add private xform related ops > > Signed-off-by: Lee Daly <lee.d...@intel.com> > --- > 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(-) > > 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 @@ > > #include "isal_compress_pmd_private.h" > > +#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; > > +/* 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 == NULL) > + return -EINVAL; > + > + /* Check for chained xforms */ > + if (xform->next != 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; > > +/** 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.