DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier MATZ <olivier.matz@6wind.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] about rx checksum flags
Date: Tue, 31 May 2016 21:11:43 +0200	[thread overview]
Message-ID: <574DE1EF.8020504@6wind.com> (raw)
In-Reply-To: <20160531100851.GK1428@6wind.com>

Hi,

On 05/31/2016 12:08 PM, Adrien Mazarguil wrote:
> On Tue, May 31, 2016 at 10:43:29AM +0800, Tan, Jianfeng wrote:
>> Why not take care of PKT_RX_IP_CKSUM_BAD? Is it too easy for sw to handle?
> 
> I thought PKT_RX_IP_CKSUM_BAD was to be modified in a similar fashion, but
> since you raise the issue, mlx4/mlx5 need this as well. These boards only
> report "good" checksums for L3 and L4.

Yep, maybe it was not so clear in my initial mail, but I think the L4
example should apply to IP as well.

>> For virtio, there's only one bit, VIRTIO_NET_HDR_F_DATA_VALID, to indicate
>> that checksum is valid. Shall we differentiate L3 checksum and L4 checksum
>> in rte_mbuf.ol_flags?

>From what I understand from the specification, when the driver
(virtio-net) receives a packet with the VIRTIO_NET_HDR_F_NEEDS_CSUM
flag, it can be assumed that all checksums before hdr->csum_start are
valid. Here we would set PKT_RX_IP_CKSUM_GOOD and PKT_RX_L4_CKSUM_NONE.

In case of VIRTIO_NET_HDR_F_DATA_VALID, I understand that both L3 and
L4 of the outer header is valid. Here we would set PKT_RX_IP_CKSUM_GOOD
and PKT_RX_L4_CKSUM_GOOD.

Regards,
Olivier

  reply	other threads:[~2016-05-31 19:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 15:26 Olivier Matz
2016-05-30 16:07 ` Adrien Mazarguil
2016-05-31  2:43 ` Tan, Jianfeng
2016-05-31 10:08   ` Adrien Mazarguil
2016-05-31 19:11     ` Olivier MATZ [this message]
2016-05-31  8:09 ` Yuanhan Liu
2016-05-31 19:11   ` Olivier MATZ
2016-05-31 20:28     ` Stephen Hemminger
2016-05-31 20:58       ` Olivier MATZ
2016-05-31 22:02         ` Stephen Hemminger
2016-06-01  9:06           ` Ananyev, Konstantin
2016-06-02  7:42             ` Chandran, Sugesh
2016-06-03 12:43               ` Olivier Matz
2016-06-08  8:22                 ` Chandran, Sugesh
2016-06-08 13:02                   ` Olivier Matz
2016-06-10 16:15                     ` Chandran, Sugesh
2016-07-06 12:52                       ` Chandran, Sugesh
2016-07-06 13:18                         ` Olivier MATZ

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=574DE1EF.8020504@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=yuanhan.liu@linux.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).