* [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag @ 2018-06-27 5:50 Pablo de Lara 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara ` (5 more replies) 0 siblings, 6 replies; 45+ messages in thread From: Pablo de Lara @ 2018-06-27 5:50 UTC (permalink / raw) To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara The current mbuf scatter gatter feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not. Therefore, three new flags will replace this flag: - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT Note that out-of-place flat buffers is supported by default and in-place is not supported by the library. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- doc/guides/rel_notes/release_18_08.rst | 6 ++++++ lib/librte_compressdev/rte_comp.c | 8 ++++++-- lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++---------- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..1fc38418a 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -60,6 +60,12 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is + replaced with the following more explicit flags: + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT`` + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT`` + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT`` + ABI Changes ----------- diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index d596ba872..ea7692ae7 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) return "STATEFUL_COMPRESSION"; case RTE_COMP_FF_STATEFUL_DECOMPRESSION: return "STATEFUL_DECOMPRESSION"; - case RTE_COMP_FF_MBUF_SCATTER_GATHER: - return "MBUF_SCATTER_GATHER"; + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT: + return "OUT_OF_PLACE_SGL_IN_SGL_OUT"; + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT: + return "OUT_OF_PLACE_SGL_IN_FB_OUT"; + case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT: + return "OUT_OF_PLACE_FB_IN_SGL_OUT"; case RTE_COMP_FF_MULTI_PKT_CHECKSUM: return "MULTI_PKT_CHECKSUM"; case RTE_COMP_FF_ADLER32_CHECKSUM: diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h index 5b513c77e..3ce6a80e1 100644 --- a/lib/librte_compressdev/rte_comp.h +++ b/lib/librte_compressdev/rte_comp.h @@ -30,23 +30,33 @@ extern "C" { /**< Stateful compression is supported */ #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) /**< Stateful decompression is supported */ -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) -/**< Scatter-gather mbufs are supported */ -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2) +/**< Out-of-place Scatter-gather (SGL) mbufs are + * supported in input and output + */ +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in input, but only flat buffers (FB) are supported in output + */ +#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in output, but only flat buffers (FB) are supported in input + */ +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) /**< Adler-32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) /**< CRC32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) /**< Adler-32/CRC32 Checksum is supported */ -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) /**< Generation of checksum across multiple stateless packets is supported */ -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) /**< SHA1 Hash is supported */ -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) /**< SHA256 Hash of SHA2 family is supported */ -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) /**< Private xforms created by the PMD can be shared * across multiple stateless operations. If not set, then app needs * to create as many priv_xforms as it expects to have stateless -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-06-27 5:50 ` Pablo de Lara 2018-06-27 15:22 ` Trahe, Fiona 2018-06-28 10:00 ` Daly, Lee 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (4 subsequent siblings) 5 siblings, 2 replies; 45+ messages in thread From: Pablo de Lara @ 2018-06-27 5:50 UTC (permalink / raw) To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara 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 <pablo.de.lara.guarch@intel.com> --- drivers/compress/isal/isal_compress_pmd_ops.c | 4 +++- lib/librte_compressdev/rte_comp.c | 4 ++++ lib/librte_compressdev/rte_comp.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/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[] = { { .algo = RTE_COMP_ALGO_DEFLATE, - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | + RTE_COMP_FF_HUFFMAN_FIXED | + RTE_COMP_FF_HUFFMAN_DYNAMIC, .window_size = { .min = 15, .max = 15, diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index ea7692ae7..9711a86c8 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 3ce6a80e1..c6a542c0c 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 enconding is supported */ +#define RTE_COMP_FF_HUFFMAN_DYNAMIC (1ULL << 14) +/**< Dynamic huffman enconding is supported */ /** Status of comp operation */ enum rte_comp_op_status { -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara @ 2018-06-27 15:22 ` Trahe, Fiona 2018-06-27 15:36 ` De Lara Guarch, Pablo 2018-06-28 10:00 ` Daly, Lee 1 sibling, 1 reply; 45+ messages in thread From: Trahe, Fiona @ 2018-06-27 15:22 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev, Trahe, Fiona Hi Pablo, > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 6:51 AM > To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH 2/2] compressdev: add huffman encoding flags > > 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 <pablo.de.lara.guarch@intel.com> > --- > drivers/compress/isal/isal_compress_pmd_ops.c | 4 +++- > lib/librte_compressdev/rte_comp.c | 4 ++++ > lib/librte_compressdev/rte_comp.h | 4 ++++ > 3 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c > b/drivers/compress/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[] = { > { > .algo = RTE_COMP_ALGO_DEFLATE, > - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, > + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | > + RTE_COMP_FF_HUFFMAN_FIXED | > + RTE_COMP_FF_HUFFMAN_DYNAMIC, > .window_size = { > .min = 15, > .max = 15, > diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c > index ea7692ae7..9711a86c8 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"; [Fiona] Thanks for adding this. Just in case any other algos are added in future which also use Huffman encoding I'd suggest renaming to include DEFLATE, e.g. RTE_COMP_FF_DFL_HUFFMAN_FIXED/DYNAMIC > default: > return NULL; > } > diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h > index 3ce6a80e1..c6a542c0c 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 enconding is supported */ > +#define RTE_COMP_FF_HUFFMAN_DYNAMIC (1ULL << 14) > +/**< Dynamic huffman enconding is supported */ [Fiona] typo encoding. > /** Status of comp operation */ > enum rte_comp_op_status { > -- > 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags 2018-06-27 15:22 ` Trahe, Fiona @ 2018-06-27 15:36 ` De Lara Guarch, Pablo 2018-06-27 17:35 ` Trahe, Fiona 0 siblings, 1 reply; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-06-27 15:36 UTC (permalink / raw) To: Trahe, Fiona, ashish.gupta, Daly, Lee; +Cc: dev > -----Original Message----- > From: Trahe, Fiona > Sent: Wednesday, June 27, 2018 4:23 PM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; > ashish.gupta@caviumnetworks.com; Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com> > Subject: RE: [PATCH 2/2] compressdev: add huffman encoding flags > > Hi Pablo, > > > > -----Original Message----- > > From: De Lara Guarch, Pablo > > Sent: Wednesday, June 27, 2018 6:51 AM > > To: Trahe, Fiona <fiona.trahe@intel.com>; > > ashish.gupta@caviumnetworks.com; Daly, Lee <lee.daly@intel.com> > > Cc: dev@dpdk.org; De Lara Guarch, Pablo > > <pablo.de.lara.guarch@intel.com> > > Subject: [PATCH 2/2] compressdev: add huffman encoding flags > > > > 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 <pablo.de.lara.guarch@intel.com> > > --- > > drivers/compress/isal/isal_compress_pmd_ops.c | 4 +++- > > lib/librte_compressdev/rte_comp.c | 4 ++++ > > lib/librte_compressdev/rte_comp.h | 4 ++++ > > 3 files changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c > > b/drivers/compress/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[] = { > > { > > .algo = RTE_COMP_ALGO_DEFLATE, > > - .comp_feature_flags = > RTE_COMP_FF_SHAREABLE_PRIV_XFORM, > > + .comp_feature_flags = > RTE_COMP_FF_SHAREABLE_PRIV_XFORM | > > + RTE_COMP_FF_HUFFMAN_FIXED | > > + RTE_COMP_FF_HUFFMAN_DYNAMIC, > > .window_size = { > > .min = 15, > > .max = 15, > > diff --git a/lib/librte_compressdev/rte_comp.c > > b/lib/librte_compressdev/rte_comp.c > > index ea7692ae7..9711a86c8 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"; > [Fiona] Thanks for adding this. > Just in case any other algos are added in future which also use Huffman > encoding I'd suggest renaming to include DEFLATE, e.g. > RTE_COMP_FF_DFL_HUFFMAN_FIXED/DYNAMIC Since these flags are set per algorithm (in capabilities), do you think it is needed to specify DEFLATE? > > > > default: > > return NULL; > > } > > diff --git a/lib/librte_compressdev/rte_comp.h > > b/lib/librte_compressdev/rte_comp.h > > index 3ce6a80e1..c6a542c0c 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 enconding is supported */ > > +#define RTE_COMP_FF_HUFFMAN_DYNAMIC (1ULL << 14) > > +/**< Dynamic huffman enconding is supported */ > [Fiona] typo encoding. Will fix. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags 2018-06-27 15:36 ` De Lara Guarch, Pablo @ 2018-06-27 17:35 ` Trahe, Fiona 0 siblings, 0 replies; 45+ messages in thread From: Trahe, Fiona @ 2018-06-27 17:35 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev, Trahe, Fiona > > > + case RTE_COMP_FF_HUFFMAN_FIXED: > > > + return "HUFFMAN_FIXED"; > > > + case RTE_COMP_FF_HUFFMAN_DYNAMIC: > > > + return "HUFFMAN_DYNAMIC"; > > [Fiona] Thanks for adding this. > > Just in case any other algos are added in future which also use Huffman > > encoding I'd suggest renaming to include DEFLATE, e.g. > > RTE_COMP_FF_DFL_HUFFMAN_FIXED/DYNAMIC > > Since these flags are set per algorithm (in capabilities), > do you think it is needed to specify DEFLATE? > [Fiona] You're right, I forgot that. So better not to include DEFLATE. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara 2018-06-27 15:22 ` Trahe, Fiona @ 2018-06-28 10:00 ` Daly, Lee 1 sibling, 0 replies; 45+ messages in thread From: Daly, Lee @ 2018-06-28 10:00 UTC (permalink / raw) To: De Lara Guarch, Pablo; +Cc: dev, Trahe, Fiona, ashish.gupta Hi Pablo, > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 6:51 AM > To: Trahe, Fiona <fiona.trahe@intel.com>; > ashish.gupta@caviumnetworks.com; Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH 2/2] compressdev: add huffman encoding flags > > 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 <pablo.de.lara.guarch@intel.com> > --- > drivers/compress/isal/isal_compress_pmd_ops.c | 4 +++- > lib/librte_compressdev/rte_comp.c | 4 ++++ > lib/librte_compressdev/rte_comp.h | 4 ++++ > 3 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c > b/drivers/compress/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[] = { > { > .algo = RTE_COMP_ALGO_DEFLATE, > - .comp_feature_flags = > RTE_COMP_FF_SHAREABLE_PRIV_XFORM, > + .comp_feature_flags = > RTE_COMP_FF_SHAREABLE_PRIV_XFORM | > + RTE_COMP_FF_HUFFMAN_FIXED | > + > RTE_COMP_FF_HUFFMAN_DYNAMIC, > .window_size = { > .min = 15, > .max = 15, Acked-by: Lee Daly <lee.daly@intel.com> Thanks, Lee. ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara @ 2018-06-27 12:16 ` Pablo de Lara 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags Pablo de Lara ` (2 more replies) 2018-06-27 15:14 ` [dpdk-dev] [PATCH " Trahe, Fiona ` (3 subsequent siblings) 5 siblings, 3 replies; 45+ messages in thread From: Pablo de Lara @ 2018-06-27 12:16 UTC (permalink / raw) To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara The current mbuf scatter gather feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not. Therefore, three new flags will replace this flag: - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT - RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT Note that out-of-place flat buffers is supported by default and in-place is not supported by the library. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- Changes in v2: - Fixed typos - Rephrased comments doc/guides/rel_notes/release_18_08.rst | 6 ++++++ lib/librte_compressdev/rte_comp.c | 8 ++++++-- lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++---------- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..18c8b4bd1 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -60,6 +60,12 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is + replaced with the following more explicit flags: + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT`` + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT`` + - ``RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT`` + ABI Changes ----------- diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index d596ba872..ea7692ae7 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) return "STATEFUL_COMPRESSION"; case RTE_COMP_FF_STATEFUL_DECOMPRESSION: return "STATEFUL_DECOMPRESSION"; - case RTE_COMP_FF_MBUF_SCATTER_GATHER: - return "MBUF_SCATTER_GATHER"; + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT: + return "OUT_OF_PLACE_SGL_IN_SGL_OUT"; + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT: + return "OUT_OF_PLACE_SGL_IN_FB_OUT"; + case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT: + return "OUT_OF_PLACE_FB_IN_SGL_OUT"; case RTE_COMP_FF_MULTI_PKT_CHECKSUM: return "MULTI_PKT_CHECKSUM"; case RTE_COMP_FF_ADLER32_CHECKSUM: diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h index 5b513c77e..f3742dafb 100644 --- a/lib/librte_compressdev/rte_comp.h +++ b/lib/librte_compressdev/rte_comp.h @@ -30,23 +30,33 @@ extern "C" { /**< Stateful compression is supported */ #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) /**< Stateful decompression is supported */ -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) -/**< Scatter-gather mbufs are supported */ -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2) +/**< Out-of-place Scatter-gather (SGL) mbufs are + * supported in input and output + */ +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in input, combined with flat buffers (FB) in output + */ +#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in output, combined with flat buffers (FB) in input + */ +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) /**< Adler-32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) /**< CRC32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) /**< Adler-32/CRC32 Checksum is supported */ -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) /**< Generation of checksum across multiple stateless packets is supported */ -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) /**< SHA1 Hash is supported */ -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) /**< SHA256 Hash of SHA2 family is supported */ -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) /**< Private xforms created by the PMD can be shared * across multiple stateless operations. If not set, then app needs * to create as many priv_xforms as it expects to have stateless -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-06-27 12:16 ` Pablo de Lara 2018-06-28 7:49 ` Trahe, Fiona 2018-06-28 7:48 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Trahe, Fiona 2018-06-29 10:08 ` Trahe, Fiona 2 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-06-27 12:16 UTC (permalink / raw) To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara 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 <pablo.de.lara.guarch@intel.com> --- 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 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/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[] = { { .algo = RTE_COMP_ALGO_DEFLATE, - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | + RTE_COMP_FF_HUFFMAN_FIXED | + RTE_COMP_FF_HUFFMAN_DYNAMIC, .window_size = { .min = 15, .max = 15, diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index ea7692ae7..9711a86c8 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 f3742dafb..64f41e976 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 */ /** Status of comp operation */ enum rte_comp_op_status { -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags Pablo de Lara @ 2018-06-28 7:49 ` Trahe, Fiona 0 siblings, 0 replies; 45+ messages in thread From: Trahe, Fiona @ 2018-06-28 7:49 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 1:16 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v2 2/2] compressdev: add huffman encoding flags > > 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 <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags Pablo de Lara @ 2018-06-28 7:48 ` Trahe, Fiona 2018-06-29 10:08 ` Trahe, Fiona 2 siblings, 0 replies; 45+ messages in thread From: Trahe, Fiona @ 2018-06-28 7:48 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 1:16 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag > > The current mbuf scatter gather feature flag is > too ambiguous, as it is not clear if input and/or output > buffers can be scatter gather mbufs or not. > > Therefore, three new flags will replace this flag: > - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT > - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT > - RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT > > Note that out-of-place flat buffers is supported by default > and in-place is not supported by the library. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags Pablo de Lara 2018-06-28 7:48 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Trahe, Fiona @ 2018-06-29 10:08 ` Trahe, Fiona 2 siblings, 0 replies; 45+ messages in thread From: Trahe, Fiona @ 2018-06-29 10:08 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev, Trahe, Fiona Hi Pablo, The Chained mbufs feature in doc/guides/compressdevs/features/default.ini needs updating with this change. Also while you're updating it I think we wanted to rename By-Pass? To Pass-thru? Fiona > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 1:16 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag > > The current mbuf scatter gather feature flag is > too ambiguous, as it is not clear if input and/or output > buffers can be scatter gather mbufs or not. > > Therefore, three new flags will replace this flag: > - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT > - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT > - RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT > > Note that out-of-place flat buffers is supported by default > and in-place is not supported by the library. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > --- > > Changes in v2: > - Fixed typos > - Rephrased comments > > doc/guides/rel_notes/release_18_08.rst | 6 ++++++ > lib/librte_compressdev/rte_comp.c | 8 ++++++-- > lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++---------- > 3 files changed, 32 insertions(+), 12 deletions(-) > > diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst > index bc0124295..18c8b4bd1 100644 > --- a/doc/guides/rel_notes/release_18_08.rst > +++ b/doc/guides/rel_notes/release_18_08.rst > @@ -60,6 +60,12 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > > +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is > + replaced with the following more explicit flags: > + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT`` > + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT`` > + - ``RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT`` > + > > ABI Changes > ----------- > diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c > index d596ba872..ea7692ae7 100644 > --- a/lib/librte_compressdev/rte_comp.c > +++ b/lib/librte_compressdev/rte_comp.c > @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) > return "STATEFUL_COMPRESSION"; > case RTE_COMP_FF_STATEFUL_DECOMPRESSION: > return "STATEFUL_DECOMPRESSION"; > - case RTE_COMP_FF_MBUF_SCATTER_GATHER: > - return "MBUF_SCATTER_GATHER"; > + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT: > + return "OUT_OF_PLACE_SGL_IN_SGL_OUT"; > + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT: > + return "OUT_OF_PLACE_SGL_IN_FB_OUT"; > + case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT: > + return "OUT_OF_PLACE_FB_IN_SGL_OUT"; > case RTE_COMP_FF_MULTI_PKT_CHECKSUM: > return "MULTI_PKT_CHECKSUM"; > case RTE_COMP_FF_ADLER32_CHECKSUM: > diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h > index 5b513c77e..f3742dafb 100644 > --- a/lib/librte_compressdev/rte_comp.h > +++ b/lib/librte_compressdev/rte_comp.h > @@ -30,23 +30,33 @@ extern "C" { > /**< Stateful compression is supported */ > #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) > /**< Stateful decompression is supported */ > -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) > -/**< Scatter-gather mbufs are supported */ > -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2) > +/**< Out-of-place Scatter-gather (SGL) mbufs are > + * supported in input and output > + */ > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3) > +/**< Out-of-place Scatter-gather (SGL) mbufs are supported > + * in input, combined with flat buffers (FB) in output > + */ > +#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4) > +/**< Out-of-place Scatter-gather (SGL) mbufs are supported > + * in output, combined with flat buffers (FB) in input > + */ > +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) > /**< Adler-32 Checksum is supported */ > -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) > +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) > /**< CRC32 Checksum is supported */ > -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) > +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) > /**< Adler-32/CRC32 Checksum is supported */ > -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) > +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) > /**< Generation of checksum across multiple stateless packets is supported */ > -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) > +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) > /**< SHA1 Hash is supported */ > -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) > +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) > /**< SHA256 Hash of SHA2 family is supported */ > -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) > +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) > /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ > -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) > +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) > /**< Private xforms created by the PMD can be shared > * across multiple stateless operations. If not set, then app needs > * to create as many priv_xforms as it expects to have stateless > -- > 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-06-27 15:14 ` Trahe, Fiona 2018-06-27 15:33 ` De Lara Guarch, Pablo 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara ` (2 subsequent siblings) 5 siblings, 1 reply; 45+ messages in thread From: Trahe, Fiona @ 2018-06-27 15:14 UTC (permalink / raw) To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev, Trahe, Fiona Hi Pablo, > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 27, 2018 6:51 AM > To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH 1/2] compressdev: replace mbuf scatter gather flag > > The current mbuf scatter gatter feature flag is [Fiona] typo - gather > too ambiguous, as it is not clear if input and/or output > buffers can be scatter gather mbufs or not. > > Therefore, three new flags will replace this flag: > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT [Fiona] oops! CRYPTODEV?? Here and below in docs > > Note that out-of-place flat buffers is supported by default > and in-place is not supported by the library. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > --- > doc/guides/rel_notes/release_18_08.rst | 6 ++++++ > lib/librte_compressdev/rte_comp.c | 8 ++++++-- > lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++---------- > 3 files changed, 32 insertions(+), 12 deletions(-) > > diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst > index bc0124295..1fc38418a 100644 > --- a/doc/guides/rel_notes/release_18_08.rst > +++ b/doc/guides/rel_notes/release_18_08.rst > @@ -60,6 +60,12 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > > +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is > + replaced with the following more explicit flags: > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT`` > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT`` > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT`` > + > > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2) > +/**< Out-of-place Scatter-gather (SGL) mbufs are > + * supported in input and output > + */ > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3) > +/**< Out-of-place Scatter-gather (SGL) mbufs are supported > + * in input, but only flat buffers (FB) are supported in output > + */ [Fiona] I'd replace "but only.." with "combined with FB in output" As a PMD can set more than one of these flags, so the but only is misleading in this case. Same with next flag. ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag 2018-06-27 15:14 ` [dpdk-dev] [PATCH " Trahe, Fiona @ 2018-06-27 15:33 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-06-27 15:33 UTC (permalink / raw) To: Trahe, Fiona, ashish.gupta, Daly, Lee; +Cc: dev > -----Original Message----- > From: Trahe, Fiona > Sent: Wednesday, June 27, 2018 4:14 PM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; > ashish.gupta@caviumnetworks.com; Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com> > Subject: RE: [PATCH 1/2] compressdev: replace mbuf scatter gather flag > > Hi Pablo, > > > -----Original Message----- > > From: De Lara Guarch, Pablo > > Sent: Wednesday, June 27, 2018 6:51 AM > > To: Trahe, Fiona <fiona.trahe@intel.com>; > > ashish.gupta@caviumnetworks.com; Daly, Lee <lee.daly@intel.com> > > Cc: dev@dpdk.org; De Lara Guarch, Pablo > > <pablo.de.lara.guarch@intel.com> > > Subject: [PATCH 1/2] compressdev: replace mbuf scatter gather flag > > > > The current mbuf scatter gatter feature flag is > [Fiona] typo - gather Will fix. > > > too ambiguous, as it is not clear if input and/or output buffers can > > be scatter gather mbufs or not. > > > > Therefore, three new flags will replace this flag: > > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT > > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT > > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT > [Fiona] oops! CRYPTODEV?? Here and below in docs Oops... will fix!! :P > > > > > Note that out-of-place flat buffers is supported by default and > > in-place is not supported by the library. > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > --- > > doc/guides/rel_notes/release_18_08.rst | 6 ++++++ > > lib/librte_compressdev/rte_comp.c | 8 ++++++-- > > lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++---------- > > 3 files changed, 32 insertions(+), 12 deletions(-) > > > > diff --git a/doc/guides/rel_notes/release_18_08.rst > > b/doc/guides/rel_notes/release_18_08.rst > > index bc0124295..1fc38418a 100644 > > --- a/doc/guides/rel_notes/release_18_08.rst > > +++ b/doc/guides/rel_notes/release_18_08.rst > > @@ -60,6 +60,12 @@ API Changes > > Also, make sure to start the actual text at the margin. > > ========================================================= > > > > +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is > > + replaced with the following more explicit flags: > > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT`` > > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT`` > > + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT`` > > + > > > > > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2) > > +/**< Out-of-place Scatter-gather (SGL) mbufs are > > + * supported in input and output > > + */ > > +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3) > > +/**< Out-of-place Scatter-gather (SGL) mbufs are supported > > + * in input, but only flat buffers (FB) are supported in output */ > [Fiona] I'd replace "but only.." with "combined with FB in output" > As a PMD can set more than one of these flags, so the but only is misleading in > this case. > Same with next flag. OK, will fix. Thanks! > ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (2 preceding siblings ...) 2018-06-27 15:14 ` [dpdk-dev] [PATCH " Trahe, Fiona @ 2018-07-04 14:10 ` Pablo de Lara 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara ` (3 more replies) 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 5 siblings, 4 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-04 14:10 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara In PMD feature matrices (.ini files), it is not required to have the list of features that are not supported, just the ones that are. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- doc/guides/compressdevs/features/isal.ini | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/guides/compressdevs/features/isal.ini b/doc/guides/compressdevs/features/isal.ini index ad2718df0..1d4ff1c41 100644 --- a/doc/guides/compressdevs/features/isal.ini +++ b/doc/guides/compressdevs/features/isal.ini @@ -9,14 +9,6 @@ CPU SSE = Y CPU AVX = Y CPU AVX2 = Y CPU AVX512 = Y -CPU NEON = -Stateful = -By-Pass = -Chained mbufs = Deflate = Y -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = Fixed = Y Dynamic = Y -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara @ 2018-07-04 14:10 ` Pablo de Lara 2018-07-05 2:41 ` Verma, Shally 2018-07-05 8:07 ` Trahe, Fiona 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (2 subsequent siblings) 3 siblings, 2 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-04 14:10 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara Renamed feature "Bypass" to "Pass-through", as it is a more explicit name, meaning that the PMD is capable of passing the mbufs through it, without making any modifications (i.e.. NULL algorithm). Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- doc/guides/compressdevs/features/default.ini | 2 +- doc/guides/compressdevs/overview.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index 795fc5577..a88414d23 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -13,7 +13,7 @@ CPU AVX2 = CPU AVX512 = CPU NEON = Stateful = -By-Pass = +Pass-through = Chained mbufs = Deflate = LZS = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index ca37de175..b16c36fd6 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -10,3 +10,8 @@ Supported Feature Flags .. _table_compression_pmd_features: .. include:: overview_feature_table.txt + +.. Note:: + + - "Pass-through" feature flag refers to the ability of the PMD + to let mbufs pass-through it, without making any modifications to it. -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara @ 2018-07-05 2:41 ` Verma, Shally 2018-07-05 11:03 ` De Lara Guarch, Pablo 2018-07-05 8:07 ` Trahe, Fiona 1 sibling, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-05 2:41 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly, Sahu, Sunila; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 04 July 2018 19:41 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >Subject: [PATCH v3 2/4] doc: rename compress feature flag > >External Email > >Renamed feature "Bypass" to "Pass-through", >as it is a more explicit name, meaning that the PMD >is capable of passing the mbufs through it, >without making any modifications (i.e.. NULL algorithm). > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >--- > doc/guides/compressdevs/features/default.ini | 2 +- > doc/guides/compressdevs/overview.rst | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini >index 795fc5577..a88414d23 100644 >--- a/doc/guides/compressdevs/features/default.ini >+++ b/doc/guides/compressdevs/features/default.ini >@@ -13,7 +13,7 @@ CPU AVX2 = > CPU AVX512 = > CPU NEON = > Stateful = >-By-Pass = >+Pass-through = > Chained mbufs = > Deflate = > LZS = >diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst >index ca37de175..b16c36fd6 100644 >--- a/doc/guides/compressdevs/overview.rst >+++ b/doc/guides/compressdevs/overview.rst >@@ -10,3 +10,8 @@ Supported Feature Flags > .. _table_compression_pmd_features: > > .. include:: overview_feature_table.txt >+ >+.. Note:: >+ >+ - "Pass-through" feature flag refers to the ability of the PMD >+ to let mbufs pass-through it, without making any modifications to it. >-- >2.14.4 [Shally] Rather than mbufs, use generic name input / output buffers. As at some point, we may add alternative to mbufs. Abd rephrase a bit, such as, in pass-through mode PMD will just copy input to output. Thanks Shally ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag 2018-07-05 2:41 ` Verma, Shally @ 2018-07-05 11:03 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-05 11:03 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 3:41 AM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 2/4] doc: rename compress feature flag > > > > >-----Original Message----- > >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 04 July 2018 19:41 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com > >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >Subject: [PATCH v3 2/4] doc: rename compress feature flag > > > >External Email > > > >Renamed feature "Bypass" to "Pass-through", as it is a more explicit > >name, meaning that the PMD is capable of passing the mbufs through it, > >without making any modifications (i.e.. NULL algorithm). > > > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > >--- > > doc/guides/compressdevs/features/default.ini | 2 +- > > doc/guides/compressdevs/overview.rst | 5 +++++ > > 2 files changed, 6 insertions(+), 1 deletion(-) > > > >diff --git a/doc/guides/compressdevs/features/default.ini > >b/doc/guides/compressdevs/features/default.ini > >index 795fc5577..a88414d23 100644 > >--- a/doc/guides/compressdevs/features/default.ini > >+++ b/doc/guides/compressdevs/features/default.ini > >@@ -13,7 +13,7 @@ CPU AVX2 = > > CPU AVX512 = > > CPU NEON = > > Stateful = > >-By-Pass = > >+Pass-through = > > Chained mbufs = > > Deflate = > > LZS = > >diff --git a/doc/guides/compressdevs/overview.rst > >b/doc/guides/compressdevs/overview.rst > >index ca37de175..b16c36fd6 100644 > >--- a/doc/guides/compressdevs/overview.rst > >+++ b/doc/guides/compressdevs/overview.rst > >@@ -10,3 +10,8 @@ Supported Feature Flags .. > >_table_compression_pmd_features: > > > > .. include:: overview_feature_table.txt > >+ > >+.. Note:: > >+ > >+ - "Pass-through" feature flag refers to the ability of the PMD > >+ to let mbufs pass-through it, without making any modifications to it. > >-- > >2.14.4 > [Shally] Rather than mbufs, use generic name input / output buffers. As at some > point, we may add alternative to mbufs. > Abd rephrase a bit, such as, in pass-through mode PMD will just copy input to > output. Ok. Will do. > > Thanks > Shally > ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-05 2:41 ` Verma, Shally @ 2018-07-05 8:07 ` Trahe, Fiona 1 sibling, 0 replies; 45+ messages in thread From: Trahe, Fiona @ 2018-07-05 8:07 UTC (permalink / raw) To: De Lara Guarch, Pablo, shally.verma, ashish.gupta, Daly, Lee; +Cc: dev > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, July 4, 2018 3:11 PM > To: shally.verma@caviumnetworks.com; ashish.gupta@caviumnetworks.com; Trahe, Fiona > <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v3 2/4] doc: rename compress feature flag > > Renamed feature "Bypass" to "Pass-through", > as it is a more explicit name, meaning that the PMD > is capable of passing the mbufs through it, > without making any modifications (i.e.. NULL algorithm). > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara @ 2018-07-04 14:10 ` Pablo de Lara 2018-07-05 8:38 ` Verma, Shally 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags Pablo de Lara 2018-07-05 8:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Daly, Lee 3 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-04 14:10 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara The current mbuf scatter gather feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not. Therefore, three new flags will replace this flag: - RTE_COMP_FF_OOP_SGL_IN_SGL_OUT - RTE_COMP_FF_OOP_SGL_IN_FB_OUT - RTE_COMP_FF_OOP_FB_IN_SGL_OUT Note that out-of-place flat buffers is supported by default and in-place is not supported by the library. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- Changes in v3: - Replaced Out-of-place with OOP - Added new feature flags in default.ini Changes in v2: - Fixed typos - Rephrased comments doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++------------- doc/guides/compressdevs/overview.rst | 14 ++++++++++++ doc/guides/rel_notes/release_18_08.rst | 6 +++++ lib/librte_compressdev/rte_comp.c | 8 +++++-- lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++-------- 5 files changed, 64 insertions(+), 28 deletions(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index a88414d23..003f3f3a5 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -6,19 +6,21 @@ ; the features table in the documentation. ; [Features] -HW Accelerated = -CPU SSE = -CPU AVX = -CPU AVX2 = -CPU AVX512 = -CPU NEON = -Stateful = -Pass-through = -Chained mbufs = -Deflate = -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = -Fixed = -Dynamic = +HW Accelerated = +CPU SSE = +CPU AVX = +CPU AVX2 = +CPU AVX512 = +CPU NEON = +Stateful = +Pass-through = +OOP SGL In SGL Out = +OOP SGL In FB Out = +OOP FB In SGL Out = +Deflate = +LZS = +Adler32 = +Crc32 = +Adler32&Crc32 = +Fixed = +Dynamic = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index b16c36fd6..68205c77d 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -15,3 +15,17 @@ Supported Feature Flags - "Pass-through" feature flag refers to the ability of the PMD to let mbufs pass-through it, without making any modifications to it. + + - "OOP SGL In SGL Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Scatter-gater list Output", + which means that the input and output mbufs can consist of multiple segments. + + - "OOP SGL In FB Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Flat Buffers Output", + which means that the input mbuf can consist of multiple segments combined + with a single segment mbuf in the output. + + - "OOP FB In SGL Out" feature flag stands for + "Out-of-place Flat Buffers Input, Scatter-gather list Output", + which means that the output mbuf can consist of multiple segments combined + with a single segment mbuf in the input. diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..4ae37cb3b 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -60,6 +60,12 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is + replaced with the following more explicit flags: + - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT`` + - ``RTE_COMP_FF_OOP_SGL_IN_FB_OUT`` + - ``RTE_COMP_FF_OOP_FB_IN_SGL_OUT`` + ABI Changes ----------- diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index d596ba872..f5bd3a6c0 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) return "STATEFUL_COMPRESSION"; case RTE_COMP_FF_STATEFUL_DECOMPRESSION: return "STATEFUL_DECOMPRESSION"; - case RTE_COMP_FF_MBUF_SCATTER_GATHER: - return "MBUF_SCATTER_GATHER"; + case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT: + return "OOP_SGL_IN_SGL_OUT"; + case RTE_COMP_FF_OOP_SGL_IN_FB_OUT: + return "OOP_SGL_IN_FB_OUT"; + case RTE_COMP_FF_OOP_FB_IN_SGL_OUT: + return "OOP_FB_IN_SGL_OUT"; case RTE_COMP_FF_MULTI_PKT_CHECKSUM: return "MULTI_PKT_CHECKSUM"; case RTE_COMP_FF_ADLER32_CHECKSUM: diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h index 5b513c77e..6660cee82 100644 --- a/lib/librte_compressdev/rte_comp.h +++ b/lib/librte_compressdev/rte_comp.h @@ -30,23 +30,33 @@ extern "C" { /**< Stateful compression is supported */ #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) /**< Stateful decompression is supported */ -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) -/**< Scatter-gather mbufs are supported */ -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) +#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) +/**< Out-of-place Scatter-gather (SGL) mbufs are + * supported in input and output + */ +#define RTE_COMP_FF_OOP_SGL_IN_FB_OUT (1ULL << 3) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in input, combined with flat buffers (FB) in output + */ +#define RTE_COMP_FF_OOP_FB_IN_SGL_OUT (1ULL << 4) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in output, combined with flat buffers (FB) in input + */ +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) /**< Adler-32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) /**< CRC32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) /**< Adler-32/CRC32 Checksum is supported */ -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) /**< Generation of checksum across multiple stateless packets is supported */ -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) /**< SHA1 Hash is supported */ -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) /**< SHA256 Hash of SHA2 family is supported */ -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) /**< Private xforms created by the PMD can be shared * across multiple stateless operations. If not set, then app needs * to create as many priv_xforms as it expects to have stateless -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-05 8:38 ` Verma, Shally 2018-07-05 11:05 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-05 8:38 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly, Sahu, Sunila; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 04 July 2018 19:41 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > >External Email > >The current mbuf scatter gather feature flag is >too ambiguous, as it is not clear if input and/or output >buffers can be scatter gather mbufs or not. > >Therefore, three new flags will replace this flag: >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT > [Shally] Believe Out of place is default support on current compression API, so why do we need _OOP_ here? Thanks Shally >Note that out-of-place flat buffers is supported by default >and in-place is not supported by the library. > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> >--- > >Changes in v3: >- Replaced Out-of-place with OOP >- Added new feature flags in default.ini > >Changes in v2: >- Fixed typos >- Rephrased comments > > doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++------------- > doc/guides/compressdevs/overview.rst | 14 ++++++++++++ > doc/guides/rel_notes/release_18_08.rst | 6 +++++ > lib/librte_compressdev/rte_comp.c | 8 +++++-- > lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++-------- > 5 files changed, 64 insertions(+), 28 deletions(-) > >diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini >index a88414d23..003f3f3a5 100644 >--- a/doc/guides/compressdevs/features/default.ini >+++ b/doc/guides/compressdevs/features/default.ini >@@ -6,19 +6,21 @@ > ; the features table in the documentation. > ; > [Features] >-HW Accelerated = >-CPU SSE = >-CPU AVX = >-CPU AVX2 = >-CPU AVX512 = >-CPU NEON = >-Stateful = >-Pass-through = >-Chained mbufs = >-Deflate = >-LZS = >-Adler32 = >-Crc32 = >-Adler32&Crc32 = >-Fixed = >-Dynamic = >+HW Accelerated = >+CPU SSE = >+CPU AVX = >+CPU AVX2 = >+CPU AVX512 = >+CPU NEON = >+Stateful = >+Pass-through = >+OOP SGL In SGL Out = >+OOP SGL In FB Out = >+OOP FB In SGL Out = >+Deflate = >+LZS = >+Adler32 = >+Crc32 = >+Adler32&Crc32 = >+Fixed = >+Dynamic = >diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst >index b16c36fd6..68205c77d 100644 >--- a/doc/guides/compressdevs/overview.rst >+++ b/doc/guides/compressdevs/overview.rst >@@ -15,3 +15,17 @@ Supported Feature Flags > > - "Pass-through" feature flag refers to the ability of the PMD > to let mbufs pass-through it, without making any modifications to it. >+ >+ - "OOP SGL In SGL Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output", >+ which means that the input and output mbufs can consist of multiple segments. >+ >+ - "OOP SGL In FB Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Flat Buffers Output", >+ which means that the input mbuf can consist of multiple segments combined >+ with a single segment mbuf in the output. >+ >+ - "OOP FB In SGL Out" feature flag stands for >+ "Out-of-place Flat Buffers Input, Scatter-gather list Output", >+ which means that the output mbuf can consist of multiple segments combined >+ with a single segment mbuf in the input. >diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst >index bc0124295..4ae37cb3b 100644 >--- a/doc/guides/rel_notes/release_18_08.rst >+++ b/doc/guides/rel_notes/release_18_08.rst >@@ -60,6 +60,12 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > >+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is >+ replaced with the following more explicit flags: >+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT`` >+ - ``RTE_COMP_FF_OOP_SGL_IN_FB_OUT`` >+ - ``RTE_COMP_FF_OOP_FB_IN_SGL_OUT`` >+ > > ABI Changes > ----------- >diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c >index d596ba872..f5bd3a6c0 100644 >--- a/lib/librte_compressdev/rte_comp.c >+++ b/lib/librte_compressdev/rte_comp.c >@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) > return "STATEFUL_COMPRESSION"; > case RTE_COMP_FF_STATEFUL_DECOMPRESSION: > return "STATEFUL_DECOMPRESSION"; >- case RTE_COMP_FF_MBUF_SCATTER_GATHER: >- return "MBUF_SCATTER_GATHER"; >+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT: >+ return "OOP_SGL_IN_SGL_OUT"; >+ case RTE_COMP_FF_OOP_SGL_IN_FB_OUT: >+ return "OOP_SGL_IN_FB_OUT"; >+ case RTE_COMP_FF_OOP_FB_IN_SGL_OUT: >+ return "OOP_FB_IN_SGL_OUT"; > case RTE_COMP_FF_MULTI_PKT_CHECKSUM: > return "MULTI_PKT_CHECKSUM"; > case RTE_COMP_FF_ADLER32_CHECKSUM: >diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h >index 5b513c77e..6660cee82 100644 >--- a/lib/librte_compressdev/rte_comp.h >+++ b/lib/librte_compressdev/rte_comp.h >@@ -30,23 +30,33 @@ extern "C" { > /**< Stateful compression is supported */ > #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) > /**< Stateful decompression is supported */ >-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) >-/**< Scatter-gather mbufs are supported */ >-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) >+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) >+/**< Out-of-place Scatter-gather (SGL) mbufs are >+ * supported in input and output >+ */ >+#define RTE_COMP_FF_OOP_SGL_IN_FB_OUT (1ULL << 3) >+/**< Out-of-place Scatter-gather (SGL) mbufs are supported >+ * in input, combined with flat buffers (FB) in output >+ */ >+#define RTE_COMP_FF_OOP_FB_IN_SGL_OUT (1ULL << 4) >+/**< Out-of-place Scatter-gather (SGL) mbufs are supported >+ * in output, combined with flat buffers (FB) in input >+ */ >+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) > /**< Adler-32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) >+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) > /**< CRC32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) >+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) > /**< Adler-32/CRC32 Checksum is supported */ >-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) >+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) > /**< Generation of checksum across multiple stateless packets is supported */ >-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) >+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) > /**< SHA1 Hash is supported */ >-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) >+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) > /**< SHA256 Hash of SHA2 family is supported */ >-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) >+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) > /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ >-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) >+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) > /**< Private xforms created by the PMD can be shared > * across multiple stateless operations. If not set, then app needs > * to create as many priv_xforms as it expects to have stateless >-- >2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-05 8:38 ` Verma, Shally @ 2018-07-05 11:05 ` De Lara Guarch, Pablo 2018-07-05 11:12 ` Verma, Shally 0 siblings, 1 reply; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-05 11:05 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 9:39 AM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > > > > >-----Original Message----- > >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 04 July 2018 19:41 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com > >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > > > >External Email > > > >The current mbuf scatter gather feature flag is too ambiguous, as it is > >not clear if input and/or output buffers can be scatter gather mbufs or > >not. > > > >Therefore, three new flags will replace this flag: > >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT > >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT > >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT > > > [Shally] Believe Out of place is default support on current compression API, so > why do we need _OOP_ here? Hi Shally, You are right, but I just wanted to clarify that the scenario is for Out of place only. Thanks, Pablo > > Thanks > Shally > >Note that out-of-place flat buffers is supported by default and > >in-place is not supported by the library. > > > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > >Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-05 11:05 ` De Lara Guarch, Pablo @ 2018-07-05 11:12 ` Verma, Shally 2018-07-05 11:25 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-05 11:12 UTC (permalink / raw) To: De Lara Guarch, Pablo, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila Cc: dev >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 05 July 2018 16:36 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; >Daly, Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >Cc: dev@dpdk.org >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > >External Email > >> -----Original Message----- >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> Sent: Thursday, July 5, 2018 9:39 AM >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish >> <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee >> <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >> Cc: dev@dpdk.org >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag >> >> >> >> >-----Original Message----- >> >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >> >Sent: 04 July 2018 19:41 >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish >> ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com >> >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >> >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag >> > >> >External Email >> > >> >The current mbuf scatter gather feature flag is too ambiguous, as it is >> >not clear if input and/or output buffers can be scatter gather mbufs or >> >not. >> > >> >Therefore, three new flags will replace this flag: >> >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT >> >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT >> >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT >> > >> [Shally] Believe Out of place is default support on current compression API, so >> why do we need _OOP_ here? > >Hi Shally, > >You are right, but I just wanted to clarify that the scenario is for Out of place only. > Ok. But that looks redundant to me. Though not likely, tomorrow if some algo support in-place, Then we will end up adding in_place equivalent of same. So would prefer to keep naming generic of in/out place and specific to Scatter-gather in/out support. >Thanks, >Pablo > >> >> Thanks >> Shally >> >Note that out-of-place flat buffers is supported by default and >> >in-place is not supported by the library. >> > >> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-05 11:12 ` Verma, Shally @ 2018-07-05 11:25 ` De Lara Guarch, Pablo 2018-07-05 11:58 ` Verma, Shally 0 siblings, 1 reply; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-05 11:25 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 12:13 PM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > > > > >-----Original Message----- > >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 05 July 2018 16:36 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, > >Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > >Cc: dev@dpdk.org > >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >flag > > > >External Email > > > >> -----Original Message----- > >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] > >> Sent: Thursday, July 5, 2018 9:39 AM > >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, > >> Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona > >> <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com>; Sahu, Sunila > >> <Sunila.Sahu@cavium.com> > >> Cc: dev@dpdk.org > >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >> flag > >> > >> > >> > >> >-----Original Message----- > >> >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >> >Sent: 04 July 2018 19:41 > >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > >> ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com > >> >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >> >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >> >flag > >> > > >> >External Email > >> > > >> >The current mbuf scatter gather feature flag is too ambiguous, as it > >> >is not clear if input and/or output buffers can be scatter gather > >> >mbufs or not. > >> > > >> >Therefore, three new flags will replace this flag: > >> >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT > >> >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT > >> >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT > >> > > >> [Shally] Believe Out of place is default support on current > >> compression API, so why do we need _OOP_ here? > > > >Hi Shally, > > > >You are right, but I just wanted to clarify that the scenario is for Out of place > only. > > > Ok. But that looks redundant to me. Though not likely, tomorrow if some algo > support in-place, Then we will end up adding in_place equivalent of same. So > would prefer to keep naming generic of in/out place and specific to Scatter- > gather in/out support. I think I am not quite following you. Actually, if in the future we support In-place, then it is important to have OOP in the macro, to specify that SGL is supported for Out-of-place and maybe not in-place (like in cryptodev). Otherwise, we would need to break the API, which can be avoided now. Thanks, Pablo > > >Thanks, > >Pablo > > > >> > >> Thanks > >> Shally > >> >Note that out-of-place flat buffers is supported by default and > >> >in-place is not supported by the library. > >> > > >> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > >> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-05 11:25 ` De Lara Guarch, Pablo @ 2018-07-05 11:58 ` Verma, Shally 2018-07-06 8:40 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-05 11:58 UTC (permalink / raw) To: De Lara Guarch, Pablo, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila Cc: dev >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 05 July 2018 16:56 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; >Daly, Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >Cc: dev@dpdk.org >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > >External Email > >> -----Original Message----- >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> Sent: Thursday, July 5, 2018 12:13 PM >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish >> <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee >> <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >> Cc: dev@dpdk.org >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag >> >> >> >> >-----Original Message----- >> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >> >Sent: 05 July 2018 16:36 >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish >> ><Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, >> >Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >> >Cc: dev@dpdk.org >> >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather >> >flag >> > >> >External Email >> > >> >> -----Original Message----- >> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> >> Sent: Thursday, July 5, 2018 9:39 AM >> >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, >> >> Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona >> >> <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com>; Sahu, Sunila >> >> <Sunila.Sahu@cavium.com> >> >> Cc: dev@dpdk.org >> >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather >> >> flag >> >> >> >> >> >> >> >> >-----Original Message----- >> >> >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >> >> >Sent: 04 July 2018 19:41 >> >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish >> >> ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com >> >> >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >> >> >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather >> >> >flag >> >> > >> >> >External Email >> >> > >> >> >The current mbuf scatter gather feature flag is too ambiguous, as it >> >> >is not clear if input and/or output buffers can be scatter gather >> >> >mbufs or not. >> >> > >> >> >Therefore, three new flags will replace this flag: >> >> >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT >> >> >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT >> >> >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT >> >> > >> >> [Shally] Believe Out of place is default support on current >> >> compression API, so why do we need _OOP_ here? >> > >> >Hi Shally, >> > >> >You are right, but I just wanted to clarify that the scenario is for Out of place >> only. >> > >> Ok. But that looks redundant to me. Though not likely, tomorrow if some algo >> support in-place, Then we will end up adding in_place equivalent of same. So >> would prefer to keep naming generic of in/out place and specific to Scatter- >> gather in/out support. > >I think I am not quite following you. Actually, if in the future we support >In-place, then it is important to have OOP in the macro, to specify that SGL >is supported for Out-of-place and maybe not in-place (like in cryptodev). >Otherwise, we would need to break the API, which can be avoided now. Ohh okay, now I get it. So these feature flags intend to show input/output mode supported specifically for in/out of place operations. But then still I see having OOP isn't required as compression default support is out-of-place and it's just making feature name too big. Having in-place is exception and if supported, can use convention RTE_COMP_FF_INPLACE_xx Above one comment, as I see it, use of FB in RTE_COMP_FF_OOP_FB_IN_SGL_OUT didn't give clear indication what it mean. May be replace it by RTE_COMP_FF_OOP_DIRECT/LINEAR_IN_SGL_OUT Just few suggestions. Thanks Shally - > >Thanks, >Pablo > >> >> >Thanks, >> >Pablo >> > >> >> >> >> Thanks >> >> Shally >> >> >Note that out-of-place flat buffers is supported by default and >> >> >in-place is not supported by the library. >> >> > >> >> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >> >> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-05 11:58 ` Verma, Shally @ 2018-07-06 8:40 ` De Lara Guarch, Pablo 2018-07-06 8:53 ` Verma, Shally 0 siblings, 1 reply; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-06 8:40 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 12:59 PM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > > > > >-----Original Message----- > >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 05 July 2018 16:56 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, > >Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > >Cc: dev@dpdk.org > >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >flag > > > >External Email > > > >> -----Original Message----- > >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] > >> Sent: Thursday, July 5, 2018 12:13 PM > >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, > >> Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona > >> <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com>; Sahu, Sunila > >> <Sunila.Sahu@cavium.com> > >> Cc: dev@dpdk.org > >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >> flag > >> > >> > >> > >> >-----Original Message----- > >> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > >> >Sent: 05 July 2018 16:36 > >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > >> ><Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; > >> >Daly, Lee <lee.daly@intel.com>; Sahu, Sunila > >> ><Sunila.Sahu@cavium.com> > >> >Cc: dev@dpdk.org > >> >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >> >flag > >> > > >> >External Email > >> > > >> >> -----Original Message----- > >> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] > >> >> Sent: Thursday, July 5, 2018 9:39 AM > >> >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, > >> >> Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona > >> >> <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com>; Sahu, > >> >> Sunila <Sunila.Sahu@cavium.com> > >> >> Cc: dev@dpdk.org > >> >> Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter > >> >> gather flag > >> >> > >> >> > >> >> > >> >> >-----Original Message----- > >> >> >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >> >> >Sent: 04 July 2018 19:41 > >> >> >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > >> >> ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; > >> >> >lee.daly@intel.com > >> >> >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >> >> >Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >> >> >flag > >> >> > > >> >> >External Email > >> >> > > >> >> >The current mbuf scatter gather feature flag is too ambiguous, as > >> >> >it is not clear if input and/or output buffers can be scatter > >> >> >gather mbufs or not. > >> >> > > >> >> >Therefore, three new flags will replace this flag: > >> >> >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT > >> >> >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT > >> >> >- RTE_COMP_FF_OOP_FB_IN_SGL_OUT > >> >> > > >> >> [Shally] Believe Out of place is default support on current > >> >> compression API, so why do we need _OOP_ here? > >> > > >> >Hi Shally, > >> > > >> >You are right, but I just wanted to clarify that the scenario is for > >> >Out of place > >> only. > >> > > >> Ok. But that looks redundant to me. Though not likely, tomorrow if > >> some algo support in-place, Then we will end up adding in_place > >> equivalent of same. So would prefer to keep naming generic of in/out > >> place and specific to Scatter- gather in/out support. > > > >I think I am not quite following you. Actually, if in the future we > >support In-place, then it is important to have OOP in the macro, to > >specify that SGL is supported for Out-of-place and maybe not in-place (like in > cryptodev). > >Otherwise, we would need to break the API, which can be avoided now. > > Ohh okay, now I get it. So these feature flags intend to show input/output mode > supported specifically for in/out of place operations. But then still I see having > OOP isn't required as compression default support is out-of-place and it's just > making feature name too big. Having in-place is exception and if supported, can > use convention RTE_COMP_FF_INPLACE_xx I would still prefer having OOP, to be consistent with cryptodev. It is also not that long, it is just 3 letters. > > Above one comment, as I see it, use of FB in > RTE_COMP_FF_OOP_FB_IN_SGL_OUT didn't give clear indication what it mean. > May be replace it by RTE_COMP_FF_OOP_DIRECT/LINEAR_IN_SGL_OUT Linear could be a good option, but it is missing a noun there. What about LB (linear buffer), so we keep it short too. Pablo ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 8:40 ` De Lara Guarch, Pablo @ 2018-07-06 8:53 ` Verma, Shally 2018-07-06 8:59 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-06 8:53 UTC (permalink / raw) To: De Lara Guarch, Pablo, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila Cc: dev >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 14:10 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; >Daly, Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> >Cc: dev@dpdk.org >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag > //snip >> Ohh okay, now I get it. So these feature flags intend to show input/output mode >> supported specifically for in/out of place operations. But then still I see having >> OOP isn't required as compression default support is out-of-place and it's just >> making feature name too big. Having in-place is exception and if supported, can >> use convention RTE_COMP_FF_INPLACE_xx > >I would still prefer having OOP, to be consistent with cryptodev. It is also not that long, it is just 3 letters. > >> >> Above one comment, as I see it, use of FB in >> RTE_COMP_FF_OOP_FB_IN_SGL_OUT didn't give clear indication what it mean. >> May be replace it by RTE_COMP_FF_OOP_DIRECT/LINEAR_IN_SGL_OUT > >Linear could be a good option, but it is missing a noun there. What about LB (linear buffer), so we keep it short too. Ok. LB looks fine. hopefully, that will make apparent to reader, that it's opposite of Scatter-Gather. Thanks Shally > >Pablo ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 8:53 ` Verma, Shally @ 2018-07-06 8:59 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-06 8:59 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee, Sahu, Sunila; +Cc: dev > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Verma, Shally > Sent: Friday, July 6, 2018 9:53 AM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter > gather flag > > > > >-----Original Message----- > >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 06 July 2018 14:10 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, > >Lee <lee.daly@intel.com>; Sahu, Sunila <Sunila.Sahu@cavium.com> > >Cc: dev@dpdk.org > >Subject: RE: [PATCH v3 3/4] compressdev: replace mbuf scatter gather > >flag > > > > //snip > > >> Ohh okay, now I get it. So these feature flags intend to show > >> input/output mode supported specifically for in/out of place > >> operations. But then still I see having OOP isn't required as > >> compression default support is out-of-place and it's just making > >> feature name too big. Having in-place is exception and if supported, > >> can use convention RTE_COMP_FF_INPLACE_xx > > > >I would still prefer having OOP, to be consistent with cryptodev. It is also not > that long, it is just 3 letters. > > > >> > >> Above one comment, as I see it, use of FB in > >> RTE_COMP_FF_OOP_FB_IN_SGL_OUT didn't give clear indication what it > mean. > >> May be replace it by RTE_COMP_FF_OOP_DIRECT/LINEAR_IN_SGL_OUT > > > >Linear could be a good option, but it is missing a noun there. What about LB > (linear buffer), so we keep it short too. > > Ok. LB looks fine. hopefully, that will make apparent to reader, that it's opposite > of Scatter-Gather. I can clarify a bit more in the comments. Thanks, Pablo > > Thanks > Shally > > > > >Pablo ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-04 14:10 ` Pablo de Lara 2018-07-05 8:14 ` Verma, Shally 2018-07-05 8:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Daly, Lee 3 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-04 14:10 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara 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 <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- 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(-) diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/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[] = { { .algo = RTE_COMP_ALGO_DEFLATE, - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | + RTE_COMP_FF_HUFFMAN_FIXED | + RTE_COMP_FF_HUFFMAN_DYNAMIC, .window_size = { .min = 15, .max = 15, 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 */ /** 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 = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) + return -ENOTSUP; + struct rte_comp_xform *compress_xform = 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 = rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); + const struct rte_compressdev_capabilities *capab; + + capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) + return -ENOTSUP; + if (compress_xform == NULL) { RTE_LOG(ERR, USER1, "Compress xform could not be created\n"); -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags Pablo de Lara @ 2018-07-05 8:14 ` Verma, Shally 2018-07-05 11:21 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-05 8:14 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 04 July 2018 19:41 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >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 <pablo.de.lara.guarch@intel.com> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> >--- > >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(-) > //snip >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 */ > [Shally] As such okay to have this feature. But while looking at this, got a question: 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, 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()? 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?) Thanks Shally > /** 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 = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); >+ TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) >+ return -ENOTSUP; >+ > struct rte_comp_xform *compress_xform = > 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 = > rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); > >+ const struct rte_compressdev_capabilities *capab; >+ >+ capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); >+ TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) >+ return -ENOTSUP; >+ > if (compress_xform == NULL) { > RTE_LOG(ERR, USER1, > "Compress xform could not be created\n"); >-- >2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags 2018-07-05 8:14 ` Verma, Shally @ 2018-07-05 11:21 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-05 11:21 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Thursday, July 5, 2018 9:14 AM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 4/4] compressdev: add huffman encoding flags > > > > >-----Original Message----- > >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 04 July 2018 19:41 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com > >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >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 <pablo.de.lara.guarch@intel.com> > >Acked-by: Fiona Trahe <fiona.trahe@intel.com> > >--- > > > >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(-) > > > > //snip > > >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 */ > > > > [Shally] As such okay to have this feature. But while looking at this, got a > question: > > 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, > > 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 cryptodev, which is doing something similar. However, I don't have an strong opinion on this. Maybe Fiona can break the tie? :) > > 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 uses software-based Implementation for an algorithm, still the device is hardware. > > Thanks > Shally ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara ` (2 preceding siblings ...) 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags Pablo de Lara @ 2018-07-05 8:10 ` Daly, Lee 3 siblings, 0 replies; 45+ messages in thread From: Daly, Lee @ 2018-07-05 8:10 UTC (permalink / raw) To: De Lara Guarch, Pablo, shally.verma, ashish.gupta, Trahe, Fiona; +Cc: dev > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, July 4, 2018 3:11 PM > To: shally.verma@caviumnetworks.com; > ashish.gupta@caviumnetworks.com; Trahe, Fiona <fiona.trahe@intel.com>; > Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix > > In PMD feature matrices (.ini files), it is not required to have the list of > features that are not supported, just the ones that are. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > --- > doc/guides/compressdevs/features/isal.ini | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/doc/guides/compressdevs/features/isal.ini > b/doc/guides/compressdevs/features/isal.ini > index ad2718df0..1d4ff1c41 100644 > --- a/doc/guides/compressdevs/features/isal.ini > +++ b/doc/guides/compressdevs/features/isal.ini > @@ -9,14 +9,6 @@ CPU SSE = Y > CPU AVX = Y > CPU AVX2 = Y > CPU AVX512 = Y > -CPU NEON = > -Stateful = > -By-Pass = > -Chained mbufs = > Deflate = Y > -LZS = > -Adler32 = > -Crc32 = > -Adler32&Crc32 = > Fixed = Y > Dynamic = Y > -- > 2.14.4 Acked-by: Lee Daly <lee.daly@intel.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v4 1/4] doc: cleanup ISA-L PMD feature matrix 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (3 preceding siblings ...) 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara @ 2018-07-06 2:54 ` Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag Pablo de Lara ` (2 more replies) 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 5 siblings, 3 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 2:54 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara In PMD feature matrices (.ini files), it is not required to have the list of features that are not supported, just the ones that are. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Lee Daly <lee.daly@intel.com> --- v4: - No change doc/guides/compressdevs/features/isal.ini | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/guides/compressdevs/features/isal.ini b/doc/guides/compressdevs/features/isal.ini index ad2718df0..1d4ff1c41 100644 --- a/doc/guides/compressdevs/features/isal.ini +++ b/doc/guides/compressdevs/features/isal.ini @@ -9,14 +9,6 @@ CPU SSE = Y CPU AVX = Y CPU AVX2 = Y CPU AVX512 = Y -CPU NEON = -Stateful = -By-Pass = -Chained mbufs = Deflate = Y -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = Fixed = Y Dynamic = Y -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara @ 2018-07-06 2:54 ` Pablo de Lara 2018-07-06 12:17 ` Verma, Shally 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 4/4] compressdev: add huffman encoding flags Pablo de Lara 2 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 2:54 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara Renamed feature "Bypass" to "Pass-through", as it is a more explicit name, meaning that the PMD is capable of passing the mbufs through it, without making any modifications (i.e.. NULL algorithm). Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- v4: - Rephrased pass-through feature comment (Shally) doc/guides/compressdevs/features/default.ini | 2 +- doc/guides/compressdevs/overview.rst | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index 795fc5577..a88414d23 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -13,7 +13,7 @@ CPU AVX2 = CPU AVX512 = CPU NEON = Stateful = -By-Pass = +Pass-through = Chained mbufs = Deflate = LZS = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index ca37de175..d01c1a966 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -10,3 +10,9 @@ Supported Feature Flags .. _table_compression_pmd_features: .. include:: overview_feature_table.txt + +.. Note:: + + - "Pass-through" feature flag refers to the ability of the PMD + to let input buffers pass-through it, copying the input to the output, + without making any modifications to it (no compression done). -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag Pablo de Lara @ 2018-07-06 12:17 ` Verma, Shally 0 siblings, 0 replies; 45+ messages in thread From: Verma, Shally @ 2018-07-06 12:17 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 08:24 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >Subject: [PATCH v4 2/4] doc: rename compress feature flag > >External Email > >Renamed feature "Bypass" to "Pass-through", >as it is a more explicit name, meaning that the PMD >is capable of passing the mbufs through it, >without making any modifications (i.e.. NULL algorithm). > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> >--- > >v4: >- Rephrased pass-through feature comment (Shally) > > doc/guides/compressdevs/features/default.ini | 2 +- > doc/guides/compressdevs/overview.rst | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini >index 795fc5577..a88414d23 100644 >--- a/doc/guides/compressdevs/features/default.ini >+++ b/doc/guides/compressdevs/features/default.ini >@@ -13,7 +13,7 @@ CPU AVX2 = > CPU AVX512 = > CPU NEON = > Stateful = >-By-Pass = >+Pass-through = > Chained mbufs = > Deflate = > LZS = >diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst >index ca37de175..d01c1a966 100644 >--- a/doc/guides/compressdevs/overview.rst >+++ b/doc/guides/compressdevs/overview.rst >@@ -10,3 +10,9 @@ Supported Feature Flags > .. _table_compression_pmd_features: > > .. include:: overview_feature_table.txt >+ >+.. Note:: >+ >+ - "Pass-through" feature flag refers to the ability of the PMD >+ to let input buffers pass-through it, copying the input to the output, >+ without making any modifications to it (no compression done). >-- >2.14.4 Acked-by: Shally Verma <shally.verma@caviumnetworks.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag Pablo de Lara @ 2018-07-06 2:54 ` Pablo de Lara 2018-07-06 12:33 ` Verma, Shally 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 4/4] compressdev: add huffman encoding flags Pablo de Lara 2 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 2:54 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara The current mbuf scatter gather feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not. Therefore, three new flags will replace this flag: - RTE_COMP_FF_OOP_SGL_IN_SGL_OUT - RTE_COMP_FF_OOP_SGL_IN_FB_OUT - RTE_COMP_FF_OOP_LB_IN_SGL_OUT Note that out-of-place flat buffers is supported by default and in-place is not supported by the library. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- v4: - Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally) - Add extra explanation on comments about Linear Buffers vs Scatter-gather lists v3: - Replaced Out-of-place with OOP - Added new feature flags in default.ini v2: - Fixed typos - Rephrased comments doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++------------- doc/guides/compressdevs/overview.rst | 14 ++++++++++++ doc/guides/rel_notes/release_18_08.rst | 6 +++++ lib/librte_compressdev/rte_comp.c | 8 +++++-- lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++-------- 5 files changed, 65 insertions(+), 28 deletions(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index a88414d23..829e4df61 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -6,19 +6,21 @@ ; the features table in the documentation. ; [Features] -HW Accelerated = -CPU SSE = -CPU AVX = -CPU AVX2 = -CPU AVX512 = -CPU NEON = -Stateful = -Pass-through = -Chained mbufs = -Deflate = -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = -Fixed = -Dynamic = +HW Accelerated = +CPU SSE = +CPU AVX = +CPU AVX2 = +CPU AVX512 = +CPU NEON = +Stateful = +Pass-through = +OOP SGL In SGL Out = +OOP SGL In LB Out = +OOP LB In SGL Out = +Deflate = +LZS = +Adler32 = +Crc32 = +Adler32&Crc32 = +Fixed = +Dynamic = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index d01c1a966..6d12c3bd6 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -16,3 +16,17 @@ Supported Feature Flags - "Pass-through" feature flag refers to the ability of the PMD to let input buffers pass-through it, copying the input to the output, without making any modifications to it (no compression done). + + - "OOP SGL In SGL Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Scatter-gater list Output", + which means that the input and output buffers can consist of multiple segments. + + - "OOP SGL In LB Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Flat Buffers Output", + which means that the input buffer can consist of multiple segments combined + with a single segment buffer in the output. + + - "OOP LB In SGL Out" feature flag stands for + "Out-of-place Flat Buffers Input, Scatter-gather list Output", + which means that the output buffer can consist of multiple segments combined + with a single segment buffer in the input. diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..3487e3fb9 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -60,6 +60,12 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is + replaced with the following more explicit flags: + - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT`` + - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT`` + - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT`` + ABI Changes ----------- diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index d596ba872..97ea0d922 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) return "STATEFUL_COMPRESSION"; case RTE_COMP_FF_STATEFUL_DECOMPRESSION: return "STATEFUL_DECOMPRESSION"; - case RTE_COMP_FF_MBUF_SCATTER_GATHER: - return "MBUF_SCATTER_GATHER"; + case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT: + return "OOP_SGL_IN_SGL_OUT"; + case RTE_COMP_FF_OOP_SGL_IN_LB_OUT: + return "OOP_SGL_IN_LB_OUT"; + case RTE_COMP_FF_OOP_LB_IN_SGL_OUT: + return "OOP_LB_IN_SGL_OUT"; case RTE_COMP_FF_MULTI_PKT_CHECKSUM: return "MULTI_PKT_CHECKSUM"; case RTE_COMP_FF_ADLER32_CHECKSUM: diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h index 5b513c77e..274b5eadf 100644 --- a/lib/librte_compressdev/rte_comp.h +++ b/lib/librte_compressdev/rte_comp.h @@ -30,23 +30,34 @@ extern "C" { /**< Stateful compression is supported */ #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) /**< Stateful decompression is supported */ -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) -/**< Scatter-gather mbufs are supported */ -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) +#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) +/**< Out-of-place Scatter-gather (SGL) buffers, + * with multiple segments, are supported in input and output + */ +#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3) +/**< Out-of-place Scatter-gather (SGL) buffers are supported + * in input, combined with linear buffers (LB), with a + * single segment, in output + */ +#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in output, combined with linear buffers (LB) in input + */ +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) /**< Adler-32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) /**< CRC32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) /**< Adler-32/CRC32 Checksum is supported */ -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) /**< Generation of checksum across multiple stateless packets is supported */ -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) /**< SHA1 Hash is supported */ -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) /**< SHA256 Hash of SHA2 family is supported */ -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) /**< Private xforms created by the PMD can be shared * across multiple stateless operations. If not set, then app needs * to create as many priv_xforms as it expects to have stateless -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-06 12:33 ` Verma, Shally 0 siblings, 0 replies; 45+ messages in thread From: Verma, Shally @ 2018-07-06 12:33 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev Hi Pablo Looks fine. Just minor comments: >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 08:24 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >Subject: [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag > ... >@@ -6,19 +6,21 @@ >diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst >index d01c1a966..6d12c3bd6 100644 >--- a/doc/guides/compressdevs/overview.rst >+++ b/doc/guides/compressdevs/overview.rst >@@ -16,3 +16,17 @@ Supported Feature Flags > - "Pass-through" feature flag refers to the ability of the PMD > to let input buffers pass-through it, copying the input to the output, > without making any modifications to it (no compression done). >+ >+ - "OOP SGL In SGL Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output", >+ which means that the input and output buffers can consist of multiple segments. >+ May be its simpler to rephrase it and following somewhat this way: Which means " PMD support different scatter-gather styled input and output buffers i.e. both can consists of multiple segments" >+ - "OOP SGL In LB Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Flat Buffers Output", >+ which means that the input buffer can consist of multiple segments combined >+ with a single segment buffer in the output. Which means "PMD support input from scatter-gathered styled buffers , but can output to linear buffers. And better to replace "flat" by "linear" to be consistent with name. >+ >+ - "OOP LB In SGL Out" feature flag stands for >+ "Out-of-place Flat Buffers Input, Scatter-gather list Output", >+ which means that the output buffer can consist of multiple segments combined >+ with a single segment buffer in the input. Thanks Shally >diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst >index bc0124295..3487e3fb9 100644 >--- a/doc/guides/rel_notes/release_18_08.rst >+++ b/doc/guides/rel_notes/release_18_08.rst >@@ -60,6 +60,12 @@ API Changes > Also, make sure to start the actual text at the margin. > ========================================================= > >+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is >+ replaced with the following more explicit flags: >+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT`` >+ - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT`` >+ - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT`` >+ > > ABI Changes > ----------- >diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c >index d596ba872..97ea0d922 100644 >--- a/lib/librte_compressdev/rte_comp.c >+++ b/lib/librte_compressdev/rte_comp.c >@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) > return "STATEFUL_COMPRESSION"; > case RTE_COMP_FF_STATEFUL_DECOMPRESSION: > return "STATEFUL_DECOMPRESSION"; >- case RTE_COMP_FF_MBUF_SCATTER_GATHER: >- return "MBUF_SCATTER_GATHER"; >+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT: >+ return "OOP_SGL_IN_SGL_OUT"; >+ case RTE_COMP_FF_OOP_SGL_IN_LB_OUT: >+ return "OOP_SGL_IN_LB_OUT"; >+ case RTE_COMP_FF_OOP_LB_IN_SGL_OUT: >+ return "OOP_LB_IN_SGL_OUT"; > case RTE_COMP_FF_MULTI_PKT_CHECKSUM: > return "MULTI_PKT_CHECKSUM"; > case RTE_COMP_FF_ADLER32_CHECKSUM: >diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h >index 5b513c77e..274b5eadf 100644 >--- a/lib/librte_compressdev/rte_comp.h >+++ b/lib/librte_compressdev/rte_comp.h >@@ -30,23 +30,34 @@ extern "C" { > /**< Stateful compression is supported */ > #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) > /**< Stateful decompression is supported */ >-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) >-/**< Scatter-gather mbufs are supported */ >-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) >+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) >+/**< Out-of-place Scatter-gather (SGL) buffers, >+ * with multiple segments, are supported in input and output >+ */ >+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3) >+/**< Out-of-place Scatter-gather (SGL) buffers are supported >+ * in input, combined with linear buffers (LB), with a >+ * single segment, in output >+ */ >+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4) >+/**< Out-of-place Scatter-gather (SGL) mbufs are supported >+ * in output, combined with linear buffers (LB) in input >+ */ >+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) > /**< Adler-32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) >+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) > /**< CRC32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) >+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) > /**< Adler-32/CRC32 Checksum is supported */ >-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) >+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) > /**< Generation of checksum across multiple stateless packets is supported */ >-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) >+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) > /**< SHA1 Hash is supported */ >-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) >+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) > /**< SHA256 Hash of SHA2 family is supported */ >-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) >+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) > /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ >-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) >+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) > /**< Private xforms created by the PMD can be shared > * across multiple stateless operations. If not set, then app needs > * to create as many priv_xforms as it expects to have stateless >-- >2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v4 4/4] compressdev: add huffman encoding flags 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-06 2:54 ` Pablo de Lara 2 siblings, 0 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 2:54 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara 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 <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- v4/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/compress/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[] = { { .algo = RTE_COMP_ALGO_DEFLATE, - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | + RTE_COMP_FF_HUFFMAN_FIXED | + RTE_COMP_FF_HUFFMAN_DYNAMIC, .window_size = { .min = 15, .max = 15, diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_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/rte_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 = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) + return -ENOTSUP; + struct rte_comp_xform *compress_xform = 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 = rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); + const struct rte_compressdev_capabilities *capab; + + capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) + return -ENOTSUP; + if (compress_xform == NULL) { RTE_LOG(ERR, USER1, "Compress xform could not be created\n"); -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (4 preceding siblings ...) 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara @ 2018-07-06 5:27 ` Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 2/4] doc: rename compress feature flag Pablo de Lara ` (3 more replies) 5 siblings, 4 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 5:27 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara In PMD feature matrices (.ini files), it is not required to have the list of features that are not supported, just the ones that are. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Lee Daly <lee.daly@intel.com> --- v5: - Removed "HW Accelerated" from isa-l feature list v4: - No change doc/guides/compressdevs/features/isal.ini | 9 --------- 1 file changed, 9 deletions(-) diff --git a/doc/guides/compressdevs/features/isal.ini b/doc/guides/compressdevs/features/isal.ini index ad2718df0..7183d1034 100644 --- a/doc/guides/compressdevs/features/isal.ini +++ b/doc/guides/compressdevs/features/isal.ini @@ -4,19 +4,10 @@ ; Supported features of 'ISA-L' compression driver. ; [Features] -HW Accelerated = CPU SSE = Y CPU AVX = Y CPU AVX2 = Y CPU AVX512 = Y -CPU NEON = -Stateful = -By-Pass = -Chained mbufs = Deflate = Y -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = Fixed = Y Dynamic = Y -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v5 2/4] doc: rename compress feature flag 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara @ 2018-07-06 5:27 ` Pablo de Lara 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara ` (2 subsequent siblings) 3 siblings, 0 replies; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 5:27 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara Renamed feature "Bypass" to "Pass-through", as it is a more explicit name, meaning that the PMD is capable of passing the mbufs through it, without making any modifications (i.e.. NULL algorithm). Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Shally Verma <shally.verma@caviumnetworks.com> --- v5: - No change v4: - Rephrased pass-through feature comment (Shally) doc/guides/compressdevs/features/default.ini | 2 +- doc/guides/compressdevs/overview.rst | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index 795fc5577..a88414d23 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -13,7 +13,7 @@ CPU AVX2 = CPU AVX512 = CPU NEON = Stateful = -By-Pass = +Pass-through = Chained mbufs = Deflate = LZS = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index ca37de175..d01c1a966 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -10,3 +10,9 @@ Supported Feature Flags .. _table_compression_pmd_features: .. include:: overview_feature_table.txt + +.. Note:: + + - "Pass-through" feature flag refers to the ability of the PMD + to let input buffers pass-through it, copying the input to the output, + without making any modifications to it (no compression done). -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 2/4] doc: rename compress feature flag Pablo de Lara @ 2018-07-06 5:28 ` Pablo de Lara 2018-07-07 6:34 ` Verma, Shally 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags Pablo de Lara 2018-07-09 8:11 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix De Lara Guarch, Pablo 3 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 5:28 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara The current mbuf scatter gather feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not. Therefore, three new flags will replace this flag: - RTE_COMP_FF_OOP_SGL_IN_SGL_OUT - RTE_COMP_FF_OOP_SGL_IN_FB_OUT - RTE_COMP_FF_OOP_LB_IN_SGL_OUT Note that out-of-place flat buffers is supported by default and in-place is not supported by the library. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- v5: - Replaced left "Flat Buffer" with "Linear Buffer" (Shally) - Rephrased comment about new feature flags (Shally) v4: - Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally) - Add extra explanation on comments about Linear Buffers vs Scatter-gather lists v3: - Replaced Out-of-place with OOP - Added new feature flags in default.ini v2: - Fixed typos - Rephrased comments doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++------------- doc/guides/compressdevs/overview.rst | 14 ++++++++++++ doc/guides/rel_notes/release_18_08.rst | 6 +++++ lib/librte_compressdev/rte_comp.c | 8 +++++-- lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++-------- 5 files changed, 65 insertions(+), 28 deletions(-) diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini index a88414d23..829e4df61 100644 --- a/doc/guides/compressdevs/features/default.ini +++ b/doc/guides/compressdevs/features/default.ini @@ -6,19 +6,21 @@ ; the features table in the documentation. ; [Features] -HW Accelerated = -CPU SSE = -CPU AVX = -CPU AVX2 = -CPU AVX512 = -CPU NEON = -Stateful = -Pass-through = -Chained mbufs = -Deflate = -LZS = -Adler32 = -Crc32 = -Adler32&Crc32 = -Fixed = -Dynamic = +HW Accelerated = +CPU SSE = +CPU AVX = +CPU AVX2 = +CPU AVX512 = +CPU NEON = +Stateful = +Pass-through = +OOP SGL In SGL Out = +OOP SGL In LB Out = +OOP LB In SGL Out = +Deflate = +LZS = +Adler32 = +Crc32 = +Adler32&Crc32 = +Fixed = +Dynamic = diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst index d01c1a966..70bbe82b7 100644 --- a/doc/guides/compressdevs/overview.rst +++ b/doc/guides/compressdevs/overview.rst @@ -16,3 +16,17 @@ Supported Feature Flags - "Pass-through" feature flag refers to the ability of the PMD to let input buffers pass-through it, copying the input to the output, without making any modifications to it (no compression done). + + - "OOP SGL In SGL Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Scatter-gater list Output", + which means PMD supports different scatter-gather styled input and output buffers + (i.e. both can consists of multiple segments). + + - "OOP SGL In LB Out" feature flag stands for + "Out-of-place Scatter-gather list Input, Linear Buffers Output", + which means PMD supports input from scatter-gathered styled buffers, outputting linear buffers + (i.e. single segment). + + - "OOP LB In SGL Out" feature flag stands for + "Out-of-place Linear Buffers Input, Scatter-gather list Output", + which means PMD supports input from linear buffer, outputting scatter-gathered styled buffers. diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..3487e3fb9 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -60,6 +60,12 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is + replaced with the following more explicit flags: + - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT`` + - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT`` + - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT`` + ABI Changes ----------- diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index d596ba872..97ea0d922 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag) return "STATEFUL_COMPRESSION"; case RTE_COMP_FF_STATEFUL_DECOMPRESSION: return "STATEFUL_DECOMPRESSION"; - case RTE_COMP_FF_MBUF_SCATTER_GATHER: - return "MBUF_SCATTER_GATHER"; + case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT: + return "OOP_SGL_IN_SGL_OUT"; + case RTE_COMP_FF_OOP_SGL_IN_LB_OUT: + return "OOP_SGL_IN_LB_OUT"; + case RTE_COMP_FF_OOP_LB_IN_SGL_OUT: + return "OOP_LB_IN_SGL_OUT"; case RTE_COMP_FF_MULTI_PKT_CHECKSUM: return "MULTI_PKT_CHECKSUM"; case RTE_COMP_FF_ADLER32_CHECKSUM: diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h index 5b513c77e..274b5eadf 100644 --- a/lib/librte_compressdev/rte_comp.h +++ b/lib/librte_compressdev/rte_comp.h @@ -30,23 +30,34 @@ extern "C" { /**< Stateful compression is supported */ #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) /**< Stateful decompression is supported */ -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) -/**< Scatter-gather mbufs are supported */ -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) +#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) +/**< Out-of-place Scatter-gather (SGL) buffers, + * with multiple segments, are supported in input and output + */ +#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3) +/**< Out-of-place Scatter-gather (SGL) buffers are supported + * in input, combined with linear buffers (LB), with a + * single segment, in output + */ +#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4) +/**< Out-of-place Scatter-gather (SGL) mbufs are supported + * in output, combined with linear buffers (LB) in input + */ +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) /**< Adler-32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) /**< CRC32 Checksum is supported */ -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) /**< Adler-32/CRC32 Checksum is supported */ -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) /**< Generation of checksum across multiple stateless packets is supported */ -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) /**< SHA1 Hash is supported */ -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) /**< SHA256 Hash of SHA2 family is supported */ -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) /**< Private xforms created by the PMD can be shared * across multiple stateless operations. If not set, then app needs * to create as many priv_xforms as it expects to have stateless -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-07 6:34 ` Verma, Shally 2018-07-09 8:07 ` De Lara Guarch, Pablo 0 siblings, 1 reply; 45+ messages in thread From: Verma, Shally @ 2018-07-07 6:34 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 10:58 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >Subject: [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag > >External Email > >The current mbuf scatter gather feature flag is >too ambiguous, as it is not clear if input and/or output >buffers can be scatter gather mbufs or not. > >Therefore, three new flags will replace this flag: >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT >- RTE_COMP_FF_OOP_LB_IN_SGL_OUT > >Note that out-of-place flat buffers is supported by default >and in-place is not supported by the library. > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> >--- > >v5: >- Replaced left "Flat Buffer" with "Linear Buffer" (Shally) >- Rephrased comment about new feature flags (Shally) > >v4: >- Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally) >- Add extra explanation on comments about Linear Buffers vs > Scatter-gather lists > >v3: >- Replaced Out-of-place with OOP >- Added new feature flags in default.ini > >v2: >- Fixed typos >- Rephrased comments > > doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++------------- > doc/guides/compressdevs/overview.rst | 14 ++++++++++++ > doc/guides/rel_notes/release_18_08.rst | 6 +++++ > lib/librte_compressdev/rte_comp.c | 8 +++++-- > lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++-------- > 5 files changed, 65 insertions(+), 28 deletions(-) > ... >diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst >index d01c1a966..70bbe82b7 100644 >--- a/doc/guides/compressdevs/overview.rst >+++ b/doc/guides/compressdevs/overview.rst >@@ -16,3 +16,17 @@ Supported Feature Flags > - "Pass-through" feature flag refers to the ability of the PMD > to let input buffers pass-through it, copying the input to the output, > without making any modifications to it (no compression done). >+ >+ - "OOP SGL In SGL Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output", >+ which means PMD supports different scatter-gather styled input and output buffers >+ (i.e. both can consists of multiple segments). >+ >+ - "OOP SGL In LB Out" feature flag stands for >+ "Out-of-place Scatter-gather list Input, Linear Buffers Output", >+ which means PMD supports input from scatter-gathered styled buffers, outputting linear buffers >+ (i.e. single segment). >+ >+ - "OOP LB In SGL Out" feature flag stands for >+ "Out-of-place Linear Buffers Input, Scatter-gather list Output", >+ which means PMD supports input from linear buffer, outputting scatter-gathered styled buffers. .... >diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h >index 5b513c77e..274b5eadf 100644 >--- a/lib/librte_compressdev/rte_comp.h >+++ b/lib/librte_compressdev/rte_comp.h >@@ -30,23 +30,34 @@ extern "C" { > /**< Stateful compression is supported */ > #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) > /**< Stateful decompression is supported */ >-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) >-/**< Scatter-gather mbufs are supported */ >-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) >+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) >+/**< Out-of-place Scatter-gather (SGL) buffers, >+ * with multiple segments, are supported in input and output >+ */ >+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3) >+/**< Out-of-place Scatter-gather (SGL) buffers are supported >+ * in input, combined with linear buffers (LB), with a >+ * single segment, in output >+ */ >+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4) >+/**< Out-of-place Scatter-gather (SGL) mbufs are supported >+ * in output, combined with linear buffers (LB) in input >+ */ [Shally] Similar rephrase here please. Rest, Acked-by: Shally Verma <shally.verma@caviumnetworks.com> Thanks Shally >+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5) > /**< Adler-32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4) >+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6) > /**< CRC32 Checksum is supported */ >-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5) >+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7) > /**< Adler-32/CRC32 Checksum is supported */ >-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6) >+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8) > /**< Generation of checksum across multiple stateless packets is supported */ >-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7) >+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9) > /**< SHA1 Hash is supported */ >-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8) >+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10) > /**< SHA256 Hash of SHA2 family is supported */ >-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9) >+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11) > /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */ >-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10) >+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12) > /**< Private xforms created by the PMD can be shared > * across multiple stateless operations. If not set, then app needs > * to create as many priv_xforms as it expects to have stateless >-- >2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag 2018-07-07 6:34 ` Verma, Shally @ 2018-07-09 8:07 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-09 8:07 UTC (permalink / raw) To: Verma, Shally, Gupta, Ashish, Trahe, Fiona, Daly, Lee; +Cc: dev > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Saturday, July 7, 2018 7:34 AM > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Gupta, Ashish > <Ashish.Gupta@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee > <lee.daly@intel.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag > > > > >-----Original Message----- > >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 06 July 2018 10:58 > >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish > ><Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; lee.daly@intel.com > >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> > >Subject: [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag > > > >External Email > > > >The current mbuf scatter gather feature flag is too ambiguous, as it is > >not clear if input and/or output buffers can be scatter gather mbufs or > >not. > > > >Therefore, three new flags will replace this flag: > >- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT > >- RTE_COMP_FF_OOP_SGL_IN_FB_OUT > >- RTE_COMP_FF_OOP_LB_IN_SGL_OUT > > > >Note that out-of-place flat buffers is supported by default and > >in-place is not supported by the library. > > > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > >Acked-by: Fiona Trahe <fiona.trahe@intel.com> > >--- > > > >v5: > >- Replaced left "Flat Buffer" with "Linear Buffer" (Shally) > >- Rephrased comment about new feature flags (Shally) > > > >v4: > >- Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally) > >- Add extra explanation on comments about Linear Buffers vs > > Scatter-gather lists > > > >v3: > >- Replaced Out-of-place with OOP > >- Added new feature flags in default.ini > > > >v2: > >- Fixed typos > >- Rephrased comments > > > > doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++---------- > --- > > doc/guides/compressdevs/overview.rst | 14 ++++++++++++ > > doc/guides/rel_notes/release_18_08.rst | 6 +++++ > > lib/librte_compressdev/rte_comp.c | 8 +++++-- > > lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++-------- > > 5 files changed, 65 insertions(+), 28 deletions(-) > > > ... > > >diff --git a/doc/guides/compressdevs/overview.rst > >b/doc/guides/compressdevs/overview.rst > >index d01c1a966..70bbe82b7 100644 > >--- a/doc/guides/compressdevs/overview.rst > >+++ b/doc/guides/compressdevs/overview.rst > >@@ -16,3 +16,17 @@ Supported Feature Flags > > - "Pass-through" feature flag refers to the ability of the PMD > > to let input buffers pass-through it, copying the input to the output, > > without making any modifications to it (no compression done). > >+ > >+ - "OOP SGL In SGL Out" feature flag stands for > >+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output", > >+ which means PMD supports different scatter-gather styled input and output > buffers > >+ (i.e. both can consists of multiple segments). > >+ > >+ - "OOP SGL In LB Out" feature flag stands for > >+ "Out-of-place Scatter-gather list Input, Linear Buffers Output", > >+ which means PMD supports input from scatter-gathered styled buffers, > outputting linear buffers > >+ (i.e. single segment). > >+ > >+ - "OOP LB In SGL Out" feature flag stands for > >+ "Out-of-place Linear Buffers Input, Scatter-gather list Output", > >+ which means PMD supports input from linear buffer, outputting scatter- > gathered styled buffers. > > .... > > >diff --git a/lib/librte_compressdev/rte_comp.h > >b/lib/librte_compressdev/rte_comp.h > >index 5b513c77e..274b5eadf 100644 > >--- a/lib/librte_compressdev/rte_comp.h > >+++ b/lib/librte_compressdev/rte_comp.h > >@@ -30,23 +30,34 @@ extern "C" { > > /**< Stateful compression is supported */ > > #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1) > > /**< Stateful decompression is supported */ > >-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2) > >-/**< Scatter-gather mbufs are supported */ > >-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3) > >+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2) > >+/**< Out-of-place Scatter-gather (SGL) buffers, > >+ * with multiple segments, are supported in input and output */ > >+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3) > >+/**< Out-of-place Scatter-gather (SGL) buffers are supported > >+ * in input, combined with linear buffers (LB), with a > >+ * single segment, in output > >+ */ > >+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4) > >+/**< Out-of-place Scatter-gather (SGL) mbufs are supported > >+ * in output, combined with linear buffers (LB) in input */ > [Shally] Similar rephrase here please. Ok, I am replacing "mbufs" with "buffers". I won't clarify what SGL and LB means, as it is done in the previous macros. I will make this change on the fly as I am applying this patch, as it is the last comment, I believe. Thanks, Pablo > > Rest, > Acked-by: Shally Verma <shally.verma@caviumnetworks.com> ^ permalink raw reply [flat|nested] 45+ messages in thread
* [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara @ 2018-07-06 5:28 ` Pablo de Lara 2018-07-07 6:36 ` Verma, Shally 2018-07-09 8:11 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix De Lara Guarch, Pablo 3 siblings, 1 reply; 45+ messages in thread From: Pablo de Lara @ 2018-07-06 5:28 UTC (permalink / raw) To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara 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 <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- 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/compress/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[] = { { .algo = RTE_COMP_ALGO_DEFLATE, - .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | + RTE_COMP_FF_HUFFMAN_FIXED | + RTE_COMP_FF_HUFFMAN_DYNAMIC, .window_size = { .min = 15, .max = 15, diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_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/rte_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 = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) + return -ENOTSUP; + struct rte_comp_xform *compress_xform = 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 = rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); + const struct rte_compressdev_capabilities *capab; + + capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); + TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); + + if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) + return -ENOTSUP; + if (compress_xform == NULL) { RTE_LOG(ERR, USER1, "Compress xform could not be created\n"); -- 2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags Pablo de Lara @ 2018-07-07 6:36 ` Verma, Shally 0 siblings, 0 replies; 45+ messages in thread From: Verma, Shally @ 2018-07-07 6:36 UTC (permalink / raw) To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 06 July 2018 10:58 >To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com; >lee.daly@intel.com >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com> >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 <pablo.de.lara.guarch@intel.com> >Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Shally Verma <shally.verma@caviumnetworks.com> 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/compress/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[] = { > { > .algo = RTE_COMP_ALGO_DEFLATE, >- .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM, >+ .comp_feature_flags = RTE_COMP_FF_SHAREABLE_PRIV_XFORM | >+ RTE_COMP_FF_HUFFMAN_FIXED | >+ RTE_COMP_FF_HUFFMAN_DYNAMIC, > .window_size = { > .min = 15, > .max = 15, >diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_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/rte_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 = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); >+ TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) >+ return -ENOTSUP; >+ > struct rte_comp_xform *compress_xform = > 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 = > rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); > >+ const struct rte_compressdev_capabilities *capab; >+ >+ capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE); >+ TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities"); >+ >+ if ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) >+ return -ENOTSUP; >+ > if (compress_xform == NULL) { > RTE_LOG(ERR, USER1, > "Compress xform could not be created\n"); >-- >2.14.4 ^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara ` (2 preceding siblings ...) 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags Pablo de Lara @ 2018-07-09 8:11 ` De Lara Guarch, Pablo 3 siblings, 0 replies; 45+ messages in thread From: De Lara Guarch, Pablo @ 2018-07-09 8:11 UTC (permalink / raw) To: shally.verma, ashish.gupta, Trahe, Fiona, Daly, Lee; +Cc: dev > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Friday, July 6, 2018 6:28 AM > To: shally.verma@caviumnetworks.com; ashish.gupta@caviumnetworks.com; > Trahe, Fiona <fiona.trahe@intel.com>; Daly, Lee <lee.daly@intel.com> > Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com> > Subject: [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix > > In PMD feature matrices (.ini files), it is not required to have the list of features > that are not supported, just the ones that are. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > Acked-by: Lee Daly <lee.daly@intel.com> > --- Patchset applied to dpdk-next-crypto, with Shally's last comment addressed. Thanks, Pablo ^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2018-07-09 8:11 UTC | newest] Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-06-27 5:50 [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 5:50 ` [dpdk-dev] [PATCH 2/2] compressdev: add huffman encoding flags Pablo de Lara 2018-06-27 15:22 ` Trahe, Fiona 2018-06-27 15:36 ` De Lara Guarch, Pablo 2018-06-27 17:35 ` Trahe, Fiona 2018-06-28 10:00 ` Daly, Lee 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-06-27 12:16 ` [dpdk-dev] [PATCH v2 2/2] compressdev: add huffman encoding flags Pablo de Lara 2018-06-28 7:49 ` Trahe, Fiona 2018-06-28 7:48 ` [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag Trahe, Fiona 2018-06-29 10:08 ` Trahe, Fiona 2018-06-27 15:14 ` [dpdk-dev] [PATCH " Trahe, Fiona 2018-06-27 15:33 ` De Lara Guarch, Pablo 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-05 2:41 ` Verma, Shally 2018-07-05 11:03 ` De Lara Guarch, Pablo 2018-07-05 8:07 ` Trahe, Fiona 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-07-05 8:38 ` Verma, Shally 2018-07-05 11:05 ` De Lara Guarch, Pablo 2018-07-05 11:12 ` Verma, Shally 2018-07-05 11:25 ` De Lara Guarch, Pablo 2018-07-05 11:58 ` Verma, Shally 2018-07-06 8:40 ` De Lara Guarch, Pablo 2018-07-06 8:53 ` Verma, Shally 2018-07-06 8:59 ` De Lara Guarch, Pablo 2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 4/4] compressdev: add huffman encoding flags Pablo de Lara 2018-07-05 8:14 ` Verma, Shally 2018-07-05 11:21 ` De Lara Guarch, Pablo 2018-07-05 8:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Daly, Lee 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 " Pablo de Lara 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-06 12:17 ` Verma, Shally 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-07-06 12:33 ` Verma, Shally 2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 4/4] compressdev: add huffman encoding flags Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara 2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 2/4] doc: rename compress feature flag Pablo de Lara 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara 2018-07-07 6:34 ` Verma, Shally 2018-07-09 8:07 ` De Lara Guarch, Pablo 2018-07-06 5:28 ` [dpdk-dev] [PATCH v5 4/4] compressdev: add huffman encoding flags Pablo de Lara 2018-07-07 6:36 ` Verma, Shally 2018-07-09 8:11 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix De Lara Guarch, Pablo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).