Parcourir la source

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

tags/v0.9.8
Michael Brown il y a 15 ans
Parent
révision
dd2788594b
1 fichiers modifiés avec 1 ajouts et 8 suppressions
  1. 1
    8
      src/drivers/infiniband/hermon.c

+ 1
- 8
src/drivers/infiniband/hermon.c Voir le fichier

@@ -1009,11 +1009,6 @@ static void hermon_destroy_qp ( struct ib_device *ibdev,
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 1013
  * Post send work queue entry
1019 1014
  *
@@ -1032,7 +1027,6 @@ static int hermon_post_send ( struct ib_device *ibdev,
1032 1027
 	struct ib_work_queue *wq = &qp->send;
1033 1028
 	struct hermon_send_work_queue *hermon_send_wq = &hermon_qp->send;
1034 1029
 	struct hermonprm_ud_send_wqe *wqe;
1035
-	const struct ib_gid *gid;
1036 1030
 	union hermonprm_doorbell_register db_reg;
1037 1031
 	unsigned int wqe_idx_mask;
1038 1032
 
@@ -1062,8 +1056,7 @@ static int hermon_post_send ( struct ib_device *ibdev,
1062 1056
 		     ( ( ( av->rate < 2 ) || ( av->rate > 10 ) ) ?
1063 1057
 		       8 : ( av->rate + 5 ) ) );
1064 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 1060
 	MLX_FILL_1 ( &wqe->ud, 8, destination_qp, av->qpn );
1068 1061
 	MLX_FILL_1 ( &wqe->ud, 9, q_key, av->qkey );
1069 1062
 	MLX_FILL_1 ( &wqe->data[0], 0, byte_count, iob_len ( iobuf ) );

Chargement…
Annuler
Enregistrer