Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Upstream commit 29bb8f07da9110fa167b55e5013de80adfd1e99b redefined those two functions. It break OPA-FF compiling. One of those duplicated functions should be removed.
------------------------------------------------------------
gcc -pipe -DTARGET_CPU_FAMILY_X86 -Wall -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector -DLINUX -Dlinux -D__LINUX__ -DPRODUCT=OPENIB_FF -DPRODUCT_OPENIB_FF -DMODULEVERSION=10.3.1.0.7 -DIB_STACK_OPENIB -fpic -g -I. -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release/iba -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release/iba/public -I/usr/include/infiniband -I/usr/include -c src/dsap_scan_fabric.c -o build.OPENIB_FF.release/src/dsap_scan_fabric.o
In file included from src/dsap_scan_fabric.c:34:0:
/usr/include/infiniband/umad.h:237:52: error: redefinition of 'htonll'
static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
^
In file included from src/dsap_scan_fabric.c:33:0:
/usr/include/infiniband/mad.h:1671:24: note: previous definition of 'htonll' was here
static inline uint64_t htonll(uint64_t x)
^
In file included from src/dsap_scan_fabric.c:34:0:
/usr/include/infiniband/umad.h:238:52: error: redefinition of 'ntohll'
static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
^
In file included from src/dsap_scan_fabric.c:33:0:
/usr/include/infiniband/mad.h:1665:24: note: previous definition of 'ntohll' was here
static inline uint64_t ntohll(uint64_t x)
^
src/dsap_scan_fabric.c: In function 'dsap_publish_paths':
src/dsap_scan_fabric.c:315:5: warning: 'ntohll' is deprecated (declared at /usr/include/infiniband/umad.h:238) [-Wdeprecated-declarations]
------------------------------------------------------------
Version-Release number of selected component (if applicable):
libibmad-devel-1.3.12-1.el7.x86_64
rdma-core-devel-13-5.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
rdma-core (master)]$ git remote -v
origin https://github.com/linux-rdma/rdma-core.git (fetch)
origin https://github.com/linux-rdma/rdma-core.git (push)
rdma-core (master)]$ git show 29bb8f07da911
commit 29bb8f07da9110fa167b55e5013de80adfd1e99b
Author: Jason Gunthorpe <jgunthorpe>
Date: Thu Feb 9 13:14:36 2017 -0700
umad: Replace htonll macros with proper inlines and mark deprecated
This allowed code using these public definitions to continue to compile
but will get warnings from gcc. Users should move to glibc's endian.h
We want to avoid new users of these macros in our tree.
Signed-off-by: Jason Gunthorpe <jgunthorpe>
diff --git a/libibumad/umad.h b/libibumad/umad.h
index d574d5d..ee8605d 100644
--- a/libibumad/umad.h
+++ b/libibumad/umad.h
@@ -229,14 +229,13 @@ static inline void umad_free(void *umad)
}
#ifndef ntohll
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- #define ntohll(x) bswap_64(x)
- #elif __BYTE_ORDER == __BIG_ENDIAN
- #define ntohll(x) x
- #endif
-#endif
-#ifndef htonll
- #define htonll 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
END_C_DECLS
I'm not so sure this is rdma-core's bug. What is providing /usr/include/infiniband/mad.h that has the other definition? Looks like it's coming from libibmad-devel, and that's probably where it needs to be removed. Would have to ask upstream to be sure, but it looks like the intention of the rdma-core change was to force people to use glibc's definitions instead of these extra ones.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2017:2011
Description of problem: Upstream commit 29bb8f07da9110fa167b55e5013de80adfd1e99b redefined those two functions. It break OPA-FF compiling. One of those duplicated functions should be removed. ------------------------------------------------------------ gcc -pipe -DTARGET_CPU_FAMILY_X86 -Wall -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector -DLINUX -Dlinux -D__LINUX__ -DPRODUCT=OPENIB_FF -DPRODUCT_OPENIB_FF -DMODULEVERSION=10.3.1.0.7 -DIB_STACK_OPENIB -fpic -g -I. -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release/iba -I/home/test/rpmbuild/BUILD/opa-ff-10.3.1.0-8/builtinclude.OPENIB_FF.release/iba/public -I/usr/include/infiniband -I/usr/include -c src/dsap_scan_fabric.c -o build.OPENIB_FF.release/src/dsap_scan_fabric.o In file included from src/dsap_scan_fabric.c:34:0: /usr/include/infiniband/umad.h:237:52: error: redefinition of 'htonll' static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); } ^ In file included from src/dsap_scan_fabric.c:33:0: /usr/include/infiniband/mad.h:1671:24: note: previous definition of 'htonll' was here static inline uint64_t htonll(uint64_t x) ^ In file included from src/dsap_scan_fabric.c:34:0: /usr/include/infiniband/umad.h:238:52: error: redefinition of 'ntohll' static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); } ^ In file included from src/dsap_scan_fabric.c:33:0: /usr/include/infiniband/mad.h:1665:24: note: previous definition of 'ntohll' was here static inline uint64_t ntohll(uint64_t x) ^ src/dsap_scan_fabric.c: In function 'dsap_publish_paths': src/dsap_scan_fabric.c:315:5: warning: 'ntohll' is deprecated (declared at /usr/include/infiniband/umad.h:238) [-Wdeprecated-declarations] ------------------------------------------------------------ Version-Release number of selected component (if applicable): libibmad-devel-1.3.12-1.el7.x86_64 rdma-core-devel-13-5.el7.x86_64 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: rdma-core (master)]$ git remote -v origin https://github.com/linux-rdma/rdma-core.git (fetch) origin https://github.com/linux-rdma/rdma-core.git (push) rdma-core (master)]$ git show 29bb8f07da911 commit 29bb8f07da9110fa167b55e5013de80adfd1e99b Author: Jason Gunthorpe <jgunthorpe> Date: Thu Feb 9 13:14:36 2017 -0700 umad: Replace htonll macros with proper inlines and mark deprecated This allowed code using these public definitions to continue to compile but will get warnings from gcc. Users should move to glibc's endian.h We want to avoid new users of these macros in our tree. Signed-off-by: Jason Gunthorpe <jgunthorpe> diff --git a/libibumad/umad.h b/libibumad/umad.h index d574d5d..ee8605d 100644 --- a/libibumad/umad.h +++ b/libibumad/umad.h @@ -229,14 +229,13 @@ static inline void umad_free(void *umad) } #ifndef ntohll - #if __BYTE_ORDER == __LITTLE_ENDIAN - #define ntohll(x) bswap_64(x) - #elif __BYTE_ORDER == __BIG_ENDIAN - #define ntohll(x) x - #endif -#endif -#ifndef htonll - #define htonll 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 END_C_DECLS