This patch addes support of forcing GRH on 2 other functions.
Index: B:/users/tzachid/projinf9/trunk/core/al/kernel/al_cm_cep.c
===================================================================
--- B:/users/tzachid/projinf9/trunk/core/al/kernel/al_cm_cep.c
(revision 6933)
+++ B:/users/tzachid/projinf9/trunk/core/al/kernel/al_cm_cep.c
(revision 6934)
@@ -691,6 +691,7 @@
{
cep_agent_t
*p_port_cep;
const req_path_info_t *p_path;
+ int force_grh;
AL_ENTER( AL_DBG_CM );
@@ -740,7 +741,10 @@
p_cep->av[idx].attr.sl = conn_req_path_get_svc_lvl( p_path );
p_cep->av[idx].attr.dlid = p_path->local_lid;
- if( !conn_req_path_get_subn_lcl( p_path ) )
+
+ force_grh =
p_port_cep->h_ca->obj.p_ci_ca->verbs.rdma_port_get_transport(
+ p_port_cep->h_ca->obj.p_ci_ca->h_ci_ca,
p_port_cep->port_num) == RDMA_TRANSPORT_RDMAOE;
+ if(force_grh || !conn_req_path_get_subn_lcl( p_path ) )
{
p_cep->av[idx].attr.grh_valid = TRUE;
p_cep->av[idx].attr.grh.ver_class_flow =
ib_grh_set_ver_class_flow(
@@ -4365,7 +4369,8 @@
p_av->attr.grh.src_gid = p_path->sgid;
p_av->attr.grh.dest_gid = p_path->dgid;
- force_grh =
p_port_cep->h_ca->obj.p_ci_ca->verbs.rdma_port_get_transport(p_port_cep->h_ca->obj.p_ci_ca->h_ci_ca,
p_port_cep->port_num) == RDMA_TRANSPORT_RDMAOE;
+ force_grh =
p_port_cep->h_ca->obj.p_ci_ca->verbs.rdma_port_get_transport(
+ p_port_cep->h_ca->obj.p_ci_ca->h_ci_ca,
p_port_cep->port_num) == RDMA_TRANSPORT_RDMAOE;
p_av->attr.grh_valid = force_grh || (!ib_gid_is_link_local(
&p_path->dgid )) ||
(ib_path_rec_hop_limit(p_path) > 1);
@@ -4392,6 +4397,7 @@
__format_req_path(
IN const ib_path_rec_t* const
p_path,
IN const uint8_t
ack_delay,
+ IN int
force_grh,
OUT
req_path_info_t* const p_req_path )
{
AL_ENTER( AL_DBG_CM );
@@ -4414,7 +4420,7 @@
conn_req_path_set_svc_lvl( ib_path_rec_sl( p_path ),
p_req_path );
conn_req_path_set_subn_lcl(
- ib_gid_is_link_local( &p_path->dgid ),
p_req_path );
+ !force_grh && ib_gid_is_link_local( &p_path->dgid
), p_req_path );
conn_req_path_set_lcl_ack_timeout(
calc_lcl_ack_timeout( ib_path_rec_pkt_life(
p_path ) + 1,
@@ -4434,6 +4440,7 @@
{
ib_api_status_t status;
mad_cm_req_t* p_req;
+ int force_grh;
AL_ENTER( AL_DBG_CM );
@@ -4459,14 +4466,15 @@
ci_ca_unlock_attr( p_port_cep->h_ca->obj.p_ci_ca );
/* Format the primary path. */
+ force_grh =
p_port_cep->h_ca->obj.p_ci_ca->verbs.rdma_port_get_transport(p_port_cep->h_ca->obj.p_ci_ca->h_ci_ca,
p_port_cep->port_num) == RDMA_TRANSPORT_RDMAOE;
__format_req_path( p_cm_req->p_primary_path,
- p_cep->local_ack_delay, &p_req->primary_path );
+ p_cep->local_ack_delay, force_grh,
&p_req->primary_path );
if( p_cm_req->p_alt_path )
{
/* Format the alternate path. */
__format_req_path( p_cm_req->p_alt_path,
- p_cep->local_ack_delay,
&p_req->alternate_path );
+ p_cep->local_ack_delay,
force_grh, &p_req->alternate_path );
}
else
{
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw