Преглед изворни кода

[hermon] Remove an unnecessary check for GID-less transmissions

tags/v0.9.8
Michael Brown пре 15 година
родитељ
комит
dd2788594b
1 измењених фајлова са 1 додато и 8 уклоњено
  1. 1
    8
      src/drivers/infiniband/hermon.c

+ 1
- 8
src/drivers/infiniband/hermon.c Прегледај датотеку

1009
  ***************************************************************************
1009
  ***************************************************************************
1010
  */
1010
  */
1011
 
1011
 
1012
-/** GID used for GID-less send work queue entries */
1013
-static const struct ib_gid hermon_no_gid = {
1014
-	{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1015
-};
1016
-
1017
 /**
1012
 /**
1018
  * Post send work queue entry
1013
  * Post send work queue entry
1019
  *
1014
  *
1032
 	struct ib_work_queue *wq = &qp->send;
1027
 	struct ib_work_queue *wq = &qp->send;
1033
 	struct hermon_send_work_queue *hermon_send_wq = &hermon_qp->send;
1028
 	struct hermon_send_work_queue *hermon_send_wq = &hermon_qp->send;
1034
 	struct hermonprm_ud_send_wqe *wqe;
1029
 	struct hermonprm_ud_send_wqe *wqe;
1035
-	const struct ib_gid *gid;
1036
 	union hermonprm_doorbell_register db_reg;
1030
 	union hermonprm_doorbell_register db_reg;
1037
 	unsigned int wqe_idx_mask;
1031
 	unsigned int wqe_idx_mask;
1038
 
1032
 
1062
 		     ( ( ( av->rate < 2 ) || ( av->rate > 10 ) ) ?
1056
 		     ( ( ( av->rate < 2 ) || ( av->rate > 10 ) ) ?
1063
 		       8 : ( av->rate + 5 ) ) );
1057
 		       8 : ( av->rate + 5 ) ) );
1064
 	MLX_FILL_1 ( &wqe->ud, 3, ud_address_vector.sl, av->sl );
1058
 	MLX_FILL_1 ( &wqe->ud, 3, ud_address_vector.sl, av->sl );
1065
-	gid = ( av->gid_present ? &av->gid : &hermon_no_gid );
1066
-	memcpy ( &wqe->ud.u.dwords[4], gid, sizeof ( *gid ) );
1059
+	memcpy ( &wqe->ud.u.dwords[4], &av->gid, sizeof ( av->gid ) );
1067
 	MLX_FILL_1 ( &wqe->ud, 8, destination_qp, av->qpn );
1060
 	MLX_FILL_1 ( &wqe->ud, 8, destination_qp, av->qpn );
1068
 	MLX_FILL_1 ( &wqe->ud, 9, q_key, av->qkey );
1061
 	MLX_FILL_1 ( &wqe->ud, 9, q_key, av->qkey );
1069
 	MLX_FILL_1 ( &wqe->data[0], 0, byte_count, iob_len ( iobuf ) );
1062
 	MLX_FILL_1 ( &wqe->data[0], 0, byte_count, iob_len ( iobuf ) );

Loading…
Откажи
Сачувај