[ofa-general] Re: [PATCH 5/5] Move extern declarations for node description processing to a new header file.

Sasha Khapyorsky sashak at voltaire.com
Tue Mar 25 12:16:23 PDT 2008


Hi Ira,

On 11:40 Tue 25 Mar     , Ira Weiny wrote:
> 
> I think this is appropriate to move all the node description functionality to
> one file.  I think it is awkward to have a file called osm_node_desc_rcv.c and
> then have a function called osm_req_get_node_desc in a file with the name
> *node_info*.

osm_node_desc_rcv.c contains node description receiving things and
osm_req_get_node_desc() is sending stuff. So I'm not sure that is is
perfect mix. All this is pretty minor although.

> > >  
> > >  extern void osm_lft_rcv_process(IN void *context, IN void *data);
> > >  extern void osm_mft_rcv_process(IN void *context, IN void *data);
> > > -extern void osm_nd_rcv_process(IN void *context, IN void *data);
> > >  extern void osm_ni_rcv_process(IN void *context, IN void *data);
> > >  extern void osm_pkey_rcv_process(IN void *context, IN void *data);
> > >  extern void osm_pi_rcv_process(IN void *context, IN void *data);
> > 
> > Isn't it would be better to put all those declarations to n one place
> > (let's say osm_sm.h) instead of creating new - one function prototype
> > header file?
> 
> I'm not sure...  But there is already an osm_sm.h file and it has the functions
> for the osm_sm_t object.  For all these functions I think I would call the file
> something like osm_rcv_callback.h. Since these all define callbacks used when
> MADs of those types are received.  However, the problem I was trying to solve
> is where to put the declaration of osm_req_get_node_desc.

Yes, I see. But the idea behind local prototyping was that all those
functions could not be used easily in places other than osm_sm.c. This
is the case with osm_nd_rcv_process() function, but obviously not with
osm_req_get_node_desc().

> At the time it
> seemed best to put it with other node_desc type functions but perhaps it would
> be best to create another c file with generic MAD sends in it?

It could be interesting, we need to see how it will look, if it
consolidates the code it should be good.

Sasha



More information about the general mailing list