DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
To: Akhil Goyal <akhil.goyal@nxp.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] ip_chksum not updated in ipsec-secgw application
Date: Mon, 18 Jul 2016 15:00:34 +0100	[thread overview]
Message-ID: <ffdcb5bd-b641-e676-9c3d-00f3d77abaa2@intel.com> (raw)
In-Reply-To: <fab56386-2e39-f845-8db7-473a5595ab7e@nxp.com>

On 18/07/2016 14:49, Akhil Goyal wrote:
> On 7/18/2016 6:27 PM, Sergio Gonzalez Monroy wrote:
>> Hi,
>>
>> On 18/07/2016 13:41, Akhil Goyal wrote:
>>> Hi,
>>>
>>> In Ipsec-secgw application, while adding the outer IP header, it seems
>>> that the application does not update the checksum value for outbound
>>> packets. This result in incorrect ip->checksum in the encrypted packet.
>>>
>>> Please let me know if the checksum value is updated somewhere else or
>>> not.
>>>
>>> Also In case of inner ip header also the TTL value is decremented by
>>> one but the checksum value is not updated. Is it intentional or it is
>>> done somewhere else?
>>
>> It is intentional. The application is using IP checksum offload but just
>> looking now at the code there is a bug for IPv6 packets where the flag
>> does not get setup.
>> Is it only for IPv6 traffic that you are having this issue?
>>

Duh! moment here.
No checksum for IPv6, that's why the flag is not setup so the code is 
correct
as it is, it just needs IPv4 checksum offload support.

Sergio

>> For IPv4 traffic the PKT_TX_IP_CKSUM flag is setup in 'prepare_tx_pkt'
>> function in ipsec-secgw.c
>>
>> Sergio
>>
>
> Thanks Sergio, got your point. I missed the flag. I was using it for 
> IPv4.
>
> Akhil
>
>

      reply	other threads:[~2016-07-18 14:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 12:41 Akhil Goyal
2016-07-18 12:57 ` Sergio Gonzalez Monroy
2016-07-18 13:20   ` Thomas Monjalon
2016-07-18 13:53     ` Akhil Goyal
2016-07-18 13:57       ` Sergio Gonzalez Monroy
2016-07-18 14:09         ` Thomas Monjalon
2016-07-18 14:25           ` Sergio Gonzalez Monroy
2016-07-18 13:49   ` Akhil Goyal
2016-07-18 14:00     ` Sergio Gonzalez Monroy [this message]

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=ffdcb5bd-b641-e676-9c3d-00f3d77abaa2@intel.com \
    --to=sergio.gonzalez.monroy@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    /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).