[ofa-general] Re: [PATCH] IB/core: Enhance SMI for switch support

Suresh Shelvapille suri at baymicrosystems.com
Thu Mar 29 11:27:04 PDT 2007


Roland:

None of the functions in smi.c follow your definition. 
0 is used to say discard packet and 1 for completion up the stack.

So, I am not sure if reworking this one function with 3 return values buys
anything.

Thanks,
Suri

> -----Original Message-----
> From: general-bounces at lists.openfabrics.org [mailto:general-bounces at lists.openfabrics.org] On Behalf
> Of Roland Dreier
> Sent: Thursday, March 29, 2007 1:57 PM
> To: Hal Rosenstock
> Cc: general at lists.openfabrics.org
> Subject: Re: [ofa-general] Re: [PATCH] IB/core: Enhance SMI for switch support
> 
>  > >   Especially the "if (!retsmi)" is very
>  > > hard to follow.
>  >
>  > Is it hard to follow ?
> 
> It doesn't follow the convention of returning 0 if success, non-zero
> if failure -- the only way I could know that !retsmi means something
> other than "success" is if I go read the comment that tells me "0 if
> the SMP should be completed up the stack," and there's no reason why I
> would go search for that comment.
> 
>  - R.
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list