libnetmap: reset errno in nmreq_register_decode()The reset is necessary at the beginning of the function, because ofthe errno logic in the error path (set errno to EINVAL if not set).If errno is
libnetmap: reset errno in nmreq_register_decode()The reset is necessary at the beginning of the function, because ofthe errno logic in the error path (set errno to EINVAL if not set).If errno is already set when calling the function, and the functionfails, the previous errno value will be inherited.(cherry picked from commit ab639bb2873034786cd2ec4d2d9c4489fbf6f424)
show more ...
[libnetmap] Fix 32 bit compilation under gcc-6.4Use uintptr_t to cast a uint64_t to a pointer type.Yeah, it isn't technically correct for platforms with pointers> 64 bits, but it's fine here.Th
[libnetmap] Fix 32 bit compilation under gcc-6.4Use uintptr_t to cast a uint64_t to a pointer type.Yeah, it isn't technically correct for platforms with pointers> 64 bits, but it's fine here.This fixes 32 bit compat library builds on amd64 and alsomips32 builds.Reviewed by: impDifferential Revision: https://reviews.freebsd.org/D26790
libnetmap: fix cast from uint64_t to void*We use uintptr_t as an intermediate cast to avoid compilerwarnings on 32 bit architectures.Reported by: adrianMFC after: 3 days
lib: libnetmap: add missing copyright headersMFC after: 2 weeks
lib: add libnetmapThis changeset introduces the new libnetmap library for writingnetmap applications.Before libnetmap, applications could either use the kernel APIdirectly (e.g. NIOCREGIF/NIOCCT
lib: add libnetmapThis changeset introduces the new libnetmap library for writingnetmap applications.Before libnetmap, applications could either use the kernel APIdirectly (e.g. NIOCREGIF/NIOCCTRL) or the simple header-only-librarynetmap_user.h (e.g. nm_open(), nm_close(), nm_mmap() etc.)The new library offers more functionalities than netmap_user.h: - Support for complex netmap options, such as external memory allocators or per-buffer offsets. This opens the way to future extensions. - More flexibility in the netmap port bind options, such as non-numeric names for pipes, or the ability to specify the netmap allocator that must be used for a given port. - Automatic tracking of the netmap memory regions in use across the open ports.At the moment there is no man page, but the libnetmap.h header filehas in-depth documentation.Reviewed by: hrsMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D26171