From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B4C922C2A; Fri, 30 Jun 2017 09:58:59 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2017 00:58:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,285,1496127600"; d="scan'208";a="1188918794" Received: from silpixa00397517.ir.intel.com ([10.237.222.54]) by fmsmga002.fm.intel.com with ESMTP; 30 Jun 2017 00:56:04 -0700 From: Sergio Gonzalez Monroy To: dev@dpdk.org, stable@dpdk.org Date: Fri, 30 Jun 2017 08:56:03 +0100 Message-Id: <20170630075603.45695-1-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 2.9.3 Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix digest data for chained mbufs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 07:59:00 -0000 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 --- 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