Sebastien Roy wrote:
> Cathy Zhou wrote:
>> I am wondering whether this bug should be just fixed if we change line 
>> 1066 of dls_mgmt.c (th old code) to return ENOENT instead of EINVAL?
> 
> That would fix this particular failure, yes.  It would leave behind other 
> cases where EINVAL is erroneously returned, though, which is why the fix 
> is slightly more involved.  I should have expanded on that in the CR 
> Evaluation.
> 
>> Of course, there are other places in this function that should return 
>> ENOENT too.
> 
> Right, and more generally, codes other than EINVAL.  For example, the 
> change at 1076 will now return the actual failure of 
> dls_mgmt_get_linkid() or dls_mgmt_get_phydev() if an error in one of 
> those functions occurs.

Okay.

I am wondering, we should always return ENOENT in dls_devnet_hold_by_name() 
function [1].

For example, ln1048, should return ENOENT. I am not quite understand when we 
would reach 
line 1080, but I can certainly test it out. The dls_devnet_set() function on 
line1105 
could return EEXIST, if this is a implicit VLAN name, but the same VLAN already 
exists 
using another name, but in that case, we should also return ENOENT.

[1] Probably the only exception is the dls_mgmt_xxx() upcalll. If the daemon 
fails for 
some reason, maybe EBADF should be returned.

Thanks
- Cathy

Reply via email to