vswitch: Don't push bad flows to datapath during reconfiguration.
authorBen Pfaff <blp@nicira.com>
Wed, 3 Jun 2009 16:36:06 +0000 (09:36 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 3 Jun 2009 16:36:06 +0000 (09:36 -0700)
commit0f4c4b89f2d81a49802da0222f752434f66aca65
tree1bbd8bf6af8018a55914c39241052b5463dfbaeb
parent360e13f88f379d7c565b7005c4fba01523faa431
vswitch: Don't push bad flows to datapath during reconfiguration.

When reconfiguration adds a new port to a bridge, it initially has
dp_ifidx of -1, indicating that the datapath port number is unknown.  (It
can't be known because ports are added to the datapath later on.)  But
during configuration of the controller we may add or modify flows using
ofproto_add_flow(), which can update flows in the datapath.  The -1
dp_ifidx will then get converted to uint16_t as 65535, which the datapath
will reject as a bad port number.

This commit solves the problem by configuring the controller later, after
datapath port numbers have been assigned.
vswitchd/bridge.c