On Thu, Dec 05, 2013 at 04:27:25PM -0800, Jarno Rajahalme wrote: > Add the missing code for generating IPv6 packets for testing purposes. > > Also make flow_compose() set the l4 and l7 pointers more consistently > with flow_extract(). > > Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
Would you please use uintptr_t instead of uint64_t here? Also, I am not sure what the comment means. > + ovs_assert((uint64_t)b->l3 % 4 == 0); /* Testing... */ > + > if (flow->dl_type == htons(ETH_TYPE_IP)) { > struct ip_header *ip; > > - b->l3 = ip = ofpbuf_put_zeros(b, sizeof *ip); > + ip = ofpbuf_put_zeros(b, sizeof *ip); > ip->ip_ihl_ver = IP_IHL_VER(5, 4); > ip->ip_tos = flow->nw_tos; > ip->ip_ttl = flow->nw_ttl; I see a couple of uses of CONSTANT_HTON* in the new code. I don't think this is necessary here because they are not used in contexts that require constant expressions (such as case labels). In general, I prefer the ordinary functions when we can use them. GCC will happily compute them at compile time. Acked-by: Ben Pfaff <b...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev