public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h
Date: Fri, 12 Jan 2018 08:34:33 +0200	[thread overview]
Message-ID: <20180112063433.GH15760@mtr-leonro.local> (raw)
In-Reply-To: <20180111221340.965-3-jgg-uk2M96/98Pc@public.gmane.org>

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

On Thu, Jan 11, 2018 at 03:13:25PM -0700, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> There are a few overlapping definitions that are identical in both
> headers, delete them from kern-abi.h to make them includable.
>
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  libibverbs/kern-abi.h | 62 ++++++---------------------------------------------
>  1 file changed, 7 insertions(+), 55 deletions(-)
>
> diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
> index f53e22fce5303b..d7acdaa9a4bca9 100644
> --- a/libibverbs/kern-abi.h
> +++ b/libibverbs/kern-abi.h
> @@ -37,9 +37,14 @@
>
>  #include <linux/types.h>
>
> +#include <rdma/ib_user_verbs.h>
> +
>  /*
> - * This file must be kept in sync with the kernel's version of
> - * drivers/infiniband/include/ib_user_verbs.h
> + * This file contains copied data from the kernel's include/uapi/rdma/ib_user_verbs.h,
> + * now included above.
> + *
> + * Whenever possible use the definition from the kernel header and avoid
> + * copying from that header into this file.
>   */
>
>  /*
> @@ -48,59 +53,6 @@
>  #define IB_USER_VERBS_MIN_ABI_VERSION	3
>  #define IB_USER_VERBS_MAX_ABI_VERSION	6
>
> -#define IB_USER_VERBS_CMD_THRESHOLD    50
> -
> -enum {
> -	IB_USER_VERBS_CMD_GET_CONTEXT,
> -	IB_USER_VERBS_CMD_QUERY_DEVICE,
> -	IB_USER_VERBS_CMD_QUERY_PORT,
> -	IB_USER_VERBS_CMD_ALLOC_PD,
> -	IB_USER_VERBS_CMD_DEALLOC_PD,
> -	IB_USER_VERBS_CMD_CREATE_AH,
> -	IB_USER_VERBS_CMD_MODIFY_AH,
> -	IB_USER_VERBS_CMD_QUERY_AH,
> -	IB_USER_VERBS_CMD_DESTROY_AH,
> -	IB_USER_VERBS_CMD_REG_MR,
> -	IB_USER_VERBS_CMD_REG_SMR,
> -	IB_USER_VERBS_CMD_REREG_MR,
> -	IB_USER_VERBS_CMD_QUERY_MR,
> -	IB_USER_VERBS_CMD_DEREG_MR,
> -	IB_USER_VERBS_CMD_ALLOC_MW,
> -	IB_USER_VERBS_CMD_BIND_MW,
> -	IB_USER_VERBS_CMD_DEALLOC_MW,
> -	IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
> -	IB_USER_VERBS_CMD_CREATE_CQ,
> -	IB_USER_VERBS_CMD_RESIZE_CQ,
> -	IB_USER_VERBS_CMD_DESTROY_CQ,
> -	IB_USER_VERBS_CMD_POLL_CQ,
> -	IB_USER_VERBS_CMD_PEEK_CQ,
> -	IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
> -	IB_USER_VERBS_CMD_CREATE_QP,
> -	IB_USER_VERBS_CMD_QUERY_QP,
> -	IB_USER_VERBS_CMD_MODIFY_QP,
> -	IB_USER_VERBS_CMD_DESTROY_QP,
> -	IB_USER_VERBS_CMD_POST_SEND,
> -	IB_USER_VERBS_CMD_POST_RECV,
> -	IB_USER_VERBS_CMD_ATTACH_MCAST,
> -	IB_USER_VERBS_CMD_DETACH_MCAST,
> -	IB_USER_VERBS_CMD_CREATE_SRQ,
> -	IB_USER_VERBS_CMD_MODIFY_SRQ,
> -	IB_USER_VERBS_CMD_QUERY_SRQ,
> -	IB_USER_VERBS_CMD_DESTROY_SRQ,
> -	IB_USER_VERBS_CMD_POST_SRQ_RECV,
> -	IB_USER_VERBS_CMD_OPEN_XRCD,
> -	IB_USER_VERBS_CMD_CLOSE_XRCD,
> -	IB_USER_VERBS_CMD_CREATE_XSRQ,
> -	IB_USER_VERBS_CMD_OPEN_QP
> -};
> -
> -#define IB_USER_VERBS_CMD_COMMAND_MASK		0xff
> -#define IB_USER_VERBS_CMD_FLAGS_MASK		0xff000000u
> -#define IB_USER_VERBS_CMD_FLAGS_SHIFT		24
> -
> -
> -#define IB_USER_VERBS_CMD_FLAG_EXTENDED		0x80ul

This define was added to kernel api (rdma/ib_user_verbs.h) in commit
f21519b23c1b ("IB/core: extended command: an improved infrastructure for uverbs commands")

It means that this proposed commit won't compile on the systems with
kernel dated before 2013. I don't think that it is real issue, but worth
to mention it in commit message/comment.

Thanks

> -
>  /* use this mask for creating extended commands */
>  #define IB_USER_VERBS_CMD_EXTENDED_MASK \
>  	(IB_USER_VERBS_CMD_FLAG_EXTENDED << \
> --
> 2.15.1
>
> --
> 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

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

  parent reply	other threads:[~2018-01-12  6:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 22:13 [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe
     [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-11 22:13   ` [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h Jason Gunthorpe
     [not found]     ` <20180111221340.965-2-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-15 17:01       ` Yishai Hadas
     [not found]         ` <fe2337a1-b02d-cc01-c55d-e6e493ec30ef-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-15 17:10           ` Jason Gunthorpe
     [not found]             ` <20180115171033.GA2206-uk2M96/98Pc@public.gmane.org>
2018-01-22 10:48               ` Yishai Hadas
     [not found]                 ` <c4ee82a7-f235-4370-cf64-d5c73a79bd1b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-22 15:42                   ` Jason Gunthorpe
     [not found]                     ` <20180122154206.GC14372-uk2M96/98Pc@public.gmane.org>
2018-01-22 15:56                       ` Yishai Hadas
2018-01-11 22:13   ` [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h Jason Gunthorpe
     [not found]     ` <20180111221340.965-3-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-12  6:34       ` Leon Romanovsky [this message]
     [not found]         ` <20180112063433.GH15760-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-12 16:28           ` Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 03/17] verbs: Delete extended command definitions from kern-abi.h Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 04/17] verbs: Remove unused structs Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 05/17] verbs: Remove kernel ABI v2 compat cruft Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 06/17] verbs: Add missing endian annotations to kern-abi.h Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs Jason Gunthorpe
     [not found]     ` <20180111221340.965-8-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-15 16:48       ` Yishai Hadas
     [not found]         ` <2f04c4d8-bc14-9293-2e03-b29074e08637-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-15 17:01           ` Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 09/17] verbs: Use kernel uapi header for ibv_query_device_resp_ex Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 10/17] verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 11/17] verbs: Use kernel uapi header for ibv_create_ah_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 12/17] verbs: Use kernel uapi header for ibv_kern_send_wr Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 13/17] verbs: Use kernel uapi header for IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 14/17] verbs: Use kernel uapi header for flow steering types Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 17/17] verbs: Tidy up the remaining structs in kern-abi.h Jason Gunthorpe
2018-01-22 17:37   ` [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180112063433.GH15760@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgg-uk2M96/98Pc@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox