From: Rusty Russell <rusty@rustcorp.com.au>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: virtio_net: Set correct gso->hdr_len
Date: Fri, 5 Jun 2009 16:20:02 +0930 [thread overview]
Message-ID: <200906051620.02868.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090605042709.GA6702@gondor.apana.org.au>
On Fri, 5 Jun 2009 01:57:09 pm Herbert Xu wrote:
> On Fri, Jun 05, 2009 at 01:51:05PM +0930, Rusty Russell wrote:
> > But are we allowed to make the assumption that skb_headlen() ==
> > skb_transport_header(skb) + sizeof(transport header) ? Or should we be
> > checking that here?
>
> We don't care. We just want to preserve whatever the OS gave us.
> If it's bogus, the backend will reject it or fix it up.
Right, understood now. It really is just a hint as to how much to copy. It
wasn't supposed to be that, as virtio_net.h:
__u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
__u16 gso_size; /* Bytes to append to hdr_len per frame */
The host was supposed to be able to de-gso packets together relying on
hdr_len. But that's silly: it can't do TSO without knowing about sequence
numbers at least, and UFO without ip fragmentation offsets. ie. it might as
well calc hdr_len itself.
I'm working on a proper spec, I'll be sure to note this.
Thanks,
Rusty.
next prev parent reply other threads:[~2009-06-05 6:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 10:59 virtio_net: Set correct gso->hdr_len Herbert Xu
2009-06-05 4:21 ` Rusty Russell
2009-06-05 4:27 ` Herbert Xu
2009-06-05 6:50 ` Rusty Russell [this message]
2009-06-05 6:53 ` Herbert Xu
2009-06-08 7:22 ` 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=200906051620.02868.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.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).