linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next v1 0/2] UAPI cleanup and fix to cxgb3 removal
@ 2019-10-15  7:54 Leon Romanovsky
  2019-10-15  7:54 ` [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id Leon Romanovsky
  2019-10-15  7:54 ` [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h Leon Romanovsky
  0 siblings, 2 replies; 5+ messages in thread
From: Leon Romanovsky @ 2019-10-15  7:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Potnuri Bharat Teja, Yishai Hadas

From: Leon Romanovsky <leonro@mellanox.com>

Chagelog:
 v0->v1: https://lore.kernel.org/linux-rdma/20191010192053.GD11569@mellanox.com
 * Split one patch to two.
 * Added RDMA_DRIVER_CXGB3 back instead of mangling with rdma_driver_id.

Thanks

Yishai Hadas (2):
  RDMA/uapi: Fix and re-organize the usage of rdma_driver_id
  RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on
    ib_user_verbs.h

 include/uapi/rdma/ib_user_ioctl_verbs.h  | 48 +++++++++++++++++++++++-
 include/uapi/rdma/ib_user_verbs.h        | 25 ------------
 include/uapi/rdma/rdma_user_ioctl_cmds.h | 21 -----------
 3 files changed, 47 insertions(+), 47 deletions(-)

--
2.20.1


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

* [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id
  2019-10-15  7:54 [PATCH rdma-next v1 0/2] UAPI cleanup and fix to cxgb3 removal Leon Romanovsky
@ 2019-10-15  7:54 ` Leon Romanovsky
  2019-10-17 19:42   ` Doug Ledford
  2019-10-15  7:54 ` [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h Leon Romanovsky
  1 sibling, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2019-10-15  7:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Potnuri Bharat Teja, Yishai Hadas

From: Yishai Hadas <yishaih@mellanox.com>

Fix 'enum rdma_driver_id' to preserve other driver values before that
RDMA_DRIVER_CXGB3 was deleted. As this value is UAPI we can't affect
other values as of a deletion of one driver id.

Fixes: 30e0f6cf5acb ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 include/uapi/rdma/ib_user_ioctl_verbs.h  | 22 ++++++++++++++++++++++
 include/uapi/rdma/rdma_user_ioctl_cmds.h | 21 ---------------------
 2 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h
index 72c7fc75f960..9019b2d906ea 100644
--- a/include/uapi/rdma/ib_user_ioctl_verbs.h
+++ b/include/uapi/rdma/ib_user_ioctl_verbs.h
@@ -173,4 +173,26 @@ struct ib_uverbs_query_port_resp_ex {
 	__u8  reserved[6];
 };
 
+enum rdma_driver_id {
+	RDMA_DRIVER_UNKNOWN,
+	RDMA_DRIVER_MLX5,
+	RDMA_DRIVER_MLX4,
+	RDMA_DRIVER_CXGB3,
+	RDMA_DRIVER_CXGB4,
+	RDMA_DRIVER_MTHCA,
+	RDMA_DRIVER_BNXT_RE,
+	RDMA_DRIVER_OCRDMA,
+	RDMA_DRIVER_NES,
+	RDMA_DRIVER_I40IW,
+	RDMA_DRIVER_VMW_PVRDMA,
+	RDMA_DRIVER_QEDR,
+	RDMA_DRIVER_HNS,
+	RDMA_DRIVER_USNIC,
+	RDMA_DRIVER_RXE,
+	RDMA_DRIVER_HFI1,
+	RDMA_DRIVER_QIB,
+	RDMA_DRIVER_EFA,
+	RDMA_DRIVER_SIW,
+};
+
 #endif
diff --git a/include/uapi/rdma/rdma_user_ioctl_cmds.h b/include/uapi/rdma/rdma_user_ioctl_cmds.h
index b2680051047a..7b1ec806f8f9 100644
--- a/include/uapi/rdma/rdma_user_ioctl_cmds.h
+++ b/include/uapi/rdma/rdma_user_ioctl_cmds.h
@@ -84,25 +84,4 @@ struct ib_uverbs_ioctl_hdr {
 	struct ib_uverbs_attr  attrs[0];
 };
 
-enum rdma_driver_id {
-	RDMA_DRIVER_UNKNOWN,
-	RDMA_DRIVER_MLX5,
-	RDMA_DRIVER_MLX4,
-	RDMA_DRIVER_CXGB4,
-	RDMA_DRIVER_MTHCA,
-	RDMA_DRIVER_BNXT_RE,
-	RDMA_DRIVER_OCRDMA,
-	RDMA_DRIVER_NES,
-	RDMA_DRIVER_I40IW,
-	RDMA_DRIVER_VMW_PVRDMA,
-	RDMA_DRIVER_QEDR,
-	RDMA_DRIVER_HNS,
-	RDMA_DRIVER_USNIC,
-	RDMA_DRIVER_RXE,
-	RDMA_DRIVER_HFI1,
-	RDMA_DRIVER_QIB,
-	RDMA_DRIVER_EFA,
-	RDMA_DRIVER_SIW,
-};
-
 #endif
-- 
2.20.1


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

* [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h
  2019-10-15  7:54 [PATCH rdma-next v1 0/2] UAPI cleanup and fix to cxgb3 removal Leon Romanovsky
  2019-10-15  7:54 ` [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id Leon Romanovsky
@ 2019-10-15  7:54 ` Leon Romanovsky
  2019-10-15 18:22   ` Jason Gunthorpe
  1 sibling, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2019-10-15  7:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Potnuri Bharat Teja, Yishai Hadas

From: Yishai Hadas <yishaih@mellanox.com>

Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h which
is not really required.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 include/uapi/rdma/ib_user_ioctl_verbs.h | 26 ++++++++++++++++++++++++-
 include/uapi/rdma/ib_user_verbs.h       | 25 ------------------------
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h
index 9019b2d906ea..8bdfdd4ef8b5 100644
--- a/include/uapi/rdma/ib_user_ioctl_verbs.h
+++ b/include/uapi/rdma/ib_user_ioctl_verbs.h
@@ -35,7 +35,6 @@
 #define IB_USER_IOCTL_VERBS_H
 
 #include <linux/types.h>
-#include <rdma/ib_user_verbs.h>
 
 #ifndef RDMA_UAPI_PTR
 #define RDMA_UAPI_PTR(_type, _name)	__aligned_u64 _name
@@ -167,6 +166,31 @@ enum ib_uverbs_advise_mr_flag {
 	IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0,
 };
 
+struct ib_uverbs_query_port_resp {
+	__u32 port_cap_flags;		/* see ib_uverbs_query_port_cap_flags */
+	__u32 max_msg_sz;
+	__u32 bad_pkey_cntr;
+	__u32 qkey_viol_cntr;
+	__u32 gid_tbl_len;
+	__u16 pkey_tbl_len;
+	__u16 lid;
+	__u16 sm_lid;
+	__u8  state;
+	__u8  max_mtu;
+	__u8  active_mtu;
+	__u8  lmc;
+	__u8  max_vl_num;
+	__u8  sm_sl;
+	__u8  subnet_timeout;
+	__u8  init_type_reply;
+	__u8  active_width;
+	__u8  active_speed;
+	__u8  phys_state;
+	__u8  link_layer;
+	__u8  flags;			/* see ib_uverbs_query_port_flags */
+	__u8  reserved;
+};
+
 struct ib_uverbs_query_port_resp_ex {
 	struct ib_uverbs_query_port_resp legacy_resp;
 	__u16 port_cap_flags2;
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 0474c7400268..37450f133a07 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -281,31 +281,6 @@ struct ib_uverbs_query_port {
 	__aligned_u64 driver_data[0];
 };
 
-struct ib_uverbs_query_port_resp {
-	__u32 port_cap_flags;		/* see ib_uverbs_query_port_cap_flags */
-	__u32 max_msg_sz;
-	__u32 bad_pkey_cntr;
-	__u32 qkey_viol_cntr;
-	__u32 gid_tbl_len;
-	__u16 pkey_tbl_len;
-	__u16 lid;
-	__u16 sm_lid;
-	__u8  state;
-	__u8  max_mtu;
-	__u8  active_mtu;
-	__u8  lmc;
-	__u8  max_vl_num;
-	__u8  sm_sl;
-	__u8  subnet_timeout;
-	__u8  init_type_reply;
-	__u8  active_width;
-	__u8  active_speed;
-	__u8  phys_state;
-	__u8  link_layer;
-	__u8  flags;			/* see ib_uverbs_query_port_flags */
-	__u8  reserved;
-};
-
 struct ib_uverbs_alloc_pd {
 	__aligned_u64 response;
 	__aligned_u64 driver_data[0];
-- 
2.20.1


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

* Re: [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h
  2019-10-15  7:54 ` [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h Leon Romanovsky
@ 2019-10-15 18:22   ` Jason Gunthorpe
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2019-10-15 18:22 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Leon Romanovsky, RDMA mailing list,
	Potnuri Bharat Teja, Yishai Hadas

On Tue, Oct 15, 2019 at 10:54:19AM +0300, Leon Romanovsky wrote:
> From: Yishai Hadas <yishaih@mellanox.com>
> 
> Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h which
> is not really required.
> 
> Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
>  include/uapi/rdma/ib_user_ioctl_verbs.h | 26 ++++++++++++++++++++++++-
>  include/uapi/rdma/ib_user_verbs.h       | 25 ------------------------
>  2 files changed, 25 insertions(+), 26 deletions(-)
> 
> diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h
> index 9019b2d906ea..8bdfdd4ef8b5 100644
> +++ b/include/uapi/rdma/ib_user_ioctl_verbs.h
> @@ -35,7 +35,6 @@
>  #define IB_USER_IOCTL_VERBS_H
>  
>  #include <linux/types.h>
> -#include <rdma/ib_user_verbs.h>
>  
>  #ifndef RDMA_UAPI_PTR
>  #define RDMA_UAPI_PTR(_type, _name)	__aligned_u64 _name
> @@ -167,6 +166,31 @@ enum ib_uverbs_advise_mr_flag {
>  	IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0,
>  };
>  
> +struct ib_uverbs_query_port_resp {
> +	__u32 port_cap_flags;		/* see ib_uverbs_query_port_cap_flags */
> +	__u32 max_msg_sz;
> +	__u32 bad_pkey_cntr;
> +	__u32 qkey_viol_cntr;
> +	__u32 gid_tbl_len;
> +	__u16 pkey_tbl_len;
> +	__u16 lid;
> +	__u16 sm_lid;
> +	__u8  state;
> +	__u8  max_mtu;
> +	__u8  active_mtu;
> +	__u8  lmc;
> +	__u8  max_vl_num;
> +	__u8  sm_sl;
> +	__u8  subnet_timeout;
> +	__u8  init_type_reply;
> +	__u8  active_width;
> +	__u8  active_speed;
> +	__u8  phys_state;
> +	__u8  link_layer;
> +	__u8  flags;			/* see ib_uverbs_query_port_flags */
> +	__u8  reserved;
> +};

Still don't understand why this is being moved here, not  this one:

>  struct ib_uverbs_query_port_resp_ex {
>  	struct ib_uverbs_query_port_resp legacy_resp;
>  	__u16 port_cap_flags2;

Moved to its proper place

Neither of these belong in this header

Jason

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

* Re: [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id
  2019-10-15  7:54 ` [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id Leon Romanovsky
@ 2019-10-17 19:42   ` Doug Ledford
  0 siblings, 0 replies; 5+ messages in thread
From: Doug Ledford @ 2019-10-17 19:42 UTC (permalink / raw)
  To: Leon Romanovsky, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Potnuri Bharat Teja, Yishai Hadas

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

On Tue, 2019-10-15 at 10:54 +0300, Leon Romanovsky wrote:
> From: Yishai Hadas <yishaih@mellanox.com>
> 
> Fix 'enum rdma_driver_id' to preserve other driver values before that
> RDMA_DRIVER_CXGB3 was deleted. As this value is UAPI we can't affect
> other values as of a deletion of one driver id.
> 
> Fixes: 30e0f6cf5acb ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from
> kernel")
> Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>

Thanks, applied to for-next.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2019-10-17 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15  7:54 [PATCH rdma-next v1 0/2] UAPI cleanup and fix to cxgb3 removal Leon Romanovsky
2019-10-15  7:54 ` [PATCH rdma-next v1 1/2] RDMA/uapi: Fix and re-organize the usage of rdma_driver_id Leon Romanovsky
2019-10-17 19:42   ` Doug Ledford
2019-10-15  7:54 ` [PATCH rdma-next v1 2/2] RDMA/uapi: Drop the dependency of ib_user_ioctl_verbs.h on ib_user_verbs.h Leon Romanovsky
2019-10-15 18:22   ` Jason Gunthorpe

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).