diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-06-13 14:11:44 -0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2013-06-14 18:09:12 -0400 |
commit | b34df5e805a6e98cae0bc5bc80c1b52d9ff811de (patch) | |
tree | cc8d94ee92741fe21380180aeff3a6f12bb44adb /net/openvswitch/vport.h | |
parent | 45bfa52e36ef016b789eca73c7847db3f7b4742d (diff) |
openvswitch: make skb->csum consistent with rest of networking stack.
Following patch keeps skb->csum correct across ovs.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/vport.h')
-rw-r--r-- | net/openvswitch/vport.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index 1cef5cd3be47..293278c4c2df 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h | |||
@@ -192,4 +192,11 @@ void ovs_vport_record_error(struct vport *, enum vport_err_type err_type); | |||
192 | extern const struct vport_ops ovs_netdev_vport_ops; | 192 | extern const struct vport_ops ovs_netdev_vport_ops; |
193 | extern const struct vport_ops ovs_internal_vport_ops; | 193 | extern const struct vport_ops ovs_internal_vport_ops; |
194 | 194 | ||
195 | static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb, | ||
196 | const void *start, unsigned int len) | ||
197 | { | ||
198 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
199 | skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); | ||
200 | } | ||
201 | |||
195 | #endif /* vport.h */ | 202 | #endif /* vport.h */ |