[ovs-dev] [PATCH 6/6] flow: Make IPv6 userspace code match kernel.

Jesse Gross jesse at nicira.com
Thu Mar 3 20:50:01 UTC 2011


On Thu, Mar 3, 2011 at 11:13 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Mar 02, 2011 at 07:20:35PM -0800, Jesse Gross wrote:
>> The flow extraction code for IPv6 has some deviations from both the
>> kernel version and other protocols in userspace.  These differences
>> make it difficult to compare the two for correctness.  This updates
>> the code to be more similar to the others in design and style.  There
>> is no functional change.
>
> Two of the ofpbuf_try_pull() calls have a missing ! in the test.

Fixed, thanks.

>
> In parse_icmpv6(), now that I've actually looked at struct
> nd_neighbor_solicit, I question whether using it is actually helpful.
> It's just an icmp6_hdr followed by an in6_addr.  We could just pull
> the in6_addr ourselves and save the trouble of subtracting the length
> of the icmp6_hdr.

I hadn't looked at struct nd_neighbor_solicit before either.  Now that
I have, I agree that it doesn't add much value so I've dropped it.

>
> Many pointers could be declared "const" in this code.

Good idea.

>
> This changes a "return false" at the end of parse_icmpv6() to "return
> true".  Isn't that a functional change?

It just affects whether the L7 pointer in the ofpbuf gets set but
nothing cares about it for ICMP so there's no actual change.  I
changed my mind about this though, so I put it back to the original
version.

>
> There is duplicated code for IPPROTO_TCP and IPPROTO_UDP that we could
> factor out.

I've done that now.




More information about the dev mailing list