Thanks Alin for taking this up.

A couple of nits but looks great otherwise.

Acked-by: Nithin Raju <nit...@vmware.com>

> 
>@@ -287,17 +289,21 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,
>         ipHdr->saddr = fwdInfo->srcIpAddr;
>         ipHdr->daddr = fwdInfo->dstIpAddr;
> 
>-        ipHdr->check = 0;

We probably still need to initialize ipHdr->check to 0. Does NDIS take
care of resetting the value first, and then running the checksum?

>-        ipHdr->check = IPChecksum((UINT8 *)ipHdr, sizeof *ipHdr, 0);
>-
>         /* UDP header */
>         udpHdr = (UDPHdr *)((PCHAR)ipHdr + sizeof *ipHdr);
>         udpHdr->source = htons(tunKey->flow_hash | MAXINT16);
>         udpHdr->dest = htons(vportVxlan->dstPort);
>         udpHdr->len = htons(NET_BUFFER_DATA_LENGTH(curNb) - headRoom +
>                             sizeof *udpHdr + sizeof *vxlanHdr);
>-        udpHdr->check = 0;
> 
>+        if (tunKey->flags & OVS_TNL_F_CSUM) {
>+            UINT16 udpChksumLen = (UINT16) NET_BUFFER_DATA_LENGTH(curNb)
>-
>+                                  sizeof *ipHdr - sizeof *ethHdr;

Nit: udpChksumLen = ntohs(udpHdr->len);

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to