From: David Miller <davem@davemloft.net>
To: Joyce.Yu@Sun.COM
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [NIU] VLAN does not work with niu driver
Date: Tue, 13 Oct 2009 15:12:02 -0700 (PDT) [thread overview]
Message-ID: <20091013.151202.207066823.davem@davemloft.net> (raw)
In-Reply-To: <4AD4F0BF.1040606@Sun.COM>
From: Joyce Yu <Joyce.Yu@Sun.COM>
Date: Tue, 13 Oct 2009 14:27:27 -0700
> @@ -3545,7 +3546,15 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
> rp->rcr_index = index;
>
> skb_reserve(skb, NET_IP_ALIGN);
> - __pskb_pull_tail(skb, min(len, NIU_RXPULL_MAX));
> + __pskb_pull_tail(skb, min(len, VLAN_ETH_HLEN));
> +
> + veth = (struct vlan_ethhdr *)skb->data;
> + if (veth->h_vlan_proto != __constant_htons(ETH_P_8021Q)) {
> + skb->tail -= 4;
> + skb->data_len += 4;
> + skb_shinfo(skb)->frags[0].page_offset -= 4;
> + skb_shinfo(skb)->frags[0].size += 4;
> + }
So you guys spent an enormous amount of time trying to figure out
why just a plain '__pskb_pull_tail(skb, min(len, VLAN_ETH_HLEN));'
doesn't work.
Don't you think the full details of your discovery might be relevant
either in the commit message or a comment?
Otherwise, how is anyone else in the world going to figure out why you
had to do these frag list adjustments?
next prev parent reply other threads:[~2009-10-13 22:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 21:27 [PATCH] [NIU] VLAN does not work with niu driver Joyce Yu
2009-10-13 22:12 ` David Miller [this message]
2009-10-20 0:28 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-10-21 18:02 Joyce Yu
2009-10-21 23:09 ` David Miller
2009-10-21 23:28 ` Joyce Yu
2009-10-22 0:19 ` David Miller
2009-10-15 19:16 Joyce Yu
2009-10-13 5:41 Joyce Yu
2009-10-13 6:22 ` David Miller
2009-10-12 23:26 Joyce Yu
2009-10-12 23:52 ` David Miller
2009-09-09 21:10 Joyce Yu
2009-09-09 21:35 ` Stephen Hemminger
2009-09-10 0:16 ` David Miller
2009-09-10 0:15 ` David Miller
2009-09-10 1:01 ` Matheos Worku
2009-09-10 1:10 ` David Miller
2009-09-10 1:19 ` Matheos Worku
2009-09-10 1:44 ` David Miller
2009-09-10 1:48 ` Matheos Worku
2009-09-10 16:35 ` Rick Jones
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=20091013.151202.207066823.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Joyce.Yu@Sun.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).