Thanks for pointing that out. I have modified the comment to be in line with the changes.
diff --git a/lib/flow.c b/lib/flow.c index bc88718..fd31333 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1010,7 +1010,8 @@ flow_set_vlan_pcp(struct flow *flow, uint8_t pcp) * 'flow'. * * (This is useful only for testing, obviously, and the packet isn't really - * valid. There are lots of fields that are just zeroed. */ + * valid. It hasn't got some checksums filled in, for one, and lots of fields + * are just zeroed.) */ void flow_compose(struct ofpbuf *b, const struct flow *flow) { thanx! mehak On Mon, Jul 30, 2012 at 5:22 PM, Ethan Jackson <et...@nicira.com> wrote: > > * (This is useful only for testing, obviously, and the packet isn't > really > > - * valid. It hasn't got any checksums filled in, for one, and lots of > fields > > - * are just zeroed.) */ > > + * valid. There are lots of fields that are just zeroed. */ > > I think you either need to compute the l4 checksums or leave the comment. > > Ethan > > > > void > > flow_compose(struct ofpbuf *b, const struct flow *flow) > > { > > @@ -1067,6 +1067,7 @@ flow_compose(struct ofpbuf *b, const struct flow > *flow) > > > > ip->ip_tot_len = htons((uint8_t *) b->data + b->size > > - (uint8_t *) b->l3); > > + ip->ip_csum = csum(ip, IP_IHL(ip->ip_ihl_ver) * 4); > > } 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