[PATCH 5/5] srp_daemon: Rename ib_path_rec.num_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make it clear what the meaning is of the highest bit of num_path.

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
---
 srp_daemon/srp_daemon.c   |  2 +-
 srp_daemon/srp_ib_types.h | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index a8ff1bb5eff8..94d7c45bcd3e 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -2411,7 +2411,7 @@ static int get_lid(struct umad_resources *umad_res, union umad_gid *gid,
 
 	path_rec->sgid = *gid;
 	path_rec->dgid = *gid;
-	path_rec->num_path = 1;
+	path_rec->reversible_numpath = 1;
 	path_rec->hop_flow_raw = htobe32(1 << 31); /* rawtraffic=1 hoplimit = 0 */
 
 	if (send_and_get(umad_res->portid, umad_res->agent, &out_mad, &in_mad, 0) < 0)
diff --git a/srp_daemon/srp_ib_types.h b/srp_daemon/srp_ib_types.h
index 0aacdd3efdc8..a5bd9dcabe6f 100644
--- a/srp_daemon/srp_ib_types.h
+++ b/srp_daemon/srp_ib_types.h
@@ -91,9 +91,12 @@ enum {
 *	route between two end-points on a subnet.
 *
 * SYNOPSIS
+*
+* NOTES
+*	The role of this data structure is identical to the role of struct
+*	ibv_path_record in libibverbs/sa.h.
 */
-struct ib_path_rec
-{
+struct ib_path_rec {
 	uint8_t		resv0[8];
 	union umad_gid	dgid;
 	union umad_gid	sgid;
@@ -101,7 +104,7 @@ struct ib_path_rec
 	__be16		slid;
 	__be32		hop_flow_raw;
 	uint8_t		tclass;
-	uint8_t		num_path;
+	uint8_t		reversible_numpath; /* reversible-7:7 num path-6:0 */
 	__be16		pkey;
 	__be16		sl;
 	uint8_t		mtu;
@@ -109,8 +112,7 @@ struct ib_path_rec
 	uint8_t		pkt_life;
 	uint8_t		preference;
 	uint8_t		resv2[6];
-
-}	PACK_SUFFIX4;
+};
 
 
 /****f* IBA Base: Types/umad_init_new
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux