[ovs-dev] [PATCH v2 4/6] netdev-linux: Cache error code from set-policy api.

Ben Pfaff blp at nicira.com
Thu Mar 8 23:26:40 UTC 2012


On Thu, Mar 08, 2012 at 07:26:36AM -0800, Pravin B Shelar wrote:
> Fixed according to comments from Ben.
> v1-v2:
>      - Changed name from netdev_policy_error to netdev_policing_error.
> 
> --8<--------------------------cut here-------------------------->8--
> 
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>

The subject line still says "policy".

I'm a little reluctant to try to cache policing settings too
aggressively.  The kernel API is kind of difficult to deal with and
I'm not 100% certain that we do it exactly right.  I think it might be
too much to, after we get one kernel error back, refuse to ever try
setting any other values.

So, how about this: we always save the desired settings into our data
structure, regardless of whether the previous call was successful or
not.  Thereafter, we cache the error status only for future calls that
supply the same desired settings, but call into the kernel for another
try for any future call that supplies different settings.

Does that make sense?

Thanks,

Ben.



More information about the dev mailing list