Message ID | 20160601050455.GA19976@vergenet.net |
---|---|
State | Not Applicable |
Headers | show |
On Wed, Jun 01, 2016 at 02:04:57PM +0900, Simon Horman wrote: > On Tue, May 31, 2016 at 08:20:24PM -0700, Ben Pfaff wrote: > > There's a change to tnl_port_show() to "Skip ports with duplicate 'port' > > field". I don't understand this change. Can you explain it? (It's > > O(n**2) in the number of ports, too.) > > The problem that this tries to address is that it is now possible > to have an l3 and non-l3 tunnel which share the same port and when > the ports are dumped this shows up as a duplicate. > > For example in the tunnel-push-pop.at test updated by this patch the > following duplicate gre port appears without this portion of the change: OK, so I understand the solution now, but I don't yet understand the problem: why are these represented as two separate tunnels, and why do those separate tunnels have the same port number? Thanks, Ben.
On Wed, Jun 08, 2016 at 01:10:54PM -0700, Ben Pfaff wrote: > On Wed, Jun 01, 2016 at 02:04:57PM +0900, Simon Horman wrote: > > On Tue, May 31, 2016 at 08:20:24PM -0700, Ben Pfaff wrote: > > > There's a change to tnl_port_show() to "Skip ports with duplicate 'port' > > > field". I don't understand this change. Can you explain it? (It's > > > O(n**2) in the number of ports, too.) > > > > The problem that this tries to address is that it is now possible > > to have an l3 and non-l3 tunnel which share the same port and when > > the ports are dumped this shows up as a duplicate. > > > > For example in the tunnel-push-pop.at test updated by this patch the > > following duplicate gre port appears without this portion of the change: > > OK, so I understand the solution now, but I don't yet understand the > problem: why are these represented as two separate tunnels, and why do > those separate tunnels have the same port number? Up until now the usage of tunnel vports has been such that each datapath vport corresponds to exactly one tunnel vport. The way the l3 tunnel support is structured in this patchset this is no longer the case and a single datapath vport may be used for both an l3 and non-l3 tunnel. Or more concretely, GRE carrying TEB packets and GRE carrying non-TEB packets use the same kernel netdev and thus kernel vport but different tunnel vports in ovs-vswitchd.
--- a/datapath/linux/compat/include/linux/openvswitch.h +++ b/datapath/linux/compat/include/linux/openvswitch.h @@ -358,6 +358,9 @@ enum ovs_key_attr { #ifdef __KERNEL__ /* Only used within kernel data path. */ OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ +#else + /* Only used within user-space data path. */ + OVS_KEY_ATTR_NEXT_BASE_LAYER, /* base layer of encapsulated packet */ #endif __OVS_KEY_ATTR_MAX };