I agree its cleaner, but I am still inclined to keep it as is because
sizeof *ip does not contain the options which should also be included in
computing the IP checksum.  IP_IHL takes the header length and uses that
which is what the IP Checksum calculations should use. What do you think ?

thanx!
mehak

On Wed, Aug 1, 2012 at 12:05 PM, Ethan Jackson <et...@nicira.com> wrote:

> > +        ip->ip_csum = csum(ip, IP_IHL(ip->ip_ihl_ver) * 4);
>
> I think what you have here is correct, but would be a bit
> safer/cleaner if we changed it to:
>
> ip->ip_csum = csum(ip, sizeof *ip);
>
> Ethan
>
>
> >      } else if (flow->dl_type == htons(ETH_TYPE_IPV6)) {
> >          /* XXX */
> >      } else if (flow->dl_type == htons(ETH_TYPE_ARP)) {
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to