DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Akhil Goyal <akhil.goyal@nxp.com>, <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, <shreyansh.jain@nxp.com>
Subject: Re: [dpdk-dev] [PATCH 3/5] crypto/dpaa_sec: support ipsec protocol offload
Date: Tue, 19 Dec 2017 18:29:39 +0530	[thread overview]
Message-ID: <5011d837-5a2f-ce33-16ba-052d20194bad@nxp.com> (raw)
In-Reply-To: <20171213135659.32648-4-akhil.goyal@nxp.com>

On 12/13/2017 7:26 PM, Akhil Goyal wrote:
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
>  doc/guides/cryptodevs/features/dpaa_sec.ini |   1 +
>  drivers/crypto/dpaa_sec/dpaa_sec.c          | 409 ++++++++++++++++++++++++++--
>  drivers/crypto/dpaa_sec/dpaa_sec.h          |  62 ++++-
>  3 files changed, 449 insertions(+), 23 deletions(-)
>
..<snip>
> +	if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
> +		memset(&session->encap_pdb, 0, sizeof(struct ipsec_encap_pdb) +
> +				sizeof(session->ip4_hdr));
> +		session->ip4_hdr.ip_v = IPVERSION;
> +		session->ip4_hdr.ip_hl = 5;
> +		session->ip4_hdr.ip_len = rte_cpu_to_be_16(
> +						sizeof(session->ip4_hdr));
> +		session->ip4_hdr.ip_tos = ipsec_xform->tunnel.ipv4.dscp;
> +		session->ip4_hdr.ip_id = 0;
> +		session->ip4_hdr.ip_off = 0;
> +		session->ip4_hdr.ip_ttl = ipsec_xform->tunnel.ipv4.ttl;
> +		session->ip4_hdr.ip_p = (ipsec_xform->proto ==
> +				RTE_SECURITY_IPSEC_SA_PROTO_ESP) ? 0x32 : 0x33;

It will be better if you can use the standard values such as "IPPROTO_ESP"

> +		session->ip4_hdr.ip_sum = 0;
> +		session->ip4_hdr.ip_src = ipsec_xform->tunnel.ipv4.src_ip;
> +		session->ip4_hdr.ip_dst = ipsec_xform->tunnel.ipv4.dst_ip;
> +		session->ip4_hdr.ip_sum = calc_chksum((uint16_t *)
> +						(void *)&session->ip4_hdr,
> +						sizeof(struct ip));

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

  reply	other threads:[~2017-12-19 12:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 13:56 [dpdk-dev] [PATCH 0/5] crypto/dpaa_sec: performance optimizations Akhil Goyal
2017-12-13 13:56 ` [dpdk-dev] [PATCH 1/5] crypto/dpaa_sec: optimize virt to phy conversion Akhil Goyal
2017-12-13 13:56 ` [dpdk-dev] [PATCH 2/5] crypto/dpaa_sec: support multiple sessions per qp Akhil Goyal
2017-12-13 13:56 ` [dpdk-dev] [PATCH 3/5] crypto/dpaa_sec: support ipsec protocol offload Akhil Goyal
2017-12-19 12:59   ` Hemant Agrawal [this message]
2017-12-13 13:56 ` [dpdk-dev] [PATCH 4/5] bus/dpaa: support for enqueue frames of multiple queues Akhil Goyal
2017-12-19 11:32   ` Hemant Agrawal
2017-12-13 13:56 ` [dpdk-dev] [PATCH 5/5] crypto/dpaa_sec: rewrite Rx/Tx path Akhil Goyal
2017-12-19 12:45   ` Hemant Agrawal
2018-01-08 11:13     ` De Lara Guarch, Pablo
2018-01-08 11:16       ` Akhil Goyal
2018-01-08 11:24         ` De Lara Guarch, Pablo
2018-01-11 11:44   ` [dpdk-dev] [PATCH v2] " Akhil Goyal
2018-01-17 16:54     ` De Lara Guarch, Pablo
2018-01-11 11:33 ` [dpdk-dev] [PATCH v2 0/3] crypto/dpaa_sec: performance optimizations Akhil Goyal
2018-01-11 11:33   ` [dpdk-dev] [PATCH v2 1/3] crypto/dpaa_sec: optimize virt to phy conversion Akhil Goyal
2018-01-11 11:33   ` [dpdk-dev] [PATCH v2 2/3] crypto/dpaa_sec: support multiple sessions per qp Akhil Goyal
2018-01-11 11:33   ` [dpdk-dev] [PATCH v2 3/3] crypto/dpaa_sec: support ipsec protocol offload Akhil Goyal
2018-01-11 14:13     ` De Lara Guarch, Pablo
2018-01-15  6:35   ` [dpdk-dev] [PATCH v3 0/3] crypto/dpaa_sec: performance optimizations Akhil Goyal
2018-01-15  6:35     ` [dpdk-dev] [PATCH v3 1/3] crypto/dpaa_sec: optimize virt to phy conversion Akhil Goyal
2018-01-15  6:35     ` [dpdk-dev] [PATCH v3 2/3] crypto/dpaa_sec: support multiple sessions per qp Akhil Goyal
2018-01-15  6:35     ` [dpdk-dev] [PATCH v3 3/3] crypto/dpaa_sec: support ipsec protocol offload Akhil Goyal
2018-01-15 14:46     ` [dpdk-dev] [PATCH v3 0/3] crypto/dpaa_sec: performance optimizations De Lara Guarch, Pablo

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=5011d837-5a2f-ce33-16ba-052d20194bad@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=shreyansh.jain@nxp.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).