netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Yu <raise.sail@gmail.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: A GRO question
Date: Tue, 05 Jul 2011 13:41:00 +0800	[thread overview]
Message-ID: <4E12A3EC.7010803@gmail.com> (raw)

Hi,

	I have a question about GRO implementation, this indeed confuses me.

	I found that we assume that NAPI_GRO_CB(skb)->frag0 starts 
with a mac/L2 header in compare_ether_header(), which is called in
__napi_gro_receive()

	However, in further dev_gro_receive() -> ptype->gro_receive [inet_gro_receive],
we use same address as IPv4/L3 header, like below:

        off = skb_gro_offset(skb); //it should keep zero until now, in my words.
        hlen = off + sizeof(*iph);      
        iph = skb_gro_header_fast(skb, off);  //just return NAPI_GRO_CB(skb)->frag0 + 0

	So we forget that updating NAPI_GRO_CB(skb)->data_offset here, or I miss sth?

	And, in my understanding against igb source code, if rx_ring->rx_buffer_len < 1024 
(if we used large MTU), then igb driver use header split mode, in such case, the mac header
should be saved in skb->data : skb_put(skb, igb_get_hlen(rx_ring, rx_desc)), the rest data
is loaded by below skb_fill_page_desc() call. so NAPI_GRO_CB(skb)->frag0 should start with
L3 header. 

	Thanks.

Yu

                 reply	other threads:[~2011-07-05  5:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4E12A3EC.7010803@gmail.com \
    --to=raise.sail@gmail.com \
    --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).