From: Jesse Gross Date: Fri, 27 Mar 2015 05:55:53 +0000 (-0700) Subject: tunneling: Use flow flag for GRE checksum calculation. X-Git-Tag: v2.4.0~366 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=61cf6b70243ee5bb7e948cabf5298a21a66e7c77;p=cascardo%2Fovs.git tunneling: Use flow flag for GRE checksum calculation. The indication to calculate the GRE checksum is currently the port config rather than the tunnel flow. Currently there is a one to one mapping between the two so there is no difference. However, the kernel datapath must use the flow and it is also potentially more flexible, so this switches how we decide whether to calculate the checksum. Signed-off-by: Jesse Gross Acked-by: Pritesh Kothari Acked-by: Pravin B Shelar --- diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index a9639d3c3..0e0d79145 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -1040,7 +1040,7 @@ netdev_gre_build_header(const struct netdev *netdev, greh->flags = 0; options = (ovs_16aligned_be32 *) (greh + 1); - if (tnl_cfg->csum) { + if (tnl_flow->tunnel.flags & FLOW_TNL_F_CSUM) { greh->flags |= htons(GRE_CSUM); put_16aligned_be32(options, 0); options++;