All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Nelio Laranjeiro
	<nelio.laranjeiro-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Adrien Mazarguil
	<adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>,
	yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] verbs: fix compilation error with ICC
Date: Wed, 4 Oct 2017 20:11:29 +0300	[thread overview]
Message-ID: <20171004171129.GG25829@mtr-leonro.local> (raw)
In-Reply-To: <1506434711-3828-1-git-send-email-nelio.laranjeiro-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

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

On Tue, Sep 26, 2017 at 04:05:11PM +0200, Nelio Laranjeiro wrote:
> Compiling a program including verbs.h with ICC fails with the following
> error (seen with DPDK):
>
>  /root/development/rdma-core/build/include/infiniband/verbs.h(84):
>  warning #61: integer operation result is out of range
>    static void *__VERBS_ABI_IS_EXTENDED = ((uint8_t *) NULL) - 1;
>
> Fixes: 6be16586e081 ("Infrastructure to support verbs extensions")
> Cc: yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> Acked-by: Adrien Mazarguil <adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> ---
>  libibverbs/verbs.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
> index 8cdf8ab..cc633a1 100644
> --- a/libibverbs/verbs.h
> +++ b/libibverbs/verbs.h
> @@ -42,6 +42,7 @@
>  #include <errno.h>
>  #include <string.h>
>  #include <linux/types.h>
> +#include <stdint.h>
>
>  #ifdef __cplusplus
>  #  define BEGIN_C_DECLS extern "C" {
> @@ -81,7 +82,7 @@ union ibv_gid {
>
>  #define vext_field_avail(type, fld, sz) (offsetof(type, fld) < (sz))
>
> -static void *__VERBS_ABI_IS_EXTENDED = ((uint8_t *) NULL) - 1;
> +static void *__VERBS_ABI_IS_EXTENDED = (void *)UINTPTR_MAX;
>

Nelio,

I applied the patch, but it broke C++ users of the rdma-core.
UINTPTR_MAX is declared in <cstdint> for C++ and not in stdint.h [1].

Please provide fix or we will be required to revert it prior next
release.

Thanks

[1] http://en.cppreference.com/w/cpp/header/cstdint


>  enum ibv_node_type {
>  	IBV_NODE_UNKNOWN	= -1,
> --
> 2.1.4
>
> --
> 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:[~2017-10-04 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 14:05 [PATCH] verbs: fix compilation error with ICC Nelio Laranjeiro
     [not found] ` <1506434711-3828-1-git-send-email-nelio.laranjeiro-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2017-09-28 14:02   ` Leon Romanovsky
2017-09-28 16:44   ` Jason Gunthorpe
2017-10-04 17:11   ` Leon Romanovsky [this message]

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=20171004171129.GG25829@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=adrien.mazarguil-pdR9zngts4EAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nelio.laranjeiro-pdR9zngts4EAvxtiuMwx3w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@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 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.