DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/crypto-perf: fix digest data for chained mbufs
@ 2017-06-30  7:56 Sergio Gonzalez Monroy
  2017-06-30 16:34 ` Trahe, Fiona
  0 siblings, 1 reply; 3+ messages in thread
From: Sergio Gonzalez Monroy @ 2017-06-30  7:56 UTC (permalink / raw)
  To: dev, stable

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 <sergio.gonzalez.monroy@intel.com>
---
 app/test-crypto-perf/cperf_ops.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index c2c3db5..17df2eb 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,
-- 
2.9.3

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

end of thread, other threads:[~2017-07-02 10:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  7:56 [dpdk-dev] [PATCH] app/crypto-perf: fix digest data for chained mbufs Sergio Gonzalez Monroy
2017-06-30 16:34 ` Trahe, Fiona
2017-07-02 10:58   ` [dpdk-dev] [dpdk-stable] " 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).