[ovs-dev] [PATCH] ofproto/ofproto.c: After port_mod + barrier, port config may not be updated

Ben Pfaff blp at nicira.com
Tue Oct 16 17:23:05 UTC 2012


On Tue, Oct 02, 2012 at 07:42:12PM +0900, Isaku Yamahata wrote:
> The following OF packets may produce the wrong result as follows.
> It depends on how ovs-vswitchd serves OF packets. Sending the OF packets
> in single TCP packet will increase the possiblity.
> 
> OF request:
>   feature request
>   port_mod with config LINK DOWN
>   barrier
>   feature request
> 
> The replies:
>   feature reply with port config UP
>   barrier
>   feature reply with port config UP (this should be DOWN because
>                                      it's after barrier)
>   port status with port config = DOWN and port status = DOWN
> 
> The direct cause is updte_port_config() @ ofproto/ofproto.c doesn't update
> ofputil_phy_port::config. And later the config member is updated
> by update_port() in main loop().
> It seems that it tries to produce port_status event due to config change.
> But changing other OFPC flags doesn't generate port_status event, so it's
> consistent not to generate the event when OFPC_LINK_DOWN flag is changed.
> 
> Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
> ---
> I can't find any explicit description in the spec about whether to generate
> port_status event when OFPC_ flags are changed.
> So which way do we like? generate port_status event or not?
> Anyway I think port_status event should be generated (or not generated)
> independently on which flags are changed.

I think it would be better to generate a port status event for any
change, rather than to never generate port status events.  Will you
write an alternative patch that implements that behavior?  Thanks.



More information about the dev mailing list