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

Suresh Shelvapille suri at baymicrosystems.com
Thu Mar 29 12:05:54 PDT 2007


Hal:

You are just looking at function smi_check_forward_dr_smp(). 

Take a look at what smi_handle_dr_smp_send() and smi_handle_dr_smp_recv() return.
In these two functions 0= discard, 1=process. This is what we were referring to.

If we are fixing the return codes to enums for smi_check_forward_dr_smp() function,
may be enum names can be made generic enough so that the other two functions could use the 
enums as well?

Anyway, you guys are better judges of these issue...

Thanks,
Suri


> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Thursday, March 29, 2007 3:51 PM
> To: Roland Dreier
> Cc: Suresh Shelvapille; general at lists.openfabrics.org
> Subject: Re: [ofa-general] Re: [PATCH] IB/core: Enhance SMI for switchsupport
> 
> On Thu, 2007-03-29 at 13:30, Roland Dreier wrote:
> >  > 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.
> >
> > Good point, I didn't look closely at smi.c.  I think reworking all the
> > smi.c return values with explicit IB_SMI_DISCARD etc return values
> > would make the code much easier to understand.  Probably doing that as
> > a separate patch before adding the switch stuff would be a good idea.
> 
> Rather than IB_SMI_DISCARD, it seems to me that IB_SMI_LOCAL and
> IB_SMI_SEND would be more in keeping with the current comments.
> 
> Is a separate patch for this along these lines really needed before the
> switch SMI changes ?
> 
> -- Hal
> 
> >  - R.




More information about the general mailing list