DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adam Dybkowski <adamx.dybkowski@intel.com>
To: dev@dpdk.org, fiona.trahe@intel.com, akhil.goyal@nxp.com,
	adamx.dybkowski@intel.com
Subject: [dpdk-dev] [PATCH 2/3] crypto/qat: optimise check for chained mbufs
Date: Wed, 11 Mar 2020 13:26:07 +0100	[thread overview]
Message-ID: <20200311122608.1262-2-adamx.dybkowski@intel.com> (raw)
In-Reply-To: <20200311122608.1262-1-adamx.dybkowski@intel.com>

From: Fiona Trahe <fiona.trahe@intel.com>

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 <fiona.trahe@intel.com>
---
 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


  reply	other threads:[~2020-03-11 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 12:26 [dpdk-dev] [PATCH 1/3] crypto/qat: improve out-of-place conditional check Adam Dybkowski
2020-03-11 12:26 ` Adam Dybkowski [this message]
2020-03-11 15:44   ` [dpdk-dev] [PATCH 2/3] crypto/qat: optimise check for chained mbufs Kusztal, ArkadiuszX
2020-03-11 12:26 ` [dpdk-dev] [PATCH 3/3] common/qat: optimise calculation of cookie index Adam Dybkowski
2020-03-11 15:44   ` Kusztal, ArkadiuszX
2020-03-11 15:45 ` [dpdk-dev] [PATCH 1/3] crypto/qat: improve out-of-place conditional check Kusztal, ArkadiuszX
2020-03-25 19:06   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200311122608.1262-2-adamx.dybkowski@intel.com \
    --to=adamx.dybkowski@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).