DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow
@ 2019-01-24 15:19 Lee Daly
       [not found] ` <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Daly @ 2019-01-24 15:19 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, Lee Daly

This patch will change the operation status when ISA-L returns because
of a recoverable out of space error, rather than a just generic fail.

Signed-off-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 4748238..19c4d70 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -348,12 +348,6 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
 
 		ret = isal_inflate(qp->state);
 
-		if (ret != ISAL_DECOMP_OK) {
-			ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
-			op->status = RTE_COMP_OP_STATUS_ERROR;
-			return ret;
-		}
-
 		/* Check for first segment, offset needs to be accounted for */
 		if (remaining_data == op->src.length) {
 			consumed_data = src->data_len - src_remaining_offset;
@@ -374,6 +368,20 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
 			}
 		}
 
+		if (ret == ISAL_OUT_OVERFLOW) {
+			ISAL_PMD_LOG(ERR, "Decompression operation ran "
+				"out of space, but can be recovered.\n%d bytes "
+				"consumed\t%d bytes produced\n",
+				consumed_data, qp->state->total_out);
+				op->status =
+				RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
+			return ret;
+		} else if (ret < 0) {
+			ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+			op->status = RTE_COMP_OP_STATUS_ERROR;
+			return ret;
+		}
+
 		if (qp->state->avail_out == 0 &&
 				qp->state->block_state != ISAL_BLOCK_FINISH) {
 			if (dst->next != NULL) {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow
       [not found] ` <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com>
@ 2019-03-27 17:44   ` Cel, TomaszX
  2019-03-27 17:44     ` Cel, TomaszX
  2019-03-29 15:23     ` Akhil Goyal
  0 siblings, 2 replies; 5+ messages in thread
From: Cel, TomaszX @ 2019-03-27 17:44 UTC (permalink / raw)
  To: dev, Akhil Goyal, Daly, Lee

Hi Lee,

> This patch will change the operation status when ISA-L returns because of a
> recoverable out of space error, rather than a just generic fail.
> 
> Signed-off-by: Lee Daly <lee.daly@intel.com>
> ---
>  drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/compress/isal/isal_compress_pmd.c
> b/drivers/compress/isal/isal_compress_pmd.c
> index 4748238..19c4d70 100644
> --- a/drivers/compress/isal/isal_compress_pmd.c
> +++ b/drivers/compress/isal/isal_compress_pmd.c
> @@ -348,12 +348,6 @@ chained_mbuf_decompression(struct rte_comp_op
> *op, struct isal_comp_qp *qp)
> 
>  		ret = isal_inflate(qp->state);
> 
> -		if (ret != ISAL_DECOMP_OK) {
> -			ISAL_PMD_LOG(ERR, "Decompression operation
> failed\n");
> -			op->status = RTE_COMP_OP_STATUS_ERROR;
> -			return ret;
> -		}
> -
>  		/* Check for first segment, offset needs to be accounted for
> */
>  		if (remaining_data == op->src.length) {
>  			consumed_data = src->data_len -
> src_remaining_offset; @@ -374,6 +368,20 @@
> chained_mbuf_decompression(struct rte_comp_op *op, struct
> isal_comp_qp *qp)
>  			}
>  		}
> 
> +		if (ret == ISAL_OUT_OVERFLOW) {
> +			ISAL_PMD_LOG(ERR, "Decompression operation ran
> "
> +				"out of space, but can be recovered.\n%d
> bytes "
> +				"consumed\t%d bytes produced\n",
> +				consumed_data, qp->state->total_out);
> +				op->status =
> +
> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
> +			return ret;
> +		} else if (ret < 0) {
> +			ISAL_PMD_LOG(ERR, "Decompression operation
> failed\n");
> +			op->status = RTE_COMP_OP_STATUS_ERROR;
> +			return ret;
> +		}
> +
>  		if (qp->state->avail_out == 0 &&
>  				qp->state->block_state !=
> ISAL_BLOCK_FINISH) {
>  			if (dst->next != NULL) {
> --

Tested-by:  Tomasz Cel <tomaszx.cel@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow
  2019-03-27 17:44   ` Cel, TomaszX
@ 2019-03-27 17:44     ` Cel, TomaszX
  2019-03-29 15:23     ` Akhil Goyal
  1 sibling, 0 replies; 5+ messages in thread
From: Cel, TomaszX @ 2019-03-27 17:44 UTC (permalink / raw)
  To: dev, Akhil Goyal, Daly, Lee

Hi Lee,

> This patch will change the operation status when ISA-L returns because of a
> recoverable out of space error, rather than a just generic fail.
> 
> Signed-off-by: Lee Daly <lee.daly@intel.com>
> ---
>  drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/compress/isal/isal_compress_pmd.c
> b/drivers/compress/isal/isal_compress_pmd.c
> index 4748238..19c4d70 100644
> --- a/drivers/compress/isal/isal_compress_pmd.c
> +++ b/drivers/compress/isal/isal_compress_pmd.c
> @@ -348,12 +348,6 @@ chained_mbuf_decompression(struct rte_comp_op
> *op, struct isal_comp_qp *qp)
> 
>  		ret = isal_inflate(qp->state);
> 
> -		if (ret != ISAL_DECOMP_OK) {
> -			ISAL_PMD_LOG(ERR, "Decompression operation
> failed\n");
> -			op->status = RTE_COMP_OP_STATUS_ERROR;
> -			return ret;
> -		}
> -
>  		/* Check for first segment, offset needs to be accounted for
> */
>  		if (remaining_data == op->src.length) {
>  			consumed_data = src->data_len -
> src_remaining_offset; @@ -374,6 +368,20 @@
> chained_mbuf_decompression(struct rte_comp_op *op, struct
> isal_comp_qp *qp)
>  			}
>  		}
> 
> +		if (ret == ISAL_OUT_OVERFLOW) {
> +			ISAL_PMD_LOG(ERR, "Decompression operation ran
> "
> +				"out of space, but can be recovered.\n%d
> bytes "
> +				"consumed\t%d bytes produced\n",
> +				consumed_data, qp->state->total_out);
> +				op->status =
> +
> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
> +			return ret;
> +		} else if (ret < 0) {
> +			ISAL_PMD_LOG(ERR, "Decompression operation
> failed\n");
> +			op->status = RTE_COMP_OP_STATUS_ERROR;
> +			return ret;
> +		}
> +
>  		if (qp->state->avail_out == 0 &&
>  				qp->state->block_state !=
> ISAL_BLOCK_FINISH) {
>  			if (dst->next != NULL) {
> --

Tested-by:  Tomasz Cel <tomaszx.cel@intel.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow
  2019-03-27 17:44   ` Cel, TomaszX
  2019-03-27 17:44     ` Cel, TomaszX
@ 2019-03-29 15:23     ` Akhil Goyal
  2019-03-29 15:23       ` Akhil Goyal
  1 sibling, 1 reply; 5+ messages in thread
From: Akhil Goyal @ 2019-03-29 15:23 UTC (permalink / raw)
  To: Cel, TomaszX, dev, Daly, Lee



On 3/27/2019 11:14 PM, Cel, TomaszX wrote:
> Hi Lee,
>
>> This patch will change the operation status when ISA-L returns because of a
>> recoverable out of space error, rather than a just generic fail.
>>
>> Signed-off-by: Lee Daly <lee.daly@intel.com>
>> ---
>>   drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------
>>   1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/compress/isal/isal_compress_pmd.c
>> b/drivers/compress/isal/isal_compress_pmd.c
>> index 4748238..19c4d70 100644
>> --- a/drivers/compress/isal/isal_compress_pmd.c
>> +++ b/drivers/compress/isal/isal_compress_pmd.c
>> @@ -348,12 +348,6 @@ chained_mbuf_decompression(struct rte_comp_op
>> *op, struct isal_comp_qp *qp)
>>
>>   		ret = isal_inflate(qp->state);
>>
>> -		if (ret != ISAL_DECOMP_OK) {
>> -			ISAL_PMD_LOG(ERR, "Decompression operation
>> failed\n");
>> -			op->status = RTE_COMP_OP_STATUS_ERROR;
>> -			return ret;
>> -		}
>> -
>>   		/* Check for first segment, offset needs to be accounted for
>> */
>>   		if (remaining_data == op->src.length) {
>>   			consumed_data = src->data_len -
>> src_remaining_offset; @@ -374,6 +368,20 @@
>> chained_mbuf_decompression(struct rte_comp_op *op, struct
>> isal_comp_qp *qp)
>>   			}
>>   		}
>>
>> +		if (ret == ISAL_OUT_OVERFLOW) {
>> +			ISAL_PMD_LOG(ERR, "Decompression operation ran
>> "
>> +				"out of space, but can be recovered.\n%d
>> bytes "
>> +				"consumed\t%d bytes produced\n",
>> +				consumed_data, qp->state->total_out);
>> +				op->status =
>> +
>> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
>> +			return ret;
>> +		} else if (ret < 0) {
>> +			ISAL_PMD_LOG(ERR, "Decompression operation
>> failed\n");
>> +			op->status = RTE_COMP_OP_STATUS_ERROR;
>> +			return ret;
>> +		}
>> +
>>   		if (qp->state->avail_out == 0 &&
>>   				qp->state->block_state !=
>> ISAL_BLOCK_FINISH) {
>>   			if (dst->next != NULL) {
>> --
> Tested-by:  Tomasz Cel <tomaszx.cel@intel.com>
>
>
Applied to dpdk-next-crypto
Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow
  2019-03-29 15:23     ` Akhil Goyal
@ 2019-03-29 15:23       ` Akhil Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2019-03-29 15:23 UTC (permalink / raw)
  To: Cel, TomaszX, dev, Daly, Lee



On 3/27/2019 11:14 PM, Cel, TomaszX wrote:
> Hi Lee,
>
>> This patch will change the operation status when ISA-L returns because of a
>> recoverable out of space error, rather than a just generic fail.
>>
>> Signed-off-by: Lee Daly <lee.daly@intel.com>
>> ---
>>   drivers/compress/isal/isal_compress_pmd.c | 20 ++++++++++++++------
>>   1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/compress/isal/isal_compress_pmd.c
>> b/drivers/compress/isal/isal_compress_pmd.c
>> index 4748238..19c4d70 100644
>> --- a/drivers/compress/isal/isal_compress_pmd.c
>> +++ b/drivers/compress/isal/isal_compress_pmd.c
>> @@ -348,12 +348,6 @@ chained_mbuf_decompression(struct rte_comp_op
>> *op, struct isal_comp_qp *qp)
>>
>>   		ret = isal_inflate(qp->state);
>>
>> -		if (ret != ISAL_DECOMP_OK) {
>> -			ISAL_PMD_LOG(ERR, "Decompression operation
>> failed\n");
>> -			op->status = RTE_COMP_OP_STATUS_ERROR;
>> -			return ret;
>> -		}
>> -
>>   		/* Check for first segment, offset needs to be accounted for
>> */
>>   		if (remaining_data == op->src.length) {
>>   			consumed_data = src->data_len -
>> src_remaining_offset; @@ -374,6 +368,20 @@
>> chained_mbuf_decompression(struct rte_comp_op *op, struct
>> isal_comp_qp *qp)
>>   			}
>>   		}
>>
>> +		if (ret == ISAL_OUT_OVERFLOW) {
>> +			ISAL_PMD_LOG(ERR, "Decompression operation ran
>> "
>> +				"out of space, but can be recovered.\n%d
>> bytes "
>> +				"consumed\t%d bytes produced\n",
>> +				consumed_data, qp->state->total_out);
>> +				op->status =
>> +
>> 	RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
>> +			return ret;
>> +		} else if (ret < 0) {
>> +			ISAL_PMD_LOG(ERR, "Decompression operation
>> failed\n");
>> +			op->status = RTE_COMP_OP_STATUS_ERROR;
>> +			return ret;
>> +		}
>> +
>>   		if (qp->state->avail_out == 0 &&
>>   				qp->state->block_state !=
>> ISAL_BLOCK_FINISH) {
>>   			if (dst->next != NULL) {
>> --
> Tested-by:  Tomasz Cel <tomaszx.cel@intel.com>
>
>
Applied to dpdk-next-crypto
Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-29 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 15:19 [dpdk-dev] [PATCH] compress/isal: add appropriate flag on overflow Lee Daly
     [not found] ` <6976F642F4CB7B4C9D17DE41C99F326019177641@hasmsx107.ger.corp.intel.com>
2019-03-27 17:44   ` Cel, TomaszX
2019-03-27 17:44     ` Cel, TomaszX
2019-03-29 15:23     ` Akhil Goyal
2019-03-29 15:23       ` Akhil Goyal

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).