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: [email protected]
Subject: Re: [ovs-dev] [PATCH] datapath-windows: check for 'gOvsSwitchContext' 
in ValidateNetlinkCmd()


On Oct 15, 2014, at 8:33 PM, Eitan Eliahu <[email protected]>
 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

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to