[ovs-dev] NoviFlow Experimenter VXLan encapsulation: Calculate the IP header checksum.

Ben Pfaff blp at ovn.org
Wed Dec 13 20:35:37 UTC 2017


On Wed, Dec 13, 2017 at 02:55:45PM -0500, yann bourdeau wrote:
> Hi all,
> 
> 	I’m currently porting the NoviFlow Experiments OF (match, action, msg). I’m currently porting the VXLan encapsulation and was wondering, by adding new layers of ETH, IP, UDP and VXLAN before the existing packet, how to calculate the IP header checksum. I mean, if there is an existing function to do it, or it is done automatically in the code (I did now see that but I’m no expert on OVS even if I know more now).
> 
> 	I have seen the following function: csum_tcpudp_magic being used by lower level of code. 
> 
> 	Anyway I’d like to know: Is it calculated automatically? Do I need to use csum_tcpudp_magic? Or roll out my own function (which I’d like to avoid).

I don't think OVS has an API specifically for that.  lib/csum.c has
functions for calculating checksums.


More information about the dev mailing list