[ovs-dev] [IPv6 IV: A New Hope 5/6] nicira-ext: Support matching IPv6 traffic.

Ben Pfaff blp at nicira.com
Wed Feb 2 18:36:07 UTC 2011

On Tue, Feb 01, 2011 at 12:53:52AM -0800, Justin Pettit wrote:
> Provides ability to match over IPv6 traffic in the same manner as IPv4.
> Currently, the matching fields include:
>     - IPv6 source and destination addresses (ipv6_src and ipv6_dst)
>     - Traffic Class (nw_tos)
>     - Next Header (nw_proto)
>     - ICMPv6 Type and Code (icmp_type and icmp_code)
>     - TCP and UDP Ports over IPv6 (tp_src and tp_dst)
> When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to
> OVS must be used.
> Signed-off-by: Justin Pettit <jpettit at nicira.com>

I have a few comments in addition to my earlier ones.

I believe that in parse_ipv6hdr(), the statement
	nh_len = payload_ofs - skb_network_offset(skb);
can be simplified to:
	nh_len = payload_ofs - nh_ofs;
because I don't see anything in between nh_ofs and nh_len that would
change the network header offset.

Why does parse_ipv6hdr() return the network header length?  I don't see
where the caller uses it.  I think that it could just return 0.

In odp_key_ipv6, the uint32_t fields should be ovs_be32.

In odp_flow_key_to_flow(), I don't really like the mixing of IP_TYPE_*
(from packets.h) with IPPROTO_* (from some system header).  I'd rather
add a IP_TYPE_ICMPV6 or use IPPROTO_* uniformly.  Ditto in
parse_protocol() in ofp-parse.c.

Acked-by: Ben Pfaff <blp at nicira.com>

More information about the dev mailing list