1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
freebsd/contrib/ofed
Stefan Eßer e2650af157 Make CPU_SET macros compliant with other implementations
The introduction of <sched.h> improved compatibility with some 3rd
party software, but caused the configure scripts of some ports to
assume that they were run in a GLIBC compatible environment.

Parts of sched.h were made conditional on -D_WITH_CPU_SET_T being
added to ports, but there still were compatibility issues due to
invalid assumptions made in autoconfigure scripts.

The differences between the FreeBSD version of macros like CPU_AND,
CPU_OR, etc. and the GLIBC versions was in the number of arguments:
FreeBSD used a 2-address scheme (one source argument is also used as
the destination of the operation), while GLIBC uses a 3-adderess
scheme (2 source operands and a separately passed destination).

The GLIBC scheme provides a super-set of the functionality of the
FreeBSD macros, since it does not prevent passing the same variable
as source and destination arguments. In code that wanted to preserve
both source arguments, the FreeBSD macros required a temporary copy of
one of the source arguments.

This patch set allows to unconditionally provide functions and macros
expected by 3rd party software written for GLIBC based systems, but
breaks builds of externally maintained sources that use any of the
following macros: CPU_AND, CPU_ANDNOT, CPU_OR, CPU_XOR.

One contributed driver (contrib/ofed/libmlx5) has been patched to
support both the old and the new CPU_OR signatures. If this commit
is merged to -STABLE, the version test will have to be extended to
cover more ranges.

Ports that have added -D_WITH_CPU_SET_T to build on -CURRENT do
no longer require that option.

The FreeBSD version has been bumped to 1400046 to reflect this
incompatible change.

Reviewed by:	kib
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33451
2021-12-30 12:20:32 +01:00
..
include Add udma_barrier definitions for RISC-V 2018-07-22 22:35:17 +00:00
infiniband-diags ibstat: Include prototype for sysctlbyname(). 2021-05-27 09:42:30 +02:00
libcxgb4 libcxgb4: Don't spam stderr. Write combining is not enabled by default 2019-02-27 06:50:24 +00:00
libibcm Rework ofed build. 2018-06-16 15:05:05 +00:00
libibmad Rework ofed build. 2018-06-16 15:05:05 +00:00
libibnetdisc Rework ofed build. 2018-06-16 15:05:05 +00:00
libibumad Fix Coverity issues in OFED 2020-07-15 13:17:16 +00:00
libibverbs Fix style in r363220 2020-07-15 13:26:15 +00:00
libmlx4 Rework ofed build. 2018-06-16 15:05:05 +00:00
libmlx5 Make CPU_SET macros compliant with other implementations 2021-12-30 12:20:32 +01:00
librdmacm Fix Coverity issues in OFED 2020-07-15 13:17:16 +00:00
opensm opensm: Fix a possible dereference of a NULL pointer 2020-08-31 15:26:01 +00:00