DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Luse, Paul E" <paul.e.luse@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/3] crypto/aesni_mb: enable out of place processing
Date: Wed, 20 Mar 2019 17:52:32 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8978039AFD7@irsmsx112.ger.corp.intel.com> (raw)
In-Reply-To: <20190228113619.76782-2-roy.fan.zhang@intel.com>



> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Thursday, February 28, 2019 11:36 AM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; De
> Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Luse, Paul E <paul.e.luse@intel.com>
> Subject: [PATCH v2 1/3] crypto/aesni_mb: enable out of place processing
> 
> Add out-of-place processing, i.e. different source and destination m_bufs,
> plus related capability update, tests and documentation.
> 
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> Signed-off-by: Paul Luse <paul.e.luse@intel.com>
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 98
> ++++++++++++++++++++++--------
>  1 file changed, 71 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 48d6ac002..9ff49b3fa 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -739,6 +739,56 @@ get_session(struct aesni_mb_qp *qp, struct
> rte_crypto_op *op)
>  	return sess;
>  }
> 
> +static inline uint64_t
> +auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session
> *session,
> +		uint32_t oop)
> +{
> +	struct rte_mbuf *m_src, *m_dst;
> +	uint8_t *p_src, *p_dst;
> +	uint64_t u_src, u_dst;
> +	uint32_t cipher_end, auth_end;
> +
> +	/* Only cipher then hash needs special calculation. */
> +	if (!oop || session->chain_order != CIPHER_HASH)
> +		return op->sym->auth.data.offset;
> +
> +	m_src = op->sym->m_src;
> +	m_dst = op->sym->m_dst;
> +
> +	p_src = rte_pktmbuf_mtod(m_src, uint8_t *);
> +	p_dst = rte_pktmbuf_mtod(m_dst, uint8_t *);
> +	u_src = (uint64_t)p_src;
> +	u_dst = (uint64_t)p_dst + op->sym->auth.data.offset;

Better to use (uintptr_t) instead of uint64_t.


...

> -
> -		memcpy(odata, rte_pktmbuf_mtod(op->sym->m_src, void*),
> -				rte_pktmbuf_data_len(op->sym->m_src));
> -	} else {
> +	if (!op->sym->m_dst || op->sym->m_dst == op->sym->m_src) {

Better to add parenthesis on the second part of this "or" condition.

Apart from this:

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

  parent reply	other threads:[~2019-03-20 17:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 11:36 [dpdk-dev] [PATCH v2 0/3] " Fan Zhang
2019-02-28 11:36 ` [dpdk-dev] [PATCH v2 1/3] " Fan Zhang
2019-03-19 17:18   ` Trahe, Fiona
2019-03-19 17:18     ` Trahe, Fiona
2019-03-20 17:52   ` De Lara Guarch, Pablo [this message]
2019-03-20 17:52     ` De Lara Guarch, Pablo
2019-02-28 11:36 ` [dpdk-dev] [PATCH v2 2/3] test: add out of place test for AESNI-MB Fan Zhang
2019-03-19 17:28   ` Trahe, Fiona
2019-03-19 17:28     ` Trahe, Fiona
2019-02-28 11:36 ` [dpdk-dev] [PATCH v2 3/3] doc: update documentation Fan Zhang
2019-03-19 17:29   ` Trahe, Fiona
2019-03-19 17:29     ` Trahe, Fiona
2019-03-20 17:55   ` De Lara Guarch, Pablo
2019-03-20 17:55     ` De Lara Guarch, Pablo
2019-03-25 13:51 ` [dpdk-dev] [PATCH v3 0/2] crypto/aesni_mb: enable out of place processing Fan Zhang
2019-03-25 13:51   ` Fan Zhang
2019-03-25 13:51   ` [dpdk-dev] [PATCH v3 1/2] " Fan Zhang
2019-03-25 13:51     ` Fan Zhang
2019-03-25 13:51   ` [dpdk-dev] [PATCH v3 2/2] test: add out of place test for AESNI-MB Fan Zhang
2019-03-25 13:51     ` Fan Zhang
2019-03-29 14:37   ` [dpdk-dev] [PATCH v3 0/2] crypto/aesni_mb: enable out of place processing Akhil Goyal
2019-03-29 14:37     ` 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=E115CCD9D858EF4F90C690B0DCB4D8978039AFD7@irsmsx112.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=paul.e.luse@intel.com \
    --cc=roy.fan.zhang@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).