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

Hal Rosenstock halr at voltaire.com
Thu Mar 29 13:12:14 PDT 2007


Suri,

On Thu, 2007-03-29 at 14:05, Suresh Shelvapille wrote:
> 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.

I see what you are referring to now. That's true for the other routines
but unfortunately not this one.

> 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?

Not sure what the one set of names would be: 
discard != local and process != send

Two sets of names (enums) could do it though.

If this is what is to be done then it should be 2 patches with the first
preserving the current CA/router only support with the enums and the
second adding in switch SMI.

-- Hal

> 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