[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100503.125404.134122628.davem@davemloft.net>
Date: Mon, 03 May 2010 12:54:04 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xiaosuo@...il.com
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2] ethernet: call __skb_pull() in eth_type_trans()
From: Changli Gao <xiaosuo@...il.com>
Date: Mon, 3 May 2010 22:12:52 +0800
> @@ -162,7 +162,10 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
>
> skb->dev = dev;
> skb_reset_mac_header(skb);
> - skb_pull_inline(skb, ETH_HLEN);
> + if (unlikely(skb->len < ETH_ZLEN))
> + dev_warn(&dev->dev, "too small ethernet packet: %u bytes\n",
> + skb->len);
> + __skb_pull(skb, ETH_HLEN);
> eth = eth_hdr(skb);
And now it's even more expensive than skb_pull_inline() :-)
Really, things are fine as-is.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists