[openib-general] Get Table Records for SA Attribute ID ?
Takshak C.
takshak at gs-lab.com
Mon Feb 6 05:00:59 PST 2006
Hi,
I m trying to get the table records for SA attribute ID in following way.
But, I m not getting a single record, could anyone comment on the problem.
1. I have created saMadFormat structure described in the specification as below:
struct saMadFormat
{
uint8_t base_version ;
uint8_t mgmt_class ;
uint8_t class_version ;
uint8_t sa_method ;
uint16_t status ;
uint16_t not_used ;
uint64_t tid ;
uint16_t attr_id ;
uint16_t resv ;
uint32_t attr_mod ;
uint64_t sa_key;
uint64_t sm_key ;
uint32_t seg_num ;
uint32_t payload_len ;
uint8_t frag_flag ;
uint8_t edit_mod ;
uint16_t window ;
uint32_t endRID ;
uint64_t comp_mask ;
uint8_t adminData[192] ;
};
2. Then I have done all the basic operations like umad_open, umad_register for the IB_SA_CLASS
and umad_open_port etc successfully.
3. struct saMadFormat *saQuery = (struct saMadFormat*)(umad_get_mad(umad));
memset(saQuery, 0, sizeof(*saQuery));
saQuery->base_version = 1;
saQuery->mgmt_class = IB_SA_CLASS ;
saQuery->class_version = 1 ;
saQuery->sa_method = IB_MAD_METHOD_GET_TABLE ;
saQuery->attr_id = IB_SA_ATTR_PATHRECORD ;
saQuery->attr_mod = 0 ;
saQuery->tid = htonll(drmad_tid++);
saQuery->endRID = 0 ;
umad_set_addr(umad, lid, 1, 0, IB_DEFAULT_QP1_QKEY);
umad_set_grh(umad, 0);
umad_set_pkey(umad, 0xFFFF);
4. length = IB_MAD_SIZE;
if (umad_send(portid, mad_agent, umad, length, timeout_ms, 0) < 0)
IBPANIC("send failed");
if (umad_recv(portid, umad, &length, -1) != mad_agent)
IBPANIC("recv error: %s", drmad_status_str(saQuery));
if (!dump_char) {
xdump(stdout, 0, saQuery->adminData, 192);
return 0;
}
I m expecting that, I will get the resultant data in saQuery->adminData.
Is this correct ? If not then, how should I retrieve the table records ?
Any Idea ?
Thanks
- Takshak
More information about the general
mailing list