sys/_types.h: avoid use of __has_feature()
Only fairly recent GCC versions support and sys/_types.h must work with
quite old compilers and without sys/cdef.h being included. The prior
workaround works fine, but we can have the same effect with compiler
macro definitions. In this specific case, compilers that define the
__intcap_t builtin type will define __SIZEOF_INTCAP__.
This reverts commit 029a09f18032353a9ae874590b879322efc6e53a
This reverts commit 19728f31ae421f40e2b0b0c775f4eedd7f927be0
Reviewed by: imp, des, kib, emaste
Effort: CHERI upstreaming
Fixes: 85ab981a8e4e ("sys/_types.h: define fallback __(u)intcap_t")
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D54009
iflib: remove convoluted custom zeroing code
Replace a collection of aliasing violations and ifdefs with memset
(which now expands to __builtin_memset and should be quite reliably
inlined.) The old code is hard to maintain as evidenced by the most
recent change to if_pkt_info_t updating the defines, but not the zeroing
code.
Reviewed by: gallatin, erj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Fixes: 43d7ee540efe ("iflib: support for transmit side nic KTLS offload")
Differential Revision: https://reviews.freebsd.org/D54605
cache: avoid hardcoded CACHE_PATH_CUTOFF
Compute the cutoff at compile time instead which will avoid the need
for a CHERI case.
Correct the comment about CACHE_PATH_CUTOFF. It dates to 5.2.0 not 4.4
BSD. Historic values are:
32 - introduced (c2935410f6d5f)
35 - NUL terminated and bumped (5d5c174869104)
39 - sized to alignment (bb48255cf5eff)
45 - bumped to improve efficency on 64-bit (3862838921eb8)
No functional change.
Reviewed by: markj
Suggested by: jhb
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D54554
cache: avoid hardcoded zone alignment
Previously, this was underaligned on CHERI system where pointers are
larger than time_t.
Use the alignment of struct namecache_ts which picks up time_t via strut
timespec and pointers via struct namecache. This arguably overaligns
cache_zone_small and cache_zone_large on i386 kernels, but I suspect the
actual microarchitectures most i386 binaries are run on do better with
64-bit alignment.
Reviewed by: olce, markj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Fixes: cf8ac0de8150 ("cache: reduce zone alignment to 8 bytes")
Differential Revision: https://reviews.freebsd.org/D54376
librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure
Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA
provider library.
This change:
-Registers libbnxtre in src.libnames.mk so it is built and installed as part
of the OFED libraries.
-Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled.
-Declares proper dependency mappings for bnxtre (ibverbs, pthread).
-Introduces LIBBNXTREDIR for consistent object directory handling.
-Updates libibverbs and librdmacm build rules to link against libbnxtre,
enabling Broadcom RoCE device support at runtime.
-libbnxtre library uses below constructor to register with the libibverbs,
static attribute((constructor)) void bnxt_re_register_driver(void)
These updates ensure that applications using libibverbs and librdmacm can
discover and use Broadcom bnxt RDMA devices on FreeBSD.
[4 lines not shown]
Revert "librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping"
The commit message has to be rewritten as it is not clear and lacks
some key details about the change.
This reverts commit 35dd53a9e13265f7a479649776453efc5b737a0f.
Reported by: jrtc27
devel/onetbb: Improve port
- Only build unit tests when requested to make overall build faster
- Adjust port Makefile to more closely follow Porters Handbook
- Remove USES= tar:tgz (incorrect)
- Replace USES= localbase with localbase:ldflags
- Use a separate section for USE_GITHUB
PR: 292088
bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN
The driver and applications currently use hard-coded numeric ioctl command
opcodes. These opcodes are interpreted as having the IOC_IN direction (data
copied from the user application to the driver), regardless of the actual packet
size. Consequently, when the packet size is zero and the direction is set to
IOC_IN, the kernel fails these ioctls if COMPAT is disabled.
While the driver and applications should ideally set the direction correctly—
for example, using IOC_VOID when the packet size is zero—the driver will now
be updated to define ioctl opcodes using the _IOC macro to support both
IOC_VOID and IOC_IN. This change ensures backward compatibility with older
applications that exclusively use IOC_IN.
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D54601
MFC after: 3 days
freebsd-base.7: Fix stray -r
Remote stray "-r" from the example of installing a toolchain
to alternate root.
Reviewed by: ivy
Differential Revision: https://reviews.freebsd.org/D54611
[NEW PORT] security/py-k5test: Library for setting up self-contained Kerberos 5 environments
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 278820