Go through ovn-sb to see what is also set by ovn-controller-vtep. For example, the "chassis" column in the Port_Binding record.
> On Aug 27, 2015, at 11:21 PM, Alex Wang <ee07b...@gmail.com> wrote: > > > +** Update learned MAC addresses from VTEP to OVN > + > + The VTEP gateway stores all MAC addresses learned from its > + physical interfaces in the 'Ucast_Macs_Local' and the > + 'Mcast_Macs_Local' tables. ovn-controller-vtep should be > + able to update those information back to ovn-sb database, s/those/that/ > + so that other chassis knows where to send packets destined s/knows/know/ > diff --git a/ovn/ovn-architecture.7.xml b/ovn/ovn-architecture.7.xml > index c9ac597..ef13b56 100644 > --- a/ovn/ovn-architecture.7.xml > +++ b/ovn/ovn-architecture.7.xml > @@ -806,6 +806,93 @@ > > + <li> > + The administrator can then create new <code>Logical_Switch</code> s/new/a new/ > + table entry, and bind particular vlan on VTEP gateway's port to s/bind particular/binds a particular/ s/VTEP/a VTEP/ > + table entry, and bind particular vlan on VTEP gateway's port to > + any VTEP logical switch. Once a VTEP logical switch is bound to > + a VTEP gateway, the <code>ovn-controller-vtep</code> will detect > + it and add its name to the <var>vtep_logical_switches</var> I mention it again later, but there's some inconsistency between underscores and hyphens in these key names. I think it would be better to just go with hyphens. > + Now, the administrator can use the CMS to add VTEP logical switch s/VTEP/a VTEP/ > + The newly created logical port in the <code>OVN_Northbound</code> > + database and its configuration will be passed down to the <code> > + OVN_Southbound</code> database as a new <code>Port_Binding</code> > + table entry. The <code>ovn-controller-vtep</code> will recognize the > + change and bind the logical port to the corresponding VTEP gateway > + chassis. Configuration of binding same VTEP logical switch to s/same/the same/ > + different OVN logical networks is not allowed and warning will be s/different/a different/ s/warning/a warning/ > + Next, the <code>ovn-controller-vtep</code> will keep reacting to the > + <code>Port_Binding</code> table and the <code>Multicast_Group</code> > + table configuration change in the <code>OVN_Northbound</code> database, > + and updating the <code>Ucast_Macs_Remote</code> table and the <code> > + Mcast_Macs_Remote</code> table in the <code>VTEP</code> database, The code doesn't actually do all of this, right? I think that might be confusing to users--even if it's documented in the TODO list. > + respectively. This allows the VTEP gateway understand where to s/understand/to understand/ > + forward the traffic coming from the extended external network. > + </li> > + > + <li> > + Eventually, the VTEP gateway's life cycle ends when the administrator > + unregisters the VTEP gateway from the <code>VTEP</code> database. > + The <code>ovn-controller-vtep</code> will recognized the event and > + remove all related configurations in the <code>OVN_Southbound</code> > + database. > + </li> Is it worth mentioning the cleanup that occurs when a VTEP is removed from ovn-nb? > diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml > index ade8164..5bb9265 100644 > --- a/ovn/ovn-nb.xml > +++ b/ovn/ovn-nb.xml > @@ -111,18 +111,37 @@ > <column name="type"> > <p> > Specify a type for this logical port. Logical ports can be used to > model > - other types of connectivity into an OVN logical switch. Leaving this > column > - blank maintains the default logical port behavior. > + other types of connectivity into an OVN logical switch. Leaving this > + column blank maintains the default logical port behavior, which is > + for a VM (or VIF) interface. Besides, the following types are > + defined: I think it might be clearer to write this sentence as "The following other types are defined:" > </p> > > - <p> > - There are no other logical port types implemented yet. > - </p> > + <dl> > + <dt><code>vtep</code></dt> > + <dd>A port to a logical switch on a VTEP gateway. In order > + to get this port correctly recognized by the ovn controller, the In the documentation, we've been using all caps for "OVN". > + <ref column="options" table="Logical_Port"/>:vtep_physical_switch > + and <ref column="options" table="Logical_Port"/>:vtep_logical_switch > + must also be defined.</dd> > + </dl> Since you've written this, "localnet" has been added, so that will need to be reworked into a bullet point. > <column name="options"> > + <p> > This column provides key/value settings specific to the logical port > - <ref column="type"/>. > + <ref column="type"/>. The following options are defined: > + </p> > + > + <dl> > + <dt><code>vtep_physical_switch</code></dt> > + <dd>The name of the VTEP gateway.</dd> I think it would be helpful to indicate if this is only meaningful if the "type" is "vtep". > + <dt><code>vtep_logical_switch</code></dt> > + <dd>A logical switch name connected by the VTEP gateway.</dd> Ditto. > --- a/ovn/ovn-sb.xml > +++ b/ovn/ovn-sb.xml > @@ -172,7 +172,13 @@ > > <column name="vtep_logical_switches"> > Stores all vtep logical switch names connected by this gateway > - chassis. > + chassis. The <ref table="Port_Binding"/> table entry with > + <ref column="options" table="Port_Binding"/>:vtep_physical_switch > + equal <ref table="Chassis"/> <ref column="name" table="Chassis"/>, > + and <ref column="options" table="Port_Binding"/>:vtep_logical_switch > + value in <ref table="Chassis"/> > + <ref column="vtep_logical_switches" table="Chassis"/>, will be > + associated with this <ref table="Chassis"/>. These (and other places in the documentation) are using underscores, but the code and error messages in the code use hyphens. I'd just go with hyphens to be more consistent. > @@ -894,18 +900,39 @@ > <column name="type"> > <p> > A type for this logical port. Logical ports can be used to model > - other types of connectivity into an OVN logical switch. Leaving this > column > - blank maintains the default logical port behavior. > + other types of connectivity into an OVN logical switch. Leaving this > + column blank maintains the default logical port behavior, which > + is for a VM (or VIF) interface. Besides, the following types are > + defined: I think it might be clearer to write this sentence as "The following other types are defined:" > > + <dt><code>vtep</code></dt> > + <dd>A port to a logical switch on a VTEP gateway chassis. In order > + to get this port correctly recognized by the ovn controller, the > + <ref column="options" table="Port_Binding"/>:vtep_physical_switch > + and <ref column="options" table="Port_Binding"/>:vtep_logical_switch > + must also be defined.</dd> > + </dl> > </column> I think "localnet" support has been added now, so that will need to be updated to the bullet-point form that you have above. > <column name="options"> > + <p> > This column provides key/value settings specific to the logical port > - <ref column="type"/>. > + <ref column="type"/>. The following options are defined: Same issue here about "localnet" being added. > + </p> > + > + <dl> > + <dt><code>vtep_physical_switch</code></dt> > + <dd>The <ref column="name" table="Chassis"/> of the VTEP gateway > + chassis.</dd> I think it would be helpful to indicate if this is only meaningful if the "type" is "vtep". > + <dt><code>vtep_logical_switch</code></dt> > + <dd>A logical switch name in VTEP gateway chassis's > + <ref column="vtep_logical_switches" table="Chassis"/>.</dd> Ditto. --Justin _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev