aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-12-06 11:36:16 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:23:33 -0500
commit4262e5ccbbb5171abd2921eed16ed339633d6478 (patch)
tree20b11bfb690a4ab70c726f81a1f0826eb5a939f0 /net/core
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-dev-4262e5ccbbb5171abd2921eed16ed339633d6478.tar.xz
linux-dev-4262e5ccbbb5171abd2921eed16ed339633d6478.zip
net: dev: move inline skb_needs_linearize helper to header
As we need it elsewhere, move the inline helper function of skb_needs_linearize() over to skbuff.h include file. While at it, also convert the return to 'bool' instead of 'int' and add a proper kernel doc. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 6cc98dd49c7a..355df36360b4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2535,21 +2535,6 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
}
EXPORT_SYMBOL(netif_skb_features);
-/*
- * Returns true if either:
- * 1. skb has frag_list and the device doesn't support FRAGLIST, or
- * 2. skb is fragmented and the device does not support SG.
- */
-static inline int skb_needs_linearize(struct sk_buff *skb,
- netdev_features_t features)
-{
- return skb_is_nonlinear(skb) &&
- ((skb_has_frag_list(skb) &&
- !(features & NETIF_F_FRAGLIST)) ||
- (skb_shinfo(skb)->nr_frags &&
- !(features & NETIF_F_SG)));
-}
-
int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
struct netdev_queue *txq, void *accel_priv)
{