On Sat, Mar 31, 2012 at 04:37:41PM +0800, Min Chen wrote:
> I am reading source code of Open vSwitch 1.4.0. I have a question on
> updating ports immediately upon ofproto_port_add

This is a strange question.  What prompts the question, that is, why
does it matter to you when we run it?

> I searched this mailing list and I found Ben's
> comment<http://openvswitch.org/pipermail/dev/2011-May/008561.html>on
> updating ports after port_add. Ben wrote "I don't see a reason to
> defer
> this."

Right.  That was patch 28 out of 35 in a patch series that refactored
the whole switch implementation.  My guess is that the goal was not
to update the port earlier or later, but to update it in a place that
made it more amenable to refactoring in a later commit.

> But what dose update_port do?

It keeps the switch's knowledge of the collection of ports it manages
up to date.  As an important side effect, it sends OpenFlow
OFPT_PORT_STATUS messages.

> Since netdev is opened before calling ofproto_port_add, why it's opened
> again in update_port:

Not all the callers have a netdev.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to