[ovs-dev] [PATCH] Trigger bridge reconfigure from ofproto layer

Ben Pfaff blp at nicira.com
Thu Sep 12 03:56:31 UTC 2013


On Mon, Sep 09, 2013 at 10:20:37AM -0700, gyang at nicira.com wrote:
> From: Guolin Yang <gyang at nicira.com>
> 
> There are two models in OVS in configure datapath port:
> 1. Datapath port created before user space bridge is configured.
>    In this model, datapath can be deleted or added independent of
>    user-space.
> 2. Datapath port created when ovsdb is requested to add the relevant
>    port.
> 
> Traditionally OVS supports the second model which is used in Linux
> platform.
> 
> With more platform support, OVS requires to support first model. In
> this case, datapath port change detected by ofproto layer need to trigger
> brdige to reconfigure so that bridge and ofproto layers can be
> synchronized.
> 
> This change introduced a API for ofproto to request reconfiguration and
> for bridge to detect the request.
> 
> Signed-off-by: Guolin Yang <gyang at nicira.com>

The need makes sense.  I think that the code is OK.  I'll fix up a few
minor style details when I commit.

I suspect that this isn't going to have any in-tree users, though.
That's OK for platform support (we do much more invasive things to
support ASICs that also have no in-tree users) but it requires us to put
in explanatory comments so that the next programmer to come along (often
me 6 months down the road) doesn't just notice that it's unused and
delete it.  There aren't any at all here.

One subtlety of the API here is that ofproto providers should only ever
pass 'true' to ofproto_set_need_reconfigure(), that is, they should
never turn off reconfiguration.  That should go in a comment too.

So I'll apply this if you'll make an attempt to explain what's going on
in the comments, in the same spirit as the commit message above.

Thanks,

Ben.



More information about the dev mailing list