diff options
author | Cong Wang <amwang@redhat.com> | 2013-02-05 11:36:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-06 15:58:00 -0500 |
commit | 12b0004d1d1e2a9aa667412d479041e403bcafae (patch) | |
tree | 132aecb3e4a78707552a0ddf4d4618734af47efa /include/linux/netdevice.h | |
parent | 25060d8f3f2c21daadb4fc1fb0e37ce2c992e30b (diff) |
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/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 11 |
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, | |||
2662 | extern void netdev_upper_dev_unlink(struct net_device *dev, | 2662 | extern void netdev_upper_dev_unlink(struct net_device *dev, |
2663 | struct net_device *upper_dev); | 2663 | struct net_device *upper_dev); |
2664 | extern int skb_checksum_help(struct sk_buff *skb); | 2664 | extern int skb_checksum_help(struct sk_buff *skb); |
2665 | extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, | 2665 | extern struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
2666 | netdev_features_t features); | 2666 | netdev_features_t features, bool tx_path); |
2667 | |||
2668 | static inline | ||
2669 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) | ||
2670 | { | ||
2671 | return __skb_gso_segment(skb, features, true); | ||
2672 | } | ||
2673 | |||
2667 | #ifdef CONFIG_BUG | 2674 | #ifdef CONFIG_BUG |
2668 | extern void netdev_rx_csum_fault(struct net_device *dev); | 2675 | extern void netdev_rx_csum_fault(struct net_device *dev); |
2669 | #else | 2676 | #else |