aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-23 03:13:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-23 03:13:46 -0400
commit21dc330157454046dd7c494961277d76e1c957fe (patch)
tree4f030efa8d82f7eb9676acd4cfc74921a6d29972 /include
parent2d4833aae65589ba4317dd325fe20c8b25c14173 (diff)
net: Rename skb_has_frags to skb_has_frag_list
SKBs can be "fragmented" in two ways, via a page array (called skb_shinfo(skb)->frags[]) and via a list of SKBs (called skb_shinfo(skb)->frag_list). Since skb_has_frags() tests the latter, it's name is confusing since it sounds more like it's testing the former. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/skbuff.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 46c36ffe20ee..ce2de8b64083 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2191,7 +2191,7 @@ static inline int net_gso_ok(int features, int gso_type)
2191static inline int skb_gso_ok(struct sk_buff *skb, int features) 2191static inline int skb_gso_ok(struct sk_buff *skb, int features)
2192{ 2192{
2193 return net_gso_ok(features, skb_shinfo(skb)->gso_type) && 2193 return net_gso_ok(features, skb_shinfo(skb)->gso_type) &&
2194 (!skb_has_frags(skb) || (features & NETIF_F_FRAGLIST)); 2194 (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST));
2195} 2195}
2196 2196
2197static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 2197static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f067c95cf18a..f900ffcd847e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1120,7 +1120,7 @@ extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
1120 int off, int size); 1120 int off, int size);
1121 1121
1122#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) 1122#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
1123#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frags(skb)) 1123#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb))
1124#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) 1124#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
1125 1125
1126#ifdef NET_SKBUFF_DATA_USES_OFFSET 1126#ifdef NET_SKBUFF_DATA_USES_OFFSET
@@ -1784,7 +1784,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1784 skb = skb->prev) 1784 skb = skb->prev)
1785 1785
1786 1786
1787static inline bool skb_has_frags(const struct sk_buff *skb) 1787static inline bool skb_has_frag_list(const struct sk_buff *skb)
1788{ 1788{
1789 return skb_shinfo(skb)->frag_list != NULL; 1789 return skb_shinfo(skb)->frag_list != NULL;
1790} 1790}