[dpdk-dev] [PATCH] compress/isal: fixes ISA-L PMD used with offsets in mbuf

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Jul 11 10:48:40 CEST 2018


Hi Lee,

> -----Original Message-----
> From: Daly, Lee
> Sent: Tuesday, July 10, 2018 1:44 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: dev at dpdk.org; Daly, Lee <lee.daly at intel.com>; stable at dpdk.org
> Subject: [PATCH] compress/isal: fixes ISA-L PMD used with offsets in mbuf
> 

No need to use ISA-L PMD in the title, as it is a duplicate.
Also, titles always start with verb in infinitive (fix).
So, maybe a suggestion could be: "compress/isal: fix offset usage"?


> This patch allows the ISA-L compression PMD, to be used with offsets in the
> mbuf.
> Offsets can now be used for source and destination buffers, during compression
> or decompression.
> 
> Fixes: dc49e6a "compress/isal: add ISA-L compression functionality"
> Fixes: 7bf4f06 "compress/isal: add ISA-L decomp functionality"
> Cc: stable at dpdk.org
> 
> Signed-off-by: Lee Daly <lee.daly at intel.com>

...

> +	qp->stream->end_of_stream = 1; /* All input consumed in one go */
> +	if ((op->src.length + op->src.offset) > op->m_src->data_len) {
> +		ISAL_PMD_LOG(ERR, "Input mbuf not big enough for
> offset.\n");

I would rephrase this to "Input buffer not big enough for the length and offset provided".
Same for inflate.

> +		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
> +		return -1;
> +	}
> +	/* Point compression stream to input buffer */
> +	qp->stream->avail_in = op->src.length;
> +	qp->stream->next_in = rte_pktmbuf_mtod_offset(op->m_src, uint8_t *,
> +			op->src.offset);
> +
> +	if (op->dst.offset > op->m_dst->data_len) {
> +		ISAL_PMD_LOG(ERR, "Output mbuf not big enough for
> offset.\n");

I would rephrase this to "Output buffer not big enough for the offset provided".
Same for inflate.

> +		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
> +		return -1;
> +	}



More information about the dev mailing list