From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h
Date: Sun, 12 Feb 2017 11:05:31 +0200 [thread overview]
Message-ID: <20170212090531.GC14015@mtr-leonro.local> (raw)
In-Reply-To: <1486677212-3188-11-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3388 bytes --]
On Thu, Feb 09, 2017 at 02:53:32PM -0700, Jason Gunthorpe wrote:
> There is a bit of software out there that includes arch.h to get the
> swap macros. Continue to provider a header that serves that purpose
> but emit warnings when it is used.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
> libibverbs/CMakeLists.txt | 1 +
> libibverbs/arch.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 52 insertions(+)
> create mode 100644 libibverbs/arch.h
>
> diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt
> index 7e18a1e3e71d5e..7a52eddc810911 100644
> --- a/libibverbs/CMakeLists.txt
> +++ b/libibverbs/CMakeLists.txt
> @@ -1,4 +1,5 @@
> publish_headers(infiniband
> + arch.h
> kern-abi.h
> opcode.h
> sa-kern-abi.h
> diff --git a/libibverbs/arch.h b/libibverbs/arch.h
> new file mode 100644
> index 00000000000000..bcbece8f2c521c
> --- /dev/null
> +++ b/libibverbs/arch.h
> @@ -0,0 +1,51 @@
> +/*
> + * This software is available to you under a choice of one of two
> + * licenses. You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available from the file
> + * COPYING in the main directory of this source tree, or the
> + * OpenIB.org BSD license below:
> + *
> + * Redistribution and use in source and binary forms, with or
> + * without modification, are permitted provided that the following
> + * conditions are met:
> + *
> + * - Redistributions of source code must retain the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer.
> + *
> + * - Redistributions in binary form must reproduce the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer in the documentation and/or other materials
> + * provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + */
> +
> +#ifndef INFINIBAND_ARCH_H
> +#define INFINIBAND_ARCH_H
> +
> +#include <stdint.h>
> +#include <endian.h>
> +
> +#warning "This header is obsolete."
> +
> +#ifndef ntohll
> +#undef htonll
> +#undef ntohll
> +/* Users should use the glibc functions directly, not these wrappers */
> +static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
> +static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
> +#define htonll htonll
> +#define ntohll ntohll
> +#endif
> +
> +/* Barrier macros are no longer provided by libibverbs */
> +
> +#endif /* INFINIBAND_ARCH_H */
Is it possible to drop this file anyway?
> --
> 2.7.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 --]
next prev parent reply other threads:[~2017-02-12 9:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 21:53 [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Jason Gunthorpe
[not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 21:53 ` [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone Jason Gunthorpe
[not found] ` <1486677212-3188-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-12 8:48 ` Leon Romanovsky
2017-02-09 21:53 ` [PATCH rdma-core 02/10] Remove uses of htonll Jason Gunthorpe
[not found] ` <1486677212-3188-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:23 ` Steve Wise
2017-02-12 8:26 ` Amrani, Ram
2017-02-09 21:53 ` [PATCH rdma-core 03/10] Remove uses of ntohll Jason Gunthorpe
[not found] ` <1486677212-3188-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:24 ` Steve Wise
2017-02-09 21:53 ` [PATCH rdma-core 04/10] Do not use kernel byteswap macros Jason Gunthorpe
[not found] ` <1486677212-3188-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:23 ` Steve Wise
2017-02-09 21:53 ` [PATCH rdma-core 05/10] Remove extraneous byteswap.h include Jason Gunthorpe
2017-02-09 21:53 ` [PATCH rdma-core 06/10] mlx4: Remove include of asm/unistd.h Jason Gunthorpe
2017-02-09 21:53 ` [PATCH rdma-core 07/10] rdmacm: Remove dangling cpu_to_be64 definitions Jason Gunthorpe
2017-02-09 21:53 ` [PATCH rdma-core 08/10] umad: Replace htonll macros with proper inlines and mark deprecated Jason Gunthorpe
2017-02-09 21:53 ` [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h Jason Gunthorpe
[not found] ` <1486677212-3188-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:25 ` Steve Wise
2017-02-12 8:28 ` Amrani, Ram
2017-02-09 21:53 ` [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h Jason Gunthorpe
[not found] ` <1486677212-3188-11-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-12 9:05 ` Leon Romanovsky [this message]
[not found] ` <20170212090531.GC14015-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-02-13 16:39 ` Jason Gunthorpe
[not found] ` <20170213163910.GA25430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-13 18:17 ` Leon Romanovsky
2017-02-15 5:15 ` [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Leon Romanovsky
[not found] ` <20170215051511.GK6989-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-02-15 13:51 ` Talat mellanox
[not found] ` <CAB1oGZeJNvwwcii+z7VYQzZK3LJcToZ4uRF=_waA6WAboJueCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-15 18:55 ` 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=20170212090531.GC14015@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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 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.