saquery.c: Fix changing qos_class flag value to network order twice
PATCH 1/1 saquery.c: Fix changing qos_class flag value to network order twice
From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/[email protected]>
Fix the qos_class flag value from being converted to network order twice. The first time is in "CHECK_AND_SET_VAL" and the second is inside "ib_path_rec_set_qos_class".
--- src/saquery.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
src/saquery.c +3 -2
@@ -1065,8 +1065,9 @@ static int query_path_records(const struct query_cmd *q, struct sa_handle * h, pr.num_path |= reversible <<7 ;CHECK_AND_SET_VAL (p->pkey,16 ,0 , pr.pkey,PR ,PKEY );CHECK_AND_SET_VAL (p->sl,16 ,-1 , pr.qos_class_sl,PR ,SL ); -CHECK_AND_SET_VAL (p->qos_class,16 ,-1 , qos_class,PR ,QOS_CLASS ); -ib_path_rec_set_qos_class (&pr, qos_class); +CHECK_AND_SET_VAL ((p->qos_class <<4 ),16 ,-1 , qos_class,PR ,QOS_CLASS ); + pr.qos_class_sl = (pr.qos_class_sl &CL_HTON16 (IB_PATH_REC_SL_MASK )) | + qos_class;CHECK_AND_SET_VAL_AND_SEL (p->mtu, pr.mtu,PR ,MTU ,SELEC );CHECK_AND_SET_VAL_AND_SEL (p->rate, pr.rate,PR ,RATE ,SELEC ); CHECK_AND_SET_VAL_AND_SEL(p->pkt_life, pr.pkt_life, PR, PKTLIFETIME,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH RESEND 1/1 saquery.c: Fix changing qos_class flag value to network order twice
In reply to a message not in the archiveFrom: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/[email protected]>
Fix the qos_class flag value from being converted to network order twice. The first time is in "CHECK_AND_SET_VAL" and the second is inside "ib_path_rec_set_qos_class".
--- src/saquery.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
src/saquery.c +3 -2
@@ -1065,8 +1065,9 @@ static int query_path_records(const struct query_cmd *q, struct sa_handle * h, pr.num_path |= reversible <<7 ;CHECK_AND_SET_VAL (p->pkey,16 ,0 , pr.pkey,PR ,PKEY );CHECK_AND_SET_VAL (p->sl,16 ,-1 , pr.qos_class_sl,PR ,SL ); -CHECK_AND_SET_VAL (p->qos_class,16 ,-1 , qos_class,PR ,QOS_CLASS ); -ib_path_rec_set_qos_class (&pr, qos_class); +CHECK_AND_SET_VAL ((p->qos_class <<4 ),16 ,-1 , qos_class,PR ,QOS_CLASS ); + pr.qos_class_sl = (pr.qos_class_sl &CL_HTON16 (IB_PATH_REC_SL_MASK )) | + qos_class;CHECK_AND_SET_VAL_AND_SEL (p->mtu, pr.mtu,PR ,MTU ,SELEC );CHECK_AND_SET_VAL_AND_SEL (p->rate, pr.rate,PR ,RATE ,SELEC ); CHECK_AND_SET_VAL_AND_SEL(p->pkt_life, pr.pkt_life, PR, PKTLIFETIME,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
ira.weiny
AppliedQuoted 8 lines · Hal Rosenstock
From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/[email protected]>
Fix the
qos_classflag value from being converted to network order twice. The first time is in "CHECK_AND_SET_VAL" and the second is inside "ib_path_rec_set_qos_class".
Thanks applied,
Ira
Quoted 12 lines
--- src/saquery.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)src/saquery.c +0
-0@@ -1065,8 +1065,9 @@ static int query_path_records(const struct query_cmd *q, struct sa_handle * h, pr.num_path |= reversible <<7 ;
src/saquery.c static int query_path_records(const struct query_cmd *q, struct sa_handle * h, · line 1073
Quoted 10 lines
src/saquery.c +3
-2CHECK_AND_SET_VAL (p->pkey,16 ,0 , pr.pkey,PR ,PKEY );CHECK_AND_SET_VAL (p->sl,16 ,-1 , pr.qos_class_sl,PR ,SL ); -CHECK_AND_SET_VAL (p->qos_class,16 ,-1 , qos_class,PR ,QOS_CLASS ); -ib_path_rec_set_qos_class (&pr, qos_class); +CHECK_AND_SET_VAL ((p->qos_class <<4 ),16 ,-1 , qos_class,PR ,QOS_CLASS ); + pr.qos_class_sl = (pr.qos_class_sl &CL_HTON16 (IB_PATH_REC_SL_MASK )) | + qos_class;CHECK_AND_SET_VAL_AND_SEL (p->mtu, pr.mtu,PR ,MTU ,SELEC );CHECK_AND_SET_VAL_AND_SEL (p->rate, pr.rate,PR ,RATE ,SELEC ); CHECK_AND_SET_VAL_AND_SEL(p->pkt_life, pr.pkt_life, PR, PKTLIFETIME,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html