diff options
author | Jesse Gross <jesse@nicira.com> | 2010-03-04 16:39:57 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2010-03-05 15:22:17 -0500 |
commit | 635c9298b91d0942aca39ba1f0d7ea5805ab618e (patch) | |
tree | 6366c5e3f4f490c691ebf5ee284692277175d53c /datapath/datapath.h | |
parent | ca063bcd599bd00c4096628991529c16eb24d1b6 (diff) |
datapath: Update hardware computed checksum on VLAN change.
The checksum computed by hardware on receive stored in skb->csum
when skb->ip_summed == CHECKSUM_COMPLETE is supposed to reflect
the contents of the packet starting at skb->data, which includes
the VLAN tag if there is one. However, when we manipulate the
VLAN tag we don't update the checksum. This leads to all kinds
of nasty warnings about broken hardware, not to mention we can't
take advantage of the checksum that was already computed.
This also fixes some issues with our private checksum type value
on some different kernels and after GSO.
Diffstat (limited to 'datapath/datapath.h')
-rw-r--r-- | datapath/datapath.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/datapath/datapath.h b/datapath/datapath.h index d9fe4b2f..38c84756 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -183,10 +183,10 @@ struct net_bridge_port { }; enum csum_type { - CSUM_NONE = 0, - CSUM_UNNECESSARY = 1, - CSUM_COMPLETE = 2, - CSUM_PARTIAL = 3, + OVS_CSUM_NONE = 0, + OVS_CSUM_UNNECESSARY = 1, + OVS_CSUM_COMPLETE = 2, + OVS_CSUM_PARTIAL = 3, }; /** @@ -236,6 +236,7 @@ static inline int vswitch_skb_checksum_setup(struct sk_buff *skb) } #endif +void compute_ip_summed(struct sk_buff *skb, bool xmit); void forward_ip_summed(struct sk_buff *skb); #endif /* datapath.h */ |