* [PATCH infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice
@ 2016-04-04 8:00 Hal Rosenstock
[not found] ` <57021F03.5030805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Hal Rosenstock @ 2016-04-04 8:00 UTC (permalink / raw)
To: Weiny, Ira
Cc: Dan Ben Yosef, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
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".
Signed-off-by: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
src/saquery.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/saquery.c b/src/saquery.c
index c0f42e8..ea946a1 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH RESEND infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice
[not found] ` <57021F03.5030805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-04-05 12:53 ` Hal Rosenstock
[not found] ` <5703B531.3000505-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Hal Rosenstock @ 2016-04-05 12:53 UTC (permalink / raw)
To: Weiny, Ira
Cc: Dan Ben Yosef, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
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".
Signed-off-by: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
src/saquery.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/saquery.c b/src/saquery.c
index c0f42e8..ea946a1 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice
[not found] ` <5703B531.3000505-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-05-14 15:34 ` ira.weiny
0 siblings, 0 replies; 3+ messages in thread
From: ira.weiny @ 2016-05-14 15:34 UTC (permalink / raw)
To: Hal Rosenstock
Cc: Dan Ben Yosef, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Tue, Apr 05, 2016 at 08:53:05AM -0400, Hal Rosenstock wrote:
> From: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> 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".
>
> Signed-off-by: Dan Ben Yosef <danby-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Thanks applied,
Ira
> ---
> src/saquery.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/saquery.c b/src/saquery.c
> index c0f42e8..ea946a1 100644
> --- a/src/saquery.c
> +++ b/src/saquery.c
> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-14 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 8:00 [PATCH infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice Hal Rosenstock
[not found] ` <57021F03.5030805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-04-05 12:53 ` [PATCH RESEND " Hal Rosenstock
[not found] ` <5703B531.3000505-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-14 15:34 ` ira.weiny
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.