On Sun, Jun 05, 2016 at 12:57:02AM +0800, Xiao Liang wrote: > On Sat, Jun 4, 2016 at 1:15 AM, Ben Pfaff <b...@ovn.org> wrote: > > On Tue, May 24, 2016 at 03:07:23PM +0800, Xiao Liang wrote: > >> Add new column "ofname" in Interface table to configure port name reported > >> to controllers with OpenFlow protocol, thus decouple OpenFlow port name > >> from > >> device name.
... > > I'd like ovs-ofctl to report an error if a user attempts to refer to a > > port by name but there is more than one port with the name. That could > > be in a separate patch. > > And what do you think of also adding an option (say, "--all") to > select all ports with the name? Do you think that users would find that option to be useful in practice? If you do, and it can be implemented cleanly in ovs-ofctl, then I think it would be OK to add an --all option. > > The logic in ofproto_port_set_ofpname() does not make sense to me in the > > third case here: > > > > if (!devname || > > (ofp_name && !strncmp(ofp_name, ofport->pp.name, name_size - 1)) || > > (!ofp_name && !strncmp(devname, ofport->pp.name, name_size - 1))) { > > /* No need to change port name. */ > > return; > > } > > > > I believe that in the > > (!ofp_name && !strncmp(devname, ofport->pp.name, name_size - 1))) { > > case, we should remove any current ofp_name and change the name of the > > OpenFlow port back to the device name, but instead the code appears to > > do nothing. > > In this case, the OpenFlow port name is already the same as devname > (strncmp). I think it's not necessary to remove the smap entry here > because it would be overwritten if changed later. You're right. I was confused. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev