aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-02-05 16:36:38 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-06 15:58:00 -0500
commit12b0004d1d1e2a9aa667412d479041e403bcafae (patch)
tree132aecb3e4a78707552a0ddf4d4618734af47efa /include
parentwpan: use stack buffer instead of heap (diff)
downloadlinux-dev-12b0004d1d1e2a9aa667412d479041e403bcafae.tar.xz
linux-dev-12b0004d1d1e2a9aa667412d479041e403bcafae.zip
net: adjust skb_gso_segment() for calling in rx path
skb_gso_segment() is almost always called in tx path, except for openvswitch. It calls this function when it receives the packet and tries to queue it to user-space. In this special case, the ->ip_summed check inside skb_gso_segment() is no longer true, as ->ip_summed value has different meanings on rx path. This patch adjusts skb_gso_segment() so that we can at least avoid such warnings on checksum. Cc: Jesse Gross <jesse@nicira.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 85b0949d9946..ab2774eb49e8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2662,8 +2662,15 @@ extern int netdev_master_upper_dev_link(struct net_device *dev,
extern void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev);
extern int skb_checksum_help(struct sk_buff *skb);
-extern struct sk_buff *skb_gso_segment(struct sk_buff *skb,
- netdev_features_t features);
+extern struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
+ netdev_features_t features, bool tx_path);
+
+static inline
+struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
+{
+ return __skb_gso_segment(skb, features, true);
+}
+
#ifdef CONFIG_BUG
extern void netdev_rx_csum_fault(struct net_device *dev);
#else