On Fri, Feb 25, 2011 at 01:25:15PM +0200, Alex Netes wrote:
> > > What is the expected behaviour when IB PKey table block is empty?
> > > rec.pkey_tbl might be uninitialized here.
> > > Shouldn't SubnAdmGetResp contain ERR_NO_RECORDS in such case?
> >
> > It depends on the method used in the SA query. GetTable never returns
> > ERR_NO_RECORDS whereas a Get can.
>
> In case when IB PKey table block is empty, p_rec_item->rec.pkey_tbl would be
> uninitialized.
No, it isn't, it is zero.
memset(p_rec_item, 0, sizeof(*p_rec_item));
p_rec_item->rec.lid = lid;
p_rec_item->rec.block_num = block;
p_rec_item->rec.port_num = osm_physp_get_port_num(p_physp);
p_rec_item->rec.pkey_tbl =
*(osm_pkey_tbl_block_get(osm_physp_get_pkey_tbl(p_physp),
block));
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html