[ovs-dev] [PATCH] datapath-windows: check for 'gOvsSwitchContext' in ValidateNetlinkCmd()

Eitan Eliahu eliahue at vmware.com
Thu Oct 16 05:08:22 UTC 2014


Nithin, the DP commands are an exception. But, it does not make sense to check if the driver got initialized in each of the handlers.
One simple way to handle the exception is to condition it by the Family ID (not DP).
Thanks,
Eitan

-----Original Message-----
From: Nithin Raju 
Sent: Wednesday, October 15, 2014 9:08 PM
To: Eitan Eliahu
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH] datapath-windows: check for 'gOvsSwitchContext' in ValidateNetlinkCmd()


On Oct 15, 2014, at 8:33 PM, Eitan Eliahu <eliahue at vmware.com>
 wrote:

> Hi Nithin,
> Perhaps, it would be better to have the check for gOvsSwitchContext much earlier at the Dispatcher function and avoid this check in  ValidateNetlinkCmd() and in every handler function as well.

Eitan,
Some of the commands such as DP Dump don't pass the dp_index parameter and are marked as 'validateDpIndex' = FALSE. If the OVS extension is not enabled on the Hyper-V switch, we'd end up failing such commands if we check for 'gOvsSwitchContext' earlier in the code. The desired behavior, IMO, should be that the command should succeed but return an empty list of DPs. Once all the commands are implemented, we can consider refactoring this.

Thanks,
-- Nithin




More information about the dev mailing list