From: Sergio Gonzalez Monroy Date: Fri, 30 Jun 2017 07:56:03 +0000 (+0100) Subject: app/crypto-perf: fix digest data for chained mbufs X-Git-Tag: spdx-start~2701 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b9bdd5934de39719448baac6e6a22bab3974c4a1;p=dpdk.git app/crypto-perf: fix digest data for chained mbufs Use corect mbuf segment for chained mbufs. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Cc: stable@dpdk.org Signed-off-by: Sergio Gonzalez Monroy Acked-by: Fiona Trahe --- diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c index c2c3db572f..17df2eb469 100644 --- a/app/test-crypto-perf/cperf_ops.c +++ b/app/test-crypto-perf/cperf_ops.c @@ -151,14 +151,13 @@ cperf_set_ops_auth(struct rte_crypto_op **ops, if (options->out_of_place) { buf = bufs_out[i]; } else { - buf = bufs_in[i]; - - tbuf = buf; + tbuf = bufs_in[i]; while ((tbuf->next != NULL) && (offset >= tbuf->data_len)) { offset -= tbuf->data_len; tbuf = tbuf->next; } + buf = tbuf; } sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf, @@ -230,14 +229,13 @@ cperf_set_ops_cipher_auth(struct rte_crypto_op **ops, if (options->out_of_place) { buf = bufs_out[i]; } else { - buf = bufs_in[i]; - - tbuf = buf; + tbuf = bufs_in[i]; while ((tbuf->next != NULL) && (offset >= tbuf->data_len)) { offset -= tbuf->data_len; tbuf = tbuf->next; } + buf = tbuf; } sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf, @@ -308,14 +306,13 @@ cperf_set_ops_aead(struct rte_crypto_op **ops, if (options->out_of_place) { buf = bufs_out[i]; } else { - buf = bufs_in[i]; - - tbuf = buf; + tbuf = bufs_in[i]; while ((tbuf->next != NULL) && (offset >= tbuf->data_len)) { offset -= tbuf->data_len; tbuf = tbuf->next; } + buf = tbuf; } sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf,