All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels
@ 2017-11-14 14:40 Nicolas Morey-Chaisemartin
       [not found] ` <636b5412-e41e-40ed-46da-a0e83bd5b049-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 14:40 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe

At least the RDMA CM in 4.3 will give user space structs with these bits
set. Those kernels require user space to pass those set bits back to the
kernel. Blocking them causes RDMA CM to be unusable on older kernels.

Stable-fix: Drop changes to verbs.h of the original fix,
 that are not needed for the fix itself.

Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
Commit-id: ce88cef301b ("verbs: Do not block QP attr_masks used by older kernels")
Reported-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe-uk2M96/98Pc@public.gmane.org>
---

Backport from Jason's patch without the verbs.h changes to not modify the API.

 libibverbs/cmd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 9d2140fb..77aba334 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1154,10 +1154,10 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 	struct ibv_query_qp_resp resp;
 
 	/*
-	 * Masks over IBV_QP_DEST_QPN are not supported by
-	 * that not extended command.
+	 * Starting with IBV_QP_RATE_LIMIT the attribute must go through the
+	 * _ex path.
 	 */
-	if (attr_mask & ~((IBV_QP_DEST_QPN << 1) - 1))
+	if (attr_mask & ~(IBV_QP_RATE_LIMIT - 1))
 		return EOPNOTSUPP;
 
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_QP, &resp, sizeof resp);
@@ -1324,10 +1324,10 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 		      struct ibv_modify_qp *cmd, size_t cmd_size)
 {
 	/*
-	 * Masks over IBV_QP_DEST_QPN are only supported by
-	 * ibv_cmd_modify_qp_ex.
+	 * Starting with IBV_QP_RATE_LIMIT the attribute must go through the
+	 * _ex path.
 	 */
-	if (attr_mask & ~((IBV_QP_DEST_QPN << 1) - 1))
+	if (attr_mask & ~(IBV_QP_RATE_LIMIT - 1))
 		return EOPNOTSUPP;
 
 	IBV_INIT_CMD(cmd, cmd_size, MODIFY_QP);
-- 
2.15.0.169.g3d3eebb67.dirty

--
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] 5+ messages in thread

* Re: [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels
       [not found] ` <636b5412-e41e-40ed-46da-a0e83bd5b049-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-14 18:04   ` Leon Romanovsky
       [not found]     ` <20171114180451.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2017-11-14 18:04 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

On Tue, Nov 14, 2017 at 03:40:25PM +0100, Nicolas Morey-Chaisemartin wrote:
> At least the RDMA CM in 4.3 will give user space structs with these bits
> set. Those kernels require user space to pass those set bits back to the
> kernel. Blocking them causes RDMA CM to be unusable on older kernels.
>
> Stable-fix: Drop changes to verbs.h of the original fix,
>  that are not needed for the fix itself.
>
> Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
> Commit-id: ce88cef301b ("verbs: Do not block QP attr_masks used by older kernels")
> Reported-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-uk2M96/98Pc@public.gmane.org>
> ---
>

You need to add your Signed-off-by.

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels
       [not found]     ` <20171114180451.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-14 18:49       ` Jason Gunthorpe
       [not found]         ` <20171114184912.GD4263-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Gunthorpe @ 2017-11-14 18:49 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Nicolas Morey-Chaisemartin, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Nov 14, 2017 at 08:04:51PM +0200, Leon Romanovsky wrote:
> On Tue, Nov 14, 2017 at 03:40:25PM +0100, Nicolas Morey-Chaisemartin wrote:
> > At least the RDMA CM in 4.3 will give user space structs with these bits
> > set. Those kernels require user space to pass those set bits back to the
> > kernel. Blocking them causes RDMA CM to be unusable on older kernels.
> >
> > Stable-fix: Drop changes to verbs.h of the original fix,
> >  that are not needed for the fix itself.
> >
> > Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
> > Commit-id: ce88cef301b ("verbs: Do not block QP attr_masks used by older kernels")
> > Reported-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Jason Gunthorpe <jgunthorpe-uk2M96/98Pc@public.gmane.org>
> >
> 
> You need to add your Signed-off-by.

And please add something like

    commit 9276717b9e297a62d1151a43d1cd286213f68eb7 upstream.

after the subject line for all patches ...

Edits look fine to me

Jason
--
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] 5+ messages in thread

* Re: [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels
       [not found]         ` <20171114184912.GD4263-uk2M96/98Pc@public.gmane.org>
@ 2017-11-14 18:50           ` Nicolas Morey-Chaisemartin
       [not found]             ` <0a24c63b-c108-3301-e78f-7e38d58f5bdb-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:50 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 14/11/2017 à 19:49, Jason Gunthorpe a écrit :
> On Tue, Nov 14, 2017 at 08:04:51PM +0200, Leon Romanovsky wrote:
>> On Tue, Nov 14, 2017 at 03:40:25PM +0100, Nicolas Morey-Chaisemartin wrote:
>>> At least the RDMA CM in 4.3 will give user space structs with these bits
>>> set. Those kernels require user space to pass those set bits back to the
>>> kernel. Blocking them causes RDMA CM to be unusable on older kernels.
>>>
>>> Stable-fix: Drop changes to verbs.h of the original fix,
>>>  that are not needed for the fix itself.
>>>
>>> Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
>>> Commit-id: ce88cef301b ("verbs: Do not block QP attr_masks used by older kernels")
>>> Reported-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Jason Gunthorpe <jgunthorpe-uk2M96/98Pc@public.gmane.org>
>>>
>> You need to add your Signed-off-by.
Yep. Will do when applying.

> And please add something like
>
>     commit 9276717b9e297a62d1151a43d1cd286213f68eb7 upstream.
>
> after the subject line for all patches ...

That's what the Commit-id is for :)
Do you prefer Upstream-commit-id ?

--
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] 5+ messages in thread

* Re: [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels
       [not found]             ` <0a24c63b-c108-3301-e78f-7e38d58f5bdb-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-14 18:58               ` Jason Gunthorpe
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2017-11-14 18:58 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin
  Cc: Leon Romanovsky, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Nov 14, 2017 at 07:50:45PM +0100, Nicolas Morey-Chaisemartin wrote:
> 
> 
> Le 14/11/2017 à 19:49, Jason Gunthorpe a écrit :
> > On Tue, Nov 14, 2017 at 08:04:51PM +0200, Leon Romanovsky wrote:
> >> On Tue, Nov 14, 2017 at 03:40:25PM +0100, Nicolas Morey-Chaisemartin wrote:
> >>> At least the RDMA CM in 4.3 will give user space structs with these bits
> >>> set. Those kernels require user space to pass those set bits back to the
> >>> kernel. Blocking them causes RDMA CM to be unusable on older kernels.
> >>>
> >>> Stable-fix: Drop changes to verbs.h of the original fix,
> >>>  that are not needed for the fix itself.
> >>>
> >>> Fixes: 3ca7a1031486 ("ibverbs: Add support for packet pacing")
> >>> Commit-id: ce88cef301b ("verbs: Do not block QP attr_masks used by older kernels")
> >>> Reported-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> >>> Signed-off-by: Jason Gunthorpe <jgunthorpe-uk2M96/98Pc@public.gmane.org>
> >>>
> >> You need to add your Signed-off-by.
> Yep. Will do when applying.
> 
> > And please add something like
> >
> >     commit 9276717b9e297a62d1151a43d1cd286213f68eb7 upstream.
> >
> > after the subject line for all patches ...
> 
> That's what the Commit-id is for :)
> Do you prefer Upstream-commit-id ?

Oh! Yes, that seems fine as is then

Jason


--
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] 5+ messages in thread

end of thread, other threads:[~2017-11-14 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 14:40 [PATCH rdma-core stable-v15] verbs: Do not block QP attr_masks used by older kernels Nicolas Morey-Chaisemartin
     [not found] ` <636b5412-e41e-40ed-46da-a0e83bd5b049-l3A5Bk7waGM@public.gmane.org>
2017-11-14 18:04   ` Leon Romanovsky
     [not found]     ` <20171114180451.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-14 18:49       ` Jason Gunthorpe
     [not found]         ` <20171114184912.GD4263-uk2M96/98Pc@public.gmane.org>
2017-11-14 18:50           ` Nicolas Morey-Chaisemartin
     [not found]             ` <0a24c63b-c108-3301-e78f-7e38d58f5bdb-l3A5Bk7waGM@public.gmane.org>
2017-11-14 18:58               ` Jason Gunthorpe

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.