On Nov 12, 2014, at 2:03 AM, Eitan Eliahu <elia...@vmware.com> wrote:

> [1] The NDIS port state should always reflect the port state maintained by
>    NDIS so it should never be directly updated.
> [2] Remove the "port name" field as we use the "friendly name" instead.
> 
> Signed-off-by: Eitan Eliahu <elia...@vmware.com>

Eitan,
Nuking "port name" is fine. However, I don't understand what is the practical 
use of port state change. Perhaps a change like this suffices?

-        /* add assertion here
-         */
+        ASSERT(portParam->PortState == NdisSwitchPortStateTeardown);
-        vport->portState = NdisSwitchPortStateTeardown;
+        vport->portState = portParam->PortState;
        vport->ovsState = OVS_STATE_PORT_TEAR_DOWN;

One thing to note is that we rely a lot of vport->ovsState while processing 
packets. In OvsAddPorts() in Actions.c, we decide to forward packets to an NDIS 
port only if it in in the CONNECTED state. If we fail to update the state here 
to OVS_STATE_PORT_TEAR_DOWN, we might end up forwarding packets to a vport in 
!CONNECTED state, and that can lead to bug checks.

thanks,
-- Nithin

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to