From 4e8b1e417d09e9328e641005f63f711e6c2c3966 Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Wed, 2 Jun 2010 12:24:37 +0000 Subject: [PATCH] --- yaml --- r: 202670 b: refs/heads/master c: b78462ebc6a4ef9074aa80abebcdd470dc5f0ce0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 3 ++- trunk/net/core/dev.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index fb29b26e7d38..281e712a6ab5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 55c95e738da85373965cb03b4f975d0fd559865b +refs/heads/master: b78462ebc6a4ef9074aa80abebcdd470dc5f0ce0 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index bf243fc54959..645e78d395fd 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -2129,7 +2129,8 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb) /* LRO sets gso_size but not gso_type, whereas if GSO is really * wanted then gso_type will be set. */ struct skb_shared_info *shinfo = skb_shinfo(skb); - if (shinfo->gso_size != 0 && unlikely(shinfo->gso_type == 0)) { + if (skb_is_nonlinear(skb) && shinfo->gso_size != 0 && + unlikely(shinfo->gso_type == 0)) { __skb_warn_lro_forwarding(skb); return true; } diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index ec01a5998d70..3abb3a6058be 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -2103,9 +2103,10 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, static inline int skb_needs_linearize(struct sk_buff *skb, struct net_device *dev) { - return (skb_has_frags(skb) && !(dev->features & NETIF_F_FRAGLIST)) || - (skb_shinfo(skb)->nr_frags && (!(dev->features & NETIF_F_SG) || - illegal_highdma(dev, skb))); + return skb_is_nonlinear(skb) && + ((skb_has_frags(skb) && !(dev->features & NETIF_F_FRAGLIST)) || + (skb_shinfo(skb)->nr_frags && (!(dev->features & NETIF_F_SG) || + illegal_highdma(dev, skb)))); } /**