From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17ABFA056E; Wed, 11 Mar 2020 13:28:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A41991C000; Wed, 11 Mar 2020 13:28:17 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 56E3BFEB for ; Wed, 11 Mar 2020 13:28:15 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2020 05:28:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,540,1574150400"; d="scan'208";a="277356865" Received: from adamdybx-mobl.ger.corp.intel.com (HELO addy-VirtualBox.ger.corp.intel.com) ([10.104.121.4]) by fmsmga002.fm.intel.com with ESMTP; 11 Mar 2020 05:28:11 -0700 From: Adam Dybkowski To: dev@dpdk.org, fiona.trahe@intel.com, akhil.goyal@nxp.com, adamx.dybkowski@intel.com Date: Wed, 11 Mar 2020 13:26:07 +0100 Message-Id: <20200311122608.1262-2-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200311122608.1262-1-adamx.dybkowski@intel.com> References: <20200311122608.1262-1-adamx.dybkowski@intel.com> Subject: [dpdk-dev] [PATCH 2/3] crypto/qat: optimise check 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Fiona Trahe To detect if sgl, use nb_segs > 1, instead of checking for next pointer, as nb_segs is in first cache-line while next is in second cache-line. Signed-off-by: Fiona Trahe --- drivers/crypto/qat/qat_sym.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index cecced66d..25b6dd5f4 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -428,7 +428,8 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, min_ofs = op->sym->aead.data.offset; } - if (op->sym->m_src->next || (op->sym->m_dst && op->sym->m_dst->next)) + if (op->sym->m_src->nb_segs > 1 || + (op->sym->m_dst && op->sym->m_dst->nb_segs > 1)) do_sgl = 1; /* adjust for chain case */ -- 2.17.1