[ovs-discuss] DNAT missing from datapath actions in ofproto/trace

Ben Pfaff blp at ovn.org
Thu May 9 23:05:29 UTC 2019

On Wed, May 08, 2019 at 02:54:58PM -0600, Carl Baldwin wrote:
> Thanks for your quick response. Your assessment makes sense to me. For
> IPv4, I don't think 0 would be a valid protocol number but for IPv6 it
> would mean that the hop-by-hop options are present.

For IPv6, OVS does not literally use the next-protocol field in the
initial IPv6 header as nw_proto.  Instead, it skips past many kinds of
protocols, including hop-by-hop options, until it arrives at a terminal
header such as TCP or UDP, and then it uses the terminal header protocol
number as nw_proto.

> What do you think about the extra no-op actions in the datapath
> actions when I set the protocol to icmp? The DNAT shows up on the
> datapath actions line. However, it also sets the ip src
> (src= This appears to coincide with a match in the
> megaflow (nw_src= effectively making it a no-op. If I change
> the nw_src value in the original br_flow, then I get different values
> for these but it always boils down to essentially a no-op. This seems
> some of the internal megaflow implementation leaking into the datapath
> actions.


I think that we recently improved this behavior, because this is what I
see with OVS from the master branch:

Final flow: icmp,in_port=4,vlan_tci=0x0000,dl_src=00:00:5e:00:01:01,dl_dst=a6:c1:a7:15:a4:3d,nw_src=,nw_dst=,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
Megaflow: recirc_id=0,eth,ip,in_port=4,dl_vlan=13,dl_vlan_pcp=0,dl_src=d8:18:d3:fd:66:40,nw_dst=,nw_frag=no
Datapath actions: set(eth(src=00:00:5e:00:01:01)),set(ipv4(dst=,pop_vlan,21

More information about the discuss mailing list