On Tue, Mar 29, 2016 at 06:47:43PM -0700, Russell Bryant wrote: > This patch implements one approach to using ovn-controller to implement > a software l2 gateway between logical and physical networks. > > A new logical port type called "gateway" is introduced here. It is very > close to how localnet ports work, with the following exception: > A localnet port makes OVN use the physical network as the > transport between hypervisors instead of tunnels. A gateway port still > uses tunnels between all hypervisors, and packets only go to/from the > specified physical network as needed via the chassis the gateway port > is bound to. > > Signed-off-by: Russell Bryant <russ...@ovn.org>
This isn't a full review yet but I have some comments. Below, I don't think it's guaranteed that 'chassis_id != NULL'. There's a check for that just above the patch context, and I don't think that br_int != NULL implies that chassis_id != NULL. Chasing the usage of chassis_id down a few levels, it appears to be used without a null test. > --- a/ovn/controller/ovn-controller.c > +++ b/ovn/controller/ovn-controller.c > @@ -293,7 +293,7 @@ main(int argc, char *argv[]) > } > > if (br_int) { > - patch_run(&ctx, br_int, &local_datapaths); > + patch_run(&ctx, br_int, &local_datapaths, chassis_id); > > struct lport_index lports; > struct mcgroup_index mcgroups; When I apply the hunk below I get two <dt>s in a row about "localnet", which seems like a mistake. Is the second one supposed to be about "gateway"? > --- a/ovn/ovn-sb.xml > +++ b/ovn/ovn-sb.xml > @@ -1299,6 +1299,14 @@ tcp.flags = RST; > to model direct connectivity to an existing network. > </dd> > > + <dt><code>localnet</code></dt> > + <dd> > + A connection to a physical network. The chassis this > + <ref table="Port_Binding"/> is bound to will serve as > + an L2 gateway to the network named by > + <ref column="options" > table="Port_Binding"/>:<code>network_name</code>. > + </dd> > + > <dt><code>vtep</code></dt> > <dd> > A port to a logical switch on a VTEP gateway chassis. In order > to _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev