VLAN does not work with niu driver
Subsystems (2)
PATCH 1/1 VLAN does not work with niu driver
Signature · 1 line
--
Quoted 1 line
From
0bb77e878758bd72051577bcc568e2b95c87c203Mon Sep 17 00:00:00 2001
From: Joyce Yu <[email protected]>
Date: Mon, 12 Oct 2009 11:03:54 -0700
Subject: [PATCH] VLAN does not work with niu driver
--- drivers/net/niu.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
drivers/net/niu.c +10 -1
@@ -3480,6 +3480,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,unsigned int index = rp->rcr_index;struct sk_buff *skb;int len, num_rcr; +struct vlan_ethhdr *veth; skb =netdev_alloc_skb (np->dev,RX_SKB_ALLOC_SIZE );if (unlikely (!skb))
@@ -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 ; + } rp->rx_packets++; rp->rx_bytes += skb->len;
Signature · 1 line
1.6.4
David Miller
maintainerFrom: Joyce Yu <[email protected]>
Date: Tue, 13 Oct 2009 14:27:27 -0700
Quoted 4 lines
drivers/net/niu.c +0
-0@@ -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 );
drivers/net/niu.c static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np, · line 3557
Quoted 10 lines
drivers/net/niu.c +9
-1-__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?
David Miller
maintainerIf you send this patch improperly any more times, I'm simply just going to start ignoring your patch postings completely.
First of all, you did not add a proper commit message with your patch explaining your change, in detail. I've asked you for this not ONCE, but TWICE.
You also did not provide a proper Signed-off-by: tag for your change, please read linux/Documentation/SubmittingPatches for details.
Every time you submit a patch improperly, you waste a lot of my time.
I have to handle receiving patches from hundreds of people every day, I don't have time to teach each and every one of them how to submit things properly. I especially don't have time to do it MULTIPLE TIMES, like I have been doing for you.