From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Maciej Żenczykowski" <maze@google.com>
Cc: Dmitry Kravkov <dmitry@broadcom.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eilon Greenstein <eilong@broadcom.com>,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next 2/2] bnx2x: add RSS capability for GRE traffic
Date: Tue, 19 Mar 2013 05:25:58 -0700 [thread overview]
Message-ID: <1363695958.21184.42.camel@edumazet-glaptop> (raw)
In-Reply-To: <CANP3RGehbKbh1ambT-RQQqfOkovzySB4_CWg+LPdJV7yDkYBCg@mail.gmail.com>
Please Maciej do not top post on lkml or netdev mailing lists.
On Tue, 2013-03-19 at 02:18 -0700, Maciej Żenczykowski wrote:
> Can the HW calculate and return a 1s complement sum of the entire
> packet (or a large portion there-of)?
> Fixing that up to be only of the outer IPv4, inner IPv4 and inner TCP
> relevant portions should still be simpler (well faster) than
> calculating the TCP checksum.
> I'm pretty sure that some relationship between 1s complement sum of
> all bytes, outer IPv4 checksum, inner IPv4 checksum and TCP checksum
> could be pulled out of a hat with some deeper thought. (similarly for
> IPv4/GRE/IPv6/TCP and other combinations)
>
> What portions of the packet can the HW/FW [partially] checksum - and
> return the value to the driver for further processing?
> Can it return 1s complement sum of data portion of outer IPv4 (ie. in
> IPv4/GRE/IPv4/TCP return a 1s complement sum of GRE/IPv4/TCP bytes)
>
I assume Dmitry was speaking of this possibility, and our stack should
handle this just fine.
NIC providing these kind of checksums set :
skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = csum;
before feeding the packet to the stack.
When we pull some header, we have to call skb_postpull_rcsum()
to adjust the skb->csum so that final check can be done.
About 20 drivers currently provide these kind of checksumming.
next prev parent reply other threads:[~2013-03-19 12:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 16:51 [PATCH net-next 1/2] bnx2x: add CSUM and TSO support for encapsulation protocols Dmitry Kravkov
2013-03-18 16:51 ` [PATCH net-next 2/2] bnx2x: add RSS capability for GRE traffic Dmitry Kravkov
2013-03-18 17:11 ` David Miller
2013-03-19 0:07 ` Eric Dumazet
2013-03-19 6:30 ` Dmitry Kravkov
2013-03-19 9:18 ` Maciej Żenczykowski
2013-03-19 12:21 ` Dmitry Kravkov
2013-03-19 12:25 ` Eric Dumazet [this message]
2013-03-19 13:43 ` Dmitry Kravkov
2013-08-17 17:53 ` Jerry Chu
2013-08-17 18:52 ` Dmitry Kravkov
2013-08-17 19:01 ` Eric Dumazet
2013-08-17 19:04 ` Dmitry Kravkov
2013-08-18 11:55 ` Jerry Chu
2013-08-18 15:37 ` Eric Dumazet
2013-08-18 21:11 ` Jerry Chu
2013-08-18 23:44 ` Eric Dumazet
2013-08-19 14:57 ` Jerry Chu
2013-03-18 17:11 ` [PATCH net-next 1/2] bnx2x: add CSUM and TSO support for encapsulation protocols David Miller
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=1363695958.21184.42.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=eilong@broadcom.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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