[ovs-dev] [PATCH] ofproto: Preserve ofport number for failed ofport across restarts

Ilya Maximets i.maximets at ovn.org
Wed Sep 9 18:02:11 UTC 2020

>> I've been taking a look at this patch for the last few minutes.  It introduces a lot
>> of mechanism for the use case.  Did you consider any simpler mechanisms to
>> achieve the same effect?  What prevented them from working?
> I agree Ben. This change does bring some complexity to the code. A simpler solution would
> be to leave the ofport number in ovsdb record of the interface (instead of setting it to -1).
> But issue was when the port delete happens we do not see this record to be able to free the
> ofport number. Is there a way to handle this?
> Warm Regards,
> Vishal Ajmera

Hi, Vishal.  I'm looking through old patches after the patchwork cleanup and
it seems that this one in kind of undecided state.
Does this patch still valid?

Anyway, for the problem you described here:  Maybe it's possible to just use
'ofport_request' configuration option for interfaces?  It could be implemented
as picking a unique ofport before adding a new port and set 'ofport_request'
along with port creation.  Another way is to fix current ofport for interfaces
once OVS chose it, i.e. port add -> check ofport -> set 'ofport_request' with
that value.
In any case after reboot OVS will choose exactly same ofport as it was before
because it is stored in database.

What do you think?

Best regards, Ilya Maximets.

More information about the dev mailing list