From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>,
"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: Update checksum while decrementing ttl
Date: Wed, 5 Oct 2016 00:34:31 +0000 [thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8973CA045FF@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <df1b09f9-b7f7-8f76-b1b4-6098257d9f8b@intel.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez
> Monroy
> Sent: Monday, September 26, 2016 6:28 AM
> To: akhil.goyal@nxp.com; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: Update checksum
> while decrementing ttl
>
> Hi Akhil,
>
> This application relies on checksum offload in both outbound and inbound
> paths (PKT_TX_IP_CKSUM flag).
>
> Because we assume that we always forward the packet in both paths, we
> decrement the ttl in both inbound and outbound.
> You seem to only increment (recalculate) the checksum of the inner IP
> header in the outbound path but not the inbound path.
>
> Also, in the inbound path you have to consider a possible ECN value update.
Any further comments here, Akhil?
Thanks,
Pablo
>
> Sergio
>
>
> On 26/09/2016 17:32, akhil.goyal@nxp.com wrote:
> > From: Akhil Goyal <akhil.goyal@nxp.com>
> >
> > In IPsec-secgw application when TTL is decremented in IP header
> > before forwarding the packet, checksum needs to be updated.
> >
> > In this patch an incremental checksum is added.
> > Other applications(like l3fwd) are also doing so.
> >
> > Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> > ---
> > examples/ipsec-secgw/ipip.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/examples/ipsec-secgw/ipip.h b/examples/ipsec-secgw/ipip.h
> > index ff1dccd..ef059a9 100644
> > --- a/examples/ipsec-secgw/ipip.h
> > +++ b/examples/ipsec-secgw/ipip.h
> > @@ -56,6 +56,7 @@ ipip_outbound(struct rte_mbuf *m, uint32_t offset,
> uint32_t is_ipv6,
> > if (inip4->ip_v == IPVERSION) {
> > /* XXX This should be done by the forwarding engine instead
> */
> > inip4->ip_ttl -= 1;
> > + inip4->ip_sum += 1;
> > ds_ecn = inip4->ip_tos;
> > } else {
> > inip6 = (struct ip6_hdr *)inip4;
>
>
next prev parent reply other threads:[~2016-10-05 0:34 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 16:32 akhil.goyal
2016-09-26 13:28 ` Sergio Gonzalez Monroy
2016-10-05 0:34 ` De Lara Guarch, Pablo [this message]
2016-10-05 6:32 ` Akhil Goyal
2016-10-07 20:53 ` De Lara Guarch, Pablo
2016-10-10 12:05 ` Sergio Gonzalez Monroy
2016-10-17 17:05 ` De Lara Guarch, Pablo
2016-10-19 8:38 ` Akhil Goyal
2016-10-26 2:29 ` De Lara Guarch, Pablo
2016-09-26 16:32 ` [dpdk-dev] [PATCH] app/test: Remove hard coding for nb_queue_pairs in test_cryptodev akhil.goyal
2016-09-26 19:36 ` De Lara Guarch, Pablo
2016-09-29 14:12 ` Trahe, Fiona
2016-09-29 14:25 ` Thomas Monjalon
2016-09-29 14:29 ` De Lara Guarch, Pablo
2016-09-26 16:33 ` [dpdk-dev] [PATCH] test_cryptodev_perf: IV and digest should be stored at a DMAeble address akhil.goyal
2016-10-05 6:40 ` Akhil Goyal
2016-10-05 9:26 ` Kusztal, ArkadiuszX
2016-10-07 11:32 ` Akhil Goyal
2016-10-07 17:06 ` [dpdk-dev] [PATCH v2] " akhil.goyal
2016-10-07 21:36 ` De Lara Guarch, Pablo
2016-10-10 5:22 ` Akhil Goyal
2016-10-10 16:24 ` De Lara Guarch, Pablo
[not found] ` <20161012111629.14126-1-akhil.goyal@nxp.com>
2016-10-12 18:26 ` [dpdk-dev] [PATCH v3] " Trahe, Fiona
2016-10-13 19:35 ` De Lara Guarch, Pablo
2016-09-29 17:18 ` [dpdk-dev] [PATCH v2] app/test: remove hard-coding of crypto num qps Fiona Trahe
2016-10-05 0:49 ` De Lara Guarch, Pablo
2016-10-06 14:55 ` Trahe, Fiona
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 0/4] remove hard-coding of crypto num qps and cleanup Fiona Trahe
2016-10-07 0:29 ` De Lara Guarch, Pablo
2016-10-07 0:57 ` De Lara Guarch, Pablo
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 1/4] crypto/aesni_mb: free ring memory on qp release in PMD Fiona Trahe
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 2/4] app/test: remove pointless for loop Fiona Trahe
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 3/4] app/test: cleanup unnecessary ring size setup Fiona Trahe
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 4/4] app/test: remove hard-coding of crypto num qps Fiona Trahe
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=E115CCD9D858EF4F90C690B0DCB4D8973CA045FF@IRSMSX108.ger.corp.intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=sergio.gonzalez.monroy@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).