[ovs-dev] [PATCH 10/16] datapath: Add function to copy skb checksum bits.
blp at nicira.com
Wed Apr 14 18:11:44 UTC 2010
On Tue, Apr 13, 2010 at 10:41:12AM -0400, Jesse Gross wrote:
> Some kernels don't copy the checksum offload state in the skb
> header when doing different types of copies. Xen adds even more
> fields, which are also not consistently copied. The result is
> uninitialized memory and random outcomes. This adds a function to
> consistenly copy these bits across all kernel versions.
The code in set_skb_csum_bits() is indented too far (two tabs? three?).
I wonder whether this should be an inline function in a header. It
expands to nothing on recent kernels, so that would be a useful
optimization for them. Even on older kernels, it doesn't expand to
If we were going to take our philosophy of putting compatibility code in
"compat-2.6" headers, then we could even make skbuff.h compatibility
wrappers for e.g. skb_copy() that call the underlying skb_copy() and
then call set_skb_csum_bits() automatically.
More information about the dev