[ovs-dev] [RFC flow tunnels 7/8] lib: Switch to flow based tunneling.

Ethan Jackson ethan at nicira.com
Fri Jan 25 23:39:31 UTC 2013

Hi Jarno,

Sorry it's taken me so long to get back to this.  I'm in the process
of fixing the code up to send out for final review, and hence going
through the old comments.

> The last line makes the odp_to_ofport_map a "multimap", when multiple tunnels
> with the same ODP port number are inserted there.  After that, the results for the
> map use will depend on which ofproto makes the call using the map, as for
> example odp_port_to_ofp_port() and get_odp_port() would fail depending on
> which of the ofproto_dpif's happens to have its ofport_dpif first in the hash bucket.

This was just a mistake on my part.  You're right that it's better to
leave the tunnel ports out of the odp_port_to_ofp_port map, so I've
folded the change in.

> On the same note, maybe the tunnel maps should live inside the backer like the
> odp_to_ofport_map? Now, when the tnl_match_map and ofport_map are in global
> scope, they will be shared across all dpif's, even across different types, which may
> have overlapping ODP port numbers.

I think in principle, you're right on this point.  However, in
practice I don't think there exist any platforms which have two
different datapaths that both support tunneling.  I'd like to get this
in fairly soon so we can begin testing (given how major a change it
is), so for now I've done the following:  I've created an ovs_assert()
which verifies the result of tnl_port_receive() has the backer we
expect, and added a comment explaining that in the future we should
scope the tunnel module to a backer.

Thanks for the review,  I'll have a new version out in a couple of days.

More information about the dev mailing list