#endif\r
\r
\r
-static ib_api_status_t\r
+static void\r
ual_get_gid_index(\r
IN struct _al_ci_ca *p_ci_ca,\r
IN uint8_t port_num,\r
IN ib_gid_t *p_gid,\r
- OUT uint16_t *p_index)\r
+ OUT uint8_t *p_index)\r
{\r
ib_port_attr_t *p_port_attr;\r
- ib_api_status_t status = IB_INVALID_GID;\r
- uint16_t i;\r
+ uint8_t i;\r
\r
ci_ca_lock_attr( p_ci_ca );\r
p_port_attr = &p_ci_ca->p_pnp_attr->p_port_attr[port_num-1];\r
+ *p_index = 0;\r
for( i = 0; i < p_port_attr->num_gids; i++ )\r
{\r
if( !cl_memcmp(p_gid, &p_port_attr->p_gid_table[i], sizeof(ib_gid_t)) )\r
{\r
*p_index = i;\r
- status = IB_SUCCESS;\r
break;\r
}\r
}\r
ci_ca_unlock_attr( p_ci_ca );\r
-\r
- return status;\r
}\r
\r
ib_api_status_t\r
ib_api_status_t status = IB_ERROR;\r
uvp_interface_t uvp_intf = h_pd->obj.p_ci_ca->verbs.user_verbs;\r
ib_av_attr_t av_attr;\r
- uint16_t index;\r
\r
AL_ENTER( AL_DBG_AV );\r
/* Clear the ioctl_buf */\r
{\r
if( p_av_attr->grh_valid )\r
{\r
- status = ual_get_gid_index(h_pd->obj.p_ci_ca, av_attr.port_num,\r
- &av_attr.grh.src_gid, &index);\r
- if( status != IB_SUCCESS )\r
- goto out;\r
- av_attr.grh.resv1 = index;\r
+ ual_get_gid_index(h_pd->obj.p_ci_ca, av_attr.port_num, \r
+ &av_attr.grh.src_gid, &av_attr.grh.resv2);\r
}\r
\r
status = uvp_intf.pre_create_av( h_pd->h_ci_pd,\r
status, &h_av->h_ci_av, &ioctl_buf.out.umv_buf);\r
}\r
\r
-out:\r
AL_EXIT( AL_DBG_AV );\r
return status;\r
}\r
ib_av_t* p_av = (ib_av_t*) h_av;\r
uvp_interface_t uvp_intf = p_av->obj.p_ci_ca->verbs.user_verbs;\r
ib_av_attr_t av_attr;\r
- uint16_t index;\r
\r
AL_ENTER( AL_DBG_AV );\r
/* Clear the ioctl_buf */\r
{\r
if( p_av_attr->grh_valid )\r
{\r
- status = ual_get_gid_index(p_av->obj.p_ci_ca, av_attr.port_num,\r
- &av_attr.grh.src_gid, &index);\r
- if( status != IB_SUCCESS )\r
- goto out;\r
- av_attr.grh.resv1 = index;\r
+ ual_get_gid_index(p_av->obj.p_ci_ca, av_attr.port_num, \r
+ &av_attr.grh.src_gid, &av_attr.grh.resv2);\r
}\r
\r
/* Pre call to the UVP library */\r
p_av->h_ci_av, status, &ioctl_buf.out.umv_buf );\r
}\r
\r
-out:\r
AL_EXIT( AL_DBG_AV );\r
return status;\r
}\r
p_attr->grh.hop_limit = p_av_attr->grh.hop_limit;\r
__grh_get_ver_class_flow( p_av_attr->grh.ver_class_flow, NULL,\r
&p_attr->grh.traffic_class, &p_attr->grh.flow_label );\r
- p_attr->grh.sgid_index = (uint8_t) p_av_attr->grh.resv1;\r
+ p_attr->grh.sgid_index = p_av_attr->grh.resv2;\r
cl_memcpy (p_attr->grh.dgid.raw, p_av_attr->grh.dest_gid.raw, 16);\r
}\r
else\r
p_attr->grh.hop_limit = p_av_attr->grh.hop_limit;\r
ib_grh_get_ver_class_flow( p_av_attr->grh.ver_class_flow, NULL,\r
&p_attr->grh.traffic_class, &p_attr->grh.flow_label );\r
- p_attr->grh.sgid_index = (uint8_t) p_av_attr->grh.resv1;\r
+ p_attr->grh.sgid_index = p_av_attr->grh.resv2;\r
cl_memcpy (p_attr->grh.dgid.raw, p_av_attr->grh.dest_gid.raw, \r
sizeof (IB_gid_t));\r
}else{\r