linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/core: Fix compatibility between driver and rdma-core
@ 2019-10-16 10:17 Michal Kalderon
  2019-10-16 15:39 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Kalderon @ 2019-10-16 10:17 UTC (permalink / raw)
  To: michal.kalderon, ariel.elior, bharat, dledford, jgg; +Cc: linux-rdma

Commit 30e0f6cf5acb39 ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel")
deleted one of the entries in the rdma_driver_id enum. This
caused a mismatch between the driver-id of some drivers and rdma-core.

ib_uverbs_cmd_verbs: if (unlikely(hdr->driver_id != uapi->driver_id)

Added the entry back as deprecated to maintain compatibility between old/new
rdma-core and driver. For the same reason, entry should not be removed from
rdma-core, but modified to deprecated when cxgb3 is removed from rdma-core.

Fixes: 30e0f6cf5acb39 ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel")
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
---
 include/uapi/rdma/rdma_user_ioctl_cmds.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/rdma/rdma_user_ioctl_cmds.h b/include/uapi/rdma/rdma_user_ioctl_cmds.h
index b2680051047a..07152a49374d 100644
--- a/include/uapi/rdma/rdma_user_ioctl_cmds.h
+++ b/include/uapi/rdma/rdma_user_ioctl_cmds.h
@@ -88,6 +88,7 @@ enum rdma_driver_id {
 	RDMA_DRIVER_UNKNOWN,
 	RDMA_DRIVER_MLX5,
 	RDMA_DRIVER_MLX4,
+	RDMA_DRIVER_CXGB3_DEPRECATED,
 	RDMA_DRIVER_CXGB4,
 	RDMA_DRIVER_MTHCA,
 	RDMA_DRIVER_BNXT_RE,
-- 
2.14.5


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

* Re: [PATCH] RDMA/core: Fix compatibility between driver and rdma-core
  2019-10-16 10:17 [PATCH] RDMA/core: Fix compatibility between driver and rdma-core Michal Kalderon
@ 2019-10-16 15:39 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2019-10-16 15:39 UTC (permalink / raw)
  To: Michal Kalderon; +Cc: ariel.elior, bharat, dledford, jgg, linux-rdma

On Wed, Oct 16, 2019 at 01:17:23PM +0300, Michal Kalderon wrote:
> Commit 30e0f6cf5acb39 ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel")
> deleted one of the entries in the rdma_driver_id enum. This
> caused a mismatch between the driver-id of some drivers and rdma-core.
>
> ib_uverbs_cmd_verbs: if (unlikely(hdr->driver_id != uapi->driver_id)
>
> Added the entry back as deprecated to maintain compatibility between old/new
> rdma-core and driver. For the same reason, entry should not be removed from
> rdma-core, but modified to deprecated when cxgb3 is removed from rdma-core.
>
> Fixes: 30e0f6cf5acb39 ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel")
> Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
> ---
>  include/uapi/rdma/rdma_user_ioctl_cmds.h | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
https://lore.kernel.org/linux-rdma/20191015075419.18185-2-leon@kernel.org

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

end of thread, other threads:[~2019-10-16 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 10:17 [PATCH] RDMA/core: Fix compatibility between driver and rdma-core Michal Kalderon
2019-10-16 15:39 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).