[ovs-dev] [add-remove 7/7] vswitchd: Better tolerate changes in datapath ports.
blp at nicira.com
Tue Sep 28 16:11:02 PDT 2010
On Tue, Sep 28, 2010 at 03:54:20PM -0700, Jesse Gross wrote:
> On Tue, Sep 28, 2010 at 11:58 AM, Ben Pfaff <blp at nicira.com> wrote:
> > This commit fixes the problem by adding the ifindex to the callbacks. In
> > step 3, bridge_port_changed_ofhook_cb sees that the port that was deleted
> > was not the same as the one that it has in its interface and ignores it.
> > Thanks to Jesse Gross for identifying the problem.
> I've only skimmed through this set very quickly, so this isn't a full
> review yet and it is possible that I missed something. However,
> ifindex is only available for devices that exist in the system but not
> virtual ports that we create. Therefore, won't this reject all
> virtual ports because they always return -EOPNOTSUPP when their
> ifindex is requested?
It doesn't have a way to uniquely identify instantiations of a vport But
it accepts EOPNOTSUPP as an indication that it can't tell them apart
(see the change to make_ofport()). So it will always consider any two
non-netdev based vports to be the same.
Is there a way to uniquely identify an instantiation of a vport? Should
we invent one?
I suppose that two vports with the same name, port number, and
configuration could be considered the same vport. But currently there
is no way, as far as I know, to retrieve the configuration of a vport
from the kernel. (I added one in the netlink series.) If we could do
that, then we could at least determine whether vports were equivalent.
Hmm, there's something additional obviously stupid here: iface->ifindex
is never actually set. That means that I never tested the case where we
really want to delete the port, only the one where we don't. I'll fix
that, retest, and repost.
More information about the dev