[ofa-general] Re: opensm/osm_port_t struct definition

Sasha Khapyorsky sashak at voltaire.com
Tue Aug 19 02:29:02 PDT 2008


Hi Yevgeny,

On 12:23 Tue 19 Aug     , Yevgeny Kliteynik wrote:
>
> I have a general question/concern about osm_port_t:
>
> typedef struct osm_port {
> 	cl_map_item_t map_item;
> 	cl_list_item_t list_item;
> 	...
> } osm_port_t;
>
> Here and there in the code I see some comments that
> map_item and list_item should be first members of the
> struct,

I cannot find such comment about list_item. It should not be a first
member, to access the structure we are using cl_item_obj() macro
(cl_qlist.h).

> which, I guess, means that same object can't be
> member of both map and list.
> Do we have a problem here?

No, both can be used. I don't see any problem here.

Sasha



More information about the general mailing list