[ovs-discuss] Some questions about checksum in OVS

Jesse Gross jesse at nicira.com
Mon Dec 5 22:11:01 UTC 2011


2011/12/3 likunyun <kunyunli at hotmail.com>:
> I found the fuction set_skb_csum_pointers() in datapath/checksum.c  line
> 253:
> void set_skb_csum_pointers(struct sk_buff *skb, u16 csum_start, u16
> csum_offset)
> {
>  OVS_CB(skb)->csum_start = csum_start;
>  skb->csum = csum_offset;
> }
> When I changed the function like below, It works,Native can get packets
> normally.:
> void set_skb_csum_pointers(struct sk_buff *skb, u16 csum_start, u16
> csum_offset)
> {
>  OVS_CB(skb)->csum_start = csum_start;
>  skb->csum_start = csum_start;
>  skb->csum_offset = csum_offset;
> }

The code that you're looking at is compatibility code for older
kernels that handle checksumming differently.  It shouldn't be
necessary for 2.6.36 but for some reason it is getting used, which is
why the results aren't right.  My guess is that if you commented out
the condition that sets NEED_CSUM_NORMALIZE at the top of checksum.h
then things would work properly.

Assuming that's the case, the question is why it is being enabled.
It's likely due to HAVE_PROTO_DATA_VALID being incorrectly set.  This
is done by the configure script, so maybe you could confirm that
that's the case based on the configure log and find out what in your
kernel headers are triggering it.



More information about the discuss mailing list