[PATCH 1/4] Remove copyinfrom() and copyinstrfrom().

2022-07-07 Thread Sebastian Huber
From: John Baldwin These functions were added in 2001 and are currently unused. copyinfrom() looks to have never been used. copyinstrfrom() was used for two weeks before the code was refactored to remove it's sole use. Reviewed by:brooks, kib Obtained from: CheriBSD Sponsored by: DARPA

[PATCH 3/4] Use network epoch to protect local IPv4 addresses hash.

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff The modification to the hash are already naturally locked by in_control_sx. Convert the hash lists to CK lists. Remove the in_ifaddr_rmlock. Assert the network epoch where necessary. Most cases when the hash lookup is done the epoch is already entered. Cover a few cases,

[newlib 65/65] libc/syslog: fully deprecate and don't try to open "/dev/log"

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff The "/dev/log" socket existed in pre-FreeBSD times. Later it was substituted to a compatibility symlink. The symlink creation was deprecated in FreeBSD 10.2 and 9-STABLE. Reviewed by:markj Differential revision: https://reviews.freebsd.org/D35304 ---

[newlib 24/65] shm_open2: Implement SHM_GROW_ON_WRITE

2022-07-07 Thread Sebastian Huber
From: Kyle Evans Lack of SHM_GROW_ON_WRITE is actively breaking Python's memfd_create tests, so go ahead and implement it. A future change will make memfd_create always set SHM_GROW_ON_WRITE, to match Linux behavior and unbreak Python's tests on -CURRENT. Reviewed by:kib Differential

[newlib 56/65] socket: Implement SO_RERROR

2022-07-07 Thread Sebastian Huber
From: Roy Marples SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not

[newlib 59/65] tcp: socket option to get stack alias name

2022-07-07 Thread Sebastian Huber
From: Peter Lei TCP stack sysctl nodes are currently inserted using the stack name alias. Allow the user to get the current stack's alias to allow for programatic sysctl access. Obtained from: Netflix --- newlib/libc/sys/rtems/include/netinet/tcp.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 0/4] Update FreeBSD baseline

2022-07-07 Thread Sebastian Huber
This patch set updates the header files imported from FreeBSD to the current FreeBSD head: commit 3bf66365129a13933f77d1f4421d5136861cffb4 Author: Brooks Davis Date: Wed Jul 6 14:03:48 2022 +0100 cddl/*: add a WITH(OUT)_DTRACE option Add an option to enable/disable DTrace without

[newlib 17/65] Although most of the NIC drivers are epoch ready,

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff due to peer pressure switch over to opt-in instead of opt-out for epoch. Instead of IFF_NEEDSEPOCH, provide IFF_KNOWSEPOCH. If driver marks itself with IFF_KNOWSEPOCH, then ether_input() would not enter epoch when processing its packets. Now this will create recursive

[PATCH 2/4] routing: fix source address selection rules for IPv4 over IPv6.

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" Current logic always selects an IFA of the same family from the outgoing interfaces. In IPv4 over IPv6 setup there can be just single non-127.0.0.1 ifa, attached to the loopback interface. Create a separate rt_getifa_family() to handle entire ifa selection for

[PATCH 4/4] Add in_localip_fib(), in6_localip_fib().

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff Check if given address/FIB exists locally. Reviewed by:melifaro Differential revision: https://reviews.freebsd.org/D32913 --- cpukit/include/machine/_kernel_in.h | 1 + cpukit/include/machine/_kernel_in6.h | 1 + 2 files changed, 2 insertions(+) diff --git

[newlib 48/65] tcp: add support for TCP over UDP

2022-07-07 Thread Sebastian Huber
From: Michael Tuexen Adding support for TCP over UDP allows communication with TCP stacks which can be implemented in userspace without requiring special priviledges or specific support by the OS. This is joint work with rrs. Reviewed by:rrs Sponsored by: Netflix, Inc. MFC

[newlib 62/65] Kernel-side infrastructure to implement nvlist-based set/get ifcaps

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov Reviewed by:hselasky, jhb, kp (previous version) Sponsored by: NVIDIA Networking MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D32551 --- newlib/libc/sys/rtems/include/net/if.h | 48 +-

[newlib 47/65] termios: add more speeds

2022-07-07 Thread Sebastian Huber
From: "Bjoern A. Zeeb" A lot of small arm64 gadgets are using 150 as console speed. While cu can perfectly deal with this some 3rd party software, e.g., comms/conserver-con add speeds based on B being defined. Having it defined here simplifies enhancing other software. Obtained-from:

Re: [tools] tester: Remove hard coded time limit for SIS

2022-07-07 Thread Sebastian Huber
On 07/07/2022 09:29, Chris Johns wrote: -1 from me. On 7/7/2022 4:44 pm, Sebastian Huber wrote: Remove the hard coded time limit in the SIS configuration which would overrule the general tester settings (for example the --timeout command line option). Users can set a SIS time limit in the

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Duc Doan
Hello Cedric, On Thu, 2022-07-07 at 10:32 +0200, Cedric Berger wrote: > Hello, > > On 07.07.22 09:35, Duc Doan wrote: > > Actually my project is focused on STM32F4, but it is nice that the > > code > > could be extensible to H7. However, I can't think of a good way to > > use > > that code with

[newlib 29/65] Support for userspace non-transparent superpages (largepages).

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov Created with shm_open2(SHM_LARGEPAGE) and then configured with FIOSSHMLPGCNF ioctl, largepages posix shared memory objects guarantee that all userspace mappings of it are served by superpage non-managed mappings. Only amd64 for now, both 2M and 1G superpages can be

[newlib 35/65] Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow.

2022-07-07 Thread Sebastian Huber
From: Richard Scheffenegger This adds a new IP_PROTO / IPV6_PROTO setsockopt (getsockopt) option IP(V6)_VLAN_PCP, which can be set to -1 (interface default), or explicitly to any priority between 0 and 7. Note that for untagged traffic, explicitly adding a priority will insert a special 801.1Q

[newlib 49/65] poll(2): Add POLLRDHUP.

2022-07-07 Thread Sebastian Huber
From: Thomas Munro Teach poll(2) to support Linux-style POLLRDHUP events for sockets, if requested. Triggered when the remote peer shuts down writing or closes its end. Reviewed by:kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D29757 ---

[newlib 32/65] add SIOCGIFDATA ioctl

2022-07-07 Thread Sebastian Huber
From: Ed Maste For interfaces that do not support SIOCGIFMEDIA (for which there are quite a few) the only fallback is to query the interface for if_data->ifi_link_state. While it's possible to get at if_data for an interface via getifaddrs(3) or sysctl, both are heavy weight mechanisms.

[newlib 42/65] Filter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain

2022-07-07 Thread Sebastian Huber
From: Andrew Gallatin In order to efficiently serve web traffic on a NUMA machine, one must avoid as many NUMA domain crossings as possible. With SO_REUSEPORT_LB, a number of workers can share a listen socket. However, even if a worker sets affinity to a core or set of cores on a NUMA domain, it

[newlib 51/65] Use thunks for compat ioctls using struct ifgroupreq.

2022-07-07 Thread Sebastian Huber
From: John Baldwin Reviewed by:brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29893 --- newlib/libc/sys/rtems/include/net/if.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/net/if.h

[newlib 53/65] tcp: SACK Lost Retransmission Detection (LRD)

2022-07-07 Thread Sebastian Huber
From: Richard Scheffenegger Recover from excessive losses without reverting to a retransmission timeout (RTO). Disabled by default, enable with sysctl net.inet.tcp.do_lrd=1 Reviewed By: #transport, rrs, tuexen, #manpages Sponsored by: Netapp, Inc. Differential Revision:

[newlib 22/65] Initial support for kernel offload of TLS receive.

2022-07-07 Thread Sebastian Huber
From: John Baldwin - Add a new TCP_RXTLS_ENABLE socket option to set the encryption and authentication algorithms and keys as well as the initial sequence number. - When reading from a socket using KTLS receive, applications must use recvmsg(). Each successful call to recvmsg() will

[newlib 61/65] tcp: LRO code to deal with all 12 TCP header flags

2022-07-07 Thread Sebastian Huber
From: Richard Scheffenegger TCP per RFC793 has 4 reserved flag bits for future use. One of those bits may be used for Accurate ECN. This patch is to include these bits in the LRO code to ease the extensibility if/when these bits are used. Reviewed By: hselasky, rrs, #transport Sponsored by:

[newlib 58/65] tcp: Add hystart-plus to cc_newreno and rack.

2022-07-07 Thread Sebastian Huber
From: Randall Stewart TCP Hystart draft version -03: https://datatracker.ietf.org/doc/html/draft-ietf-tcpm-hystartplusplus Is a new version of hystart that allows one to carefully exit slow start if the RTT spikes too much. The newer version has a slower-slow-start so to speak that then kicks

[newlib 18/65] Introduce nexthop objects and new routing KPI.

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" This is the foundational change for the routing subsytem rearchitecture. More details and goals are available in https://reviews.freebsd.org/D24141 . This patch introduces concept of nexthop objects and new nexthop-based routing KPI. Nexthops are objects,

[newlib 25/65] Add SOL_LOCAL symbolic constant for unix socket option level.

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov The constant seems to exists on MacOS X >= 10.8. Requested by: swills Reviewed by:allanjude, kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25933 ---

[newlib 27/65] sys: clean up empty lines in .c and .h files

2022-07-07 Thread Sebastian Huber
From: Mateusz Guzik --- newlib/libc/sys/rtems/include/sys/_termios.h | 1 - newlib/libc/sys/rtems/include/sys/socket.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/_termios.h b/newlib/libc/sys/rtems/include/sys/_termios.h index

[newlib 52/65] This brings into sync FreeBSD with the netflix

2022-07-07 Thread Sebastian Huber
From: Randall Stewart versions of rack and bbr. This fixes several breakages (panics) since the tcp_lro code was committed that have been reported. Quite a few new features are now in rack (prefecting of DGP -- Dynamic Goodput Pacing among the largest). There is also support for ack-war

[newlib 54/65] tcp: Add a socket option to rack

2022-07-07 Thread Sebastian Huber
From: Randall Stewart so we can test various changes to the slop value in timers. Timer_slop, in TCP, has been 200ms for a long time. This value dates back a long time when delayed ack timers were longer and links were slower. A 200ms timer slop allows 1 MSS to be sent over a 60kbps link. Its

[newlib 09/65] Add an shm_rename syscall

2022-07-07 Thread Sebastian Huber
From: David Bright Add an atomic shm rename operation, similar in spirit to a file rename. Atomically unlink an shm from a source path and link it to a destination path. If an existing shm is linked at the destination path, unlink it as part of the same atomic operation. The caller needs the

[newlib 43/65] Add tcgetwinsize(3) and tcsetwinsize(3) to termios

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov These functions get/set tty winsize respectively, and are trivial wrappers around corresponding termio ioctls. The functions are expected to be a part of POSIX.1 issue 8: https://www.austingroupbugs.net/view.php?id=1151#c3856. They are currently available in NetBSD and

[newlib 12/65] Jail and capability mode for shm_rename;

2022-07-07 Thread Sebastian Huber
From: David Bright add audit support for shm_rename Co-mingling two things here: * Addressing some feedback from Konstantin and Kyle re: jail, capability mode, and a few other things * Adding audit support as promised. The audit support change includes a partial refresh of OpenBSM

[newlib 14/65] Add flags for upcoming patches related to improved ECN handling.

2022-07-07 Thread Sebastian Huber
From: Michael Tuexen No functional change. Submitted by: Richard Scheffenegger Reviewed by: rgrimes@, tuexen@ Differential Revision: https://reviews.freebsd.org/D22429 --- newlib/libc/sys/rtems/include/netinet/tcp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[newlib 60/65] kernel: deprecate Internet Class A/B/C

2022-07-07 Thread Sebastian Huber
From: Mike Karels Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined; define it for user level. Define IN_MULTICAST separately from IN_CLASSD, and use it in pf instead of IN_CLASSD. Stop using class for setting default masks when not specified; instead, define new default

[newlib 20/65] Convert route caching to nexthop caching.

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" This change is build on top of nexthop objects introduced in r359823. Nexthops are separate datastructures, containing all necessary information to perform packet forwarding such as gateway interface and mtu. Nexthops are shared among the routes, providing more

[newlib 64/65] arp: Implement sticky ARP mode for interfaces.

2022-07-07 Thread Sebastian Huber
From: Konrad Sewiłło-Jopek Provide sticky ARP flag for network interface which marks it as the "sticky" one similarly to what we have for bridges. Once interface is marked sticky, any address resolved using the ARP will be saved as a static one in the ARP table. Such functionality may be used to

[newlib 63/65] Add ifcap2 names for RXTLS4 and RXTLS6 interface capabilities

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov and corresponding nvlist capabilities name strings. Reviewed by:hselasky, jhb, kp (previous version) Sponsored by: NVIDIA Networking MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D32551 --- newlib/libc/sys/rtems/include/net/if.h | 6

[newlib 36/65] Implement SIOCGIFALIAS.

2022-07-07 Thread Sebastian Huber
From: "Andrey V. Elsukov" It is lightweight way to check if an IPv4 address exists. Submitted by: Roy Marples Reviewed by:gnn, melifaro MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26636 --- newlib/libc/sys/rtems/include/sys/sockio.h | 1 + 1 file changed,

[newlib 57/65] tcp: Add support for DSACK based reordering window to rack.

2022-07-07 Thread Sebastian Huber
From: Randall Stewart The rack stack, with respect to the rack bits in it, was originally built based on an early I-D of rack. In fact at that time the TLP bits were in a separate I-D. The dynamic reordering window based on DSACK events was not present in rack at that time. It is now part of the

[newlib 55/65] pf: syncookie support

2022-07-07 Thread Sebastian Huber
From: Kristof Provost Import OpenBSD's syncookie support for pf. This feature help pf resist TCP SYN floods by only creating states once the remote host completes the TCP handshake rather than when the initial SYN packet is received. This is accomplished by using the initial sequence numbers to

[newlib 11/65] Add a TOE KTLS mode and a TOE hook for allocating TLS sessions.

2022-07-07 Thread Sebastian Huber
From: John Baldwin This adds the glue to allocate TLS sessions and invokes it from the TLS enable socket option handler. This also adds some counters for active TOE sessions. The TOE KTLS mode is returned by getsockopt(TLSTX_TLS_MODE) when TOE KTLS is in use on a socket, but cannot be set via

[PATCH v2 1/4] bsps/stm32f4 Include STM32F4 HAL

2022-07-07 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/f7ed35b5ce25a5410e72e4950d27ea86afbfe5c4. --- .../stm32f4/hal/Legacy/stm32f4xx_hal_can.c| 1679 .../stm32f4/hal/Legacy/stm32f4xx_hal_eth.c| 2307 +

[PATCH v2 4/4] bsps/stm32f4: Add GPIO implementation for STM32F4

2022-07-07 Thread Duc Doan
--- bsps/arm/stm32f4/gpio/gpio.c | 555 ++ bsps/arm/stm32f4/include/bsp.h| 4 - bsps/arm/stm32f4/include/bsp/stm32f4_gpio.h | 37 ++ bsps/arm/stm32f4/include/bsp/stm32f4_hal.h| 17 + bsps/arm/stm32f4/start/bspstart.c | 7 +-

[PATCH v2 3/4] bsps: Add GPIO API

2022-07-07 Thread Duc Doan
This is the new GPIO API. The header file is gpio2.h. --- bsps/include/bsp/gpio2.h| 538 bsps/shared/dev/gpio/gpio.c | 196 + spec/build/bsps/obj.yml | 2 +- 3 files changed, 735 insertions(+), 1 deletion(-) create mode 100644

[libbsd 3/7] Widen ifnet_detach_sxlock coverage

2022-07-07 Thread Sebastian Huber
From: Kristof Provost Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. MFC after: 1 week Differential Revision:

[libbsd 0/7] Update FreeBSD baseline

2022-07-07 Thread Sebastian Huber
This patch set updates the kernel space parts of Newlib provided header files imported from FreeBSD to the current FreeBSD head: commit 3bf66365129a13933f77d1f4421d5136861cffb4 Author: Brooks Davis Date: Wed Jul 6 14:03:48 2022 +0100 cddl/*: add a WITH(OUT)_DTRACE option Add an

[libbsd 1/7] CONTRIBUTING.rst: Add FreeBSD baseline update hints

2022-07-07 Thread Sebastian Huber
--- CONTRIBUTING.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f28f02e1..3b0c09aa 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -386,6 +386,17 @@ In general, provide empty header files and do not guard includes. For new

[libbsd 2/7] Add the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS data records.

2022-07-07 Thread Sebastian Huber
From: Rick Macklem The kernel RPC cannot process non-application data records when using TLS. It must to an upcall to a userspace daemon that will call SSL_read() to process them. This patch adds a new flag called MSG_TLSAPPDATA that the kernel RPC can use to tell sorecieve() to return ENXIO

[libbsd 6/7] Define IN_HISTORICAL_NETS for kernel space

2022-07-07 Thread Sebastian Huber
Required by FreeBSD commit: Author: Mike Karels Date: Tue Oct 26 22:01:09 2021 -0500 kernel: deprecate Internet Class A/B/C Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined; define it for user level. Define IN_MULTICAST separately from IN_CLASSD, and

[libbsd 4/7] uipc_socket.c: Modify MSG_TLSAPPDATA to only do Alert Records

2022-07-07 Thread Sebastian Huber
From: Rick Macklem Without this patch, the MSG_TLSAPPDATA flag would cause soreceive_generic() to return ENXIO for any non-application data record in a TLS receive stream. This works ok for TLS1.2, since Alert records appear to be the only non-application data records received. However, for

[libbsd 5/7] Kernel-side infrastructure to implement nvlist-based set/get ifcaps

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov Reviewed by:hselasky, jhb, kp (previous version) Sponsored by: NVIDIA Networking MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D32551 --- rtemsbsd/include/machine/_kernel_if.h | 12 1 file changed, 12 insertions(+) diff

[libbsd 7/7] Define IFCAP_NOMAP for Newlib compatibility

2022-07-07 Thread Sebastian Huber
--- rtemsbsd/include/machine/rtems-bsd-kernel-space.h | 3 +++ rtemsbsd/include/machine/rtems-bsd-user-space.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-space.h b/rtemsbsd/include/machine/rtems-bsd-kernel-space.h index c4c70c75..f2f1b91f

[PATCH v2 2/4] bsps/arm: Integrate and build STM32F4 HAL

2022-07-07 Thread Duc Doan
This patch is too large so I cannot send via email. Please find it here: https://github.com/dtbpkmte/GSoC-2022-RTEMS/tree/2baea7f3ffb178d581b3c6b6b7c1b63f8ac55852 --- .gitignore| 1 + bsps/arm/include/cmsis_compiler.h | 266 +

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Cedric Berger
Hello, On 07.07.22 09:35, Duc Doan wrote: Actually my project is focused on STM32F4, but it is nice that the code could be extensible to H7. However, I can't think of a good way to use that code with H7 right now; do you think that the code can be copied and pasted to H7 BSP? Or is there a

[PATCH v2 0/4] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-07 Thread Duc Doan
Hello, This patch adds a new GPIO API that aims at portability. GPIO of STM32F4 BSP has been implemented using this API. The sample application code can be found at https://github.com/dtbpkmte/GSoC-2022-RTEMS-Sample-Apps. v2: - Made get_gpio_from_base() a macro instead of a function - Added

[newlib 01/65] RTEMS: Remove FreeBSD version tags

2022-07-07 Thread Sebastian Huber
--- newlib/libc/sys/rtems/include/arpa/inet.h | 2 +- newlib/libc/sys/rtems/include/net/if.h| 2 +- newlib/libc/sys/rtems/include/netdb.h | 2 +- newlib/libc/sys/rtems/include/netinet/in.h| 2 +- newlib/libc/sys/rtems/include/netinet/tcp.h

[newlib 13/65] Make use of the stats(3) framework in the TCP stack.

2022-07-07 Thread Sebastian Huber
From: Edward Tomasz Napierala This makes it possible to retrieve per-connection statistical information such as the receive window size, RTT, or goodput, using a newly added TCP_STATS getsockopt(3) option, and extract them using the stats_voistat_fetch(3) API. See the net/tcprtt port for an

[newlib 03/65] Add FIOBMAP2 ioctl

2022-07-07 Thread Sebastian Huber
From: Alan Somers This ioctl exposes VOP_BMAP information to userland. It can be used by programs like fragmentation analyzers and optimized cp implementations. But I'm using it to test fusefs's VOP_BMAP implementation. The "2" in the name distinguishes it from the similar but incompatible

[newlib 04/65] #include from sys/filio.h

2022-07-07 Thread Sebastian Huber
From: Alan Somers This fixes world build after r349231 Reported by:Jenkins MFC after: 2 weeks MFC-With: 349231 Sponsored by: The FreeBSD Foundation --- newlib/libc/sys/rtems/include/sys/filio.h | 1 + 1 file changed, 1 insertion(+) diff --git

[newlib 21/65] This change does a small prepratory step

2022-07-07 Thread Sebastian Huber
From: Randall Stewart in getting the latest rack and bbr in from the NF repo. When those come in the OOB data handling will be fixed where Skyzaller crashes. Differential Revision: https://reviews.freebsd.org/D24575 --- newlib/libc/sys/rtems/include/netinet/tcp.h | 29 ++--- 1

[newlib 28/65] Include the psind in data returned by mincore(2).

2022-07-07 Thread Sebastian Huber
From: Mark Johnston Currently we use a single bit to indicate whether the virtual page is part of a superpage. To support a forthcoming implementation of non-transparent 1GB superpages, it is useful to provide more detailed information about large page sizes. The change converts MINCORE_SUPER

[newlib 46/65] Revert "SO_RERROR indicates that receive buffer overflows"

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" Wrong version of the change was pushed inadvertenly. This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71. --- newlib/libc/sys/rtems/include/sys/socket.h | 1 - 1 file changed, 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/socket.h

[newlib 33/65] Introduce scalable route multipath.

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" This change is based on the nexthop objects landed in D24232. The change introduces the concept of nexthop groups. Each group contains the collection of nexthops with their relative weights and a dataplane-optimized structure to enable efficient nexthop

[newlib 38/65] Integrate 4.4BSD-Lite2 changes to IOC_* definitions

2022-07-07 Thread Sebastian Huber
From: Warner Losh Bring in the long-overdue 4.4BSD-Lite2 rev 8.3 by cgd of sys/ioccom.h. This uses UL suffix for the IOC_* constants so they don't sign extend. Also bring in the handy diagram from NetBSD's version of this file. This alters the 4.4BSD-Lite2 code slightly in a way that's

[newlib 44/65] Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG.

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff Originally IFCAP_NOMAP meant that the mbuf has external storage pointer that points to unmapped address. Then, this was extended to array of such pointers. Then, such mbufs were augmented with header/trailer. Basically, extended mbufs are extended, and set of features is

[newlib 37/65] Support hardware rate limiting (pacing) with TLS offload.

2022-07-07 Thread Sebastian Huber
From: John Baldwin - Add a new send tag type for a send tag that supports both rate limiting (packet pacing) and TLS offload (mostly similar to D22669 but adds a separate structure when allocating the new tag type). - When allocating a send tag for TLS offload, check to see if the

[newlib 08/65] Add linux-compatible memfd_create

2022-07-07 Thread Sebastian Huber
From: Kyle Evans memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional CLOEXEC and file sealing support. This is used by some mesa parts, some linux libs, and qemu can also take advantage of it and uses the sealing to prevent resizing the region. This reimplements shm_open in

[newlib 07/65] Add a shm_open2 syscall to support upcoming memfd_create

2022-07-07 Thread Sebastian Huber
From: Kyle Evans shm_open2 allows a little more flexibility than the original shm_open. shm_open2 doesn't enforce CLOEXEC on its callers, and it has a separate shmflag argument that can be expanded later. Currently the only shmflag is to allow file sealing on the returned fd. shm_open and

[newlib 16/65] White space cleanup --

2022-07-07 Thread Sebastian Huber
From: Randall Stewart remove trailing tab's or spaces from any line. Sponsored by: Netflix Inc. --- newlib/libc/sys/rtems/include/netinet/in.h | 6 +++--- newlib/libc/sys/rtems/include/netinet/tcp.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[newlib 19/65] Make the path length of UNIX domain sockets

2022-07-07 Thread Sebastian Huber
From: "Jonathan T. Looney" specified by a #define. Also, add a comment describing the historical context for this length. Reviewed by:bz, jhb, kbowling (previous version) MFC after: 2 weeks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D24272 ---

[newlib 34/65] Fix typo.

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov Sponsored by: Mellanox Technologies/NVIDIA Networking MFC after: 3 days --- newlib/libc/sys/rtems/include/net/if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/net/if.h

[newlib 05/65] Reduce namespace pollution from r349233

2022-07-07 Thread Sebastian Huber
From: Alan Somers Define __daddr_t in _types.h and use it in filio.h Reported by:ian, bde Reviewed by:ian, imp, cem MFC after: 2 weeks MFC-With: 349233 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20715 ---

[newlib 45/65] SO_RERROR indicates that receive buffer overflows

2022-07-07 Thread Sebastian Huber
From: "Alexander V. Chernikov" should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors,

[newlib 15/65] Introduce flag IFF_NEEDSEPOCH

2022-07-07 Thread Sebastian Huber
From: Gleb Smirnoff that marks Ethernet interfaces that supposedly may call into ether_input() without network epoch. They all need to be reviewed before 13.0-RELEASE. Some may need be fixed. The flag is not planned to be used in the kernel for a long time. ---

[newlib 02/65] Move 32-bit compat support for FIODGNAME to the right place.

2022-07-07 Thread Sebastian Huber
From: Brooks Davis ioctl(2) commands only have meaning in the context of a file descriptor so translating them in the syscall layer is incorrect. The new handler users an accessor to retrieve/construct a pointer from the last member of the passed structure and relies on type punning to access

[newlib 00/65] Update FreeBSD baseline

2022-07-07 Thread Sebastian Huber
This patch set updates the header files imported from FreeBSD to the current FreeBSD head: commit 3bf66365129a13933f77d1f4421d5136861cffb4 Author: Brooks Davis Date: Wed Jul 6 14:03:48 2022 +0100 cddl/*: add a WITH(OUT)_DTRACE option Add an option to enable/disable DTrace without

[newlib 23/65] HyperV socket implementation for FreeBSD

2022-07-07 Thread Sebastian Huber
From: Wei Hu This change adds Hyper-V socket feature in FreeBSD. New socket address family AF_HYPERV and its kernel support are added. Submitted by: Wei Hu Reviewed by:Dexuan Cui Relnotes: yes Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D24061 ---

[newlib 06/65] This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control.

2022-07-07 Thread Sebastian Huber
From: Randall Stewart This is a completely separate TCP stack (tcp_bbr.ko) that will be built only if you add the make options WITH_EXTRA_TCP_STACKS=1 and also include the option TCPHPTS. You can also include the RATELIMIT option if you have a NIC interface that supports hardware pacing, BBR

[newlib 26/65] net: clean up empty lines in .c and .h files

2022-07-07 Thread Sebastian Huber
From: Mateusz Guzik --- newlib/libc/sys/rtems/include/net/if.h | 1 - newlib/libc/sys/rtems/include/netinet/tcp.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h index 78b1654dc..1a3a0e564 100644 ---

[newlib 30/65] Add two new ifnet capabilities

2022-07-07 Thread Sebastian Huber
From: Navdeep Parhar for hw checksumming and TSO for VXLAN traffic. These are similar to the existing VLAN capabilities. Reviewed by:kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 --- newlib/libc/sys/rtems/include/net/if.h | 2 ++ 1

[newlib 40/65] unix(4): Enhance LOCAL_CREDS_PERSISTENT ABI

2022-07-07 Thread Sebastian Huber
From: Conrad Meyer As this ABI is still fresh (r367287), let's correct some mistakes now: - Version the structure to allow for future changes - Include sender's pid in control message structure - Use a distinct control message type from the cmsgcred / sockcred mess Discussed with: kib, markj,

[newlib 31/65] TCP: send full initial window when timestamps are in use

2022-07-07 Thread Sebastian Huber
From: Richard Scheffenegger The fastpath in tcp_output tries to send out full segments, and avoid sending partial segments by comparing against the static t_maxseg variable. That value does not consider tcp options like timestamps, while the initial window calculation is using the correct

[newlib 41/65] style(9): Correct whitespace in struct definitions

2022-07-07 Thread Sebastian Huber
From: Brooks Davis struct ifconf and struct ifreq use the odd style "structfoo". struct ifdrv seems to have tried to follow this but was committed with spaces in place of most tabs resulting in "structifdrv". MFC after: 3 days --- newlib/libc/sys/rtems/include/net/if.h | 14 +++---

[newlib 39/65] unix(4): Add SOL_LOCAL:LOCAL_CREDS_PERSISTENT

2022-07-07 Thread Sebastian Huber
From: Conrad Meyer This option is intended to be semantically identical to Linux's SOL_SOCKET:SO_PASSCRED. For now, it is mutually exclusive with the pre-existing sockopt SOL_LOCAL:LOCAL_CREDS. Reviewed by:markj (penultimate version) Differential Revision:

[newlib 50/65] ioccom: define ioctl cmd value that can never be valid

2022-07-07 Thread Sebastian Huber
From: Konstantin Belousov Its use is for cases where some filler is needed for cmd, or we need an indication that there were no cmd supplied, and so on. Reviewed by:jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29935

[newlib 10/65] MFD_*: swap ordering

2022-07-07 Thread Sebastian Huber
From: Kyle Evans This API is still young enough that I would expect no one to be dependant on this yet... Swap the ordering while it's young to match Linux values to potentially ease implementation of linuxolator syscall, being able to reuse existing constants. ---

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Duc Doan
Hello Cedric, On Wed, 2022-07-06 at 16:41 +0200, Cedric Berger wrote: > One more detail and one question follows: > > >   static unsigned int EXTIx_IRQn[] = { > >   EXTI0_IRQn, > >   EXTI1_IRQn, > > Detail: You should really mark all constants like that "const": on a > STM32 with

Re: [tools] tester: Remove hard coded time limit for SIS

2022-07-07 Thread Chris Johns
-1 from me. On 7/7/2022 4:44 pm, Sebastian Huber wrote: > Remove the hard coded time limit in the SIS configuration which would overrule > the general tester settings (for example the --timeout command line option). > Users can set a SIS time limit in the configuration if necessary. I would this

Re: [libbsd 1/7] CONTRIBUTING.rst: Add FreeBSD baseline update hints

2022-07-07 Thread Karel Gardas
On 7/7/22 14:02, Sebastian Huber wrote: +Performa the following steps to do a FreeBSD baseline update: Small typo here. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

linkcmds.yml problems

2022-07-07 Thread Sam Price
Was trying to build the latest source builder/rtems/libbsd but ran into a linker problem. You ever see this the source linker has spec/build/bsps/microblaze/microblaze_fpga/linkcmds.yml: RAM : ORIGIN = _TEXT_START_ADDR, LENGTH = ${BSP_MICROBLAZE_FPGA_RAM_LENGTH} But the generated linker file

Re: [PATCH] bsps/arm/stm32f4 Optimize get pin and change from HAL to LL

2022-07-07 Thread Karel Gardas
On 7/7/22 13:11, Duc Doan wrote: Maybe it's as simple as renaming the identifiers from stm32f4_gpio => stm32_gpio for clarity for most functions, and declaring these files in the H7 scripts. I think I will wait for Karel's opinion about that. I just need to catch a bit of breath and then

Re: [PATCH v2 3/4] bsps: Add GPIO API

2022-07-07 Thread Karel Gardas
Hello Duc, just two notes which bothers me most. On 7/7/22 13:34, Duc Doan wrote: This is the new GPIO API. The header file is gpio2.h. --- bsps/include/bsp/gpio2.h| 538 bsps/shared/dev/gpio/gpio.c | 196 + spec/build/bsps/obj.yml

Re: [PATCH] bsps/microblaze: Fix build option definition order

2022-07-07 Thread Chris Johns
On 8/7/2022 5:26 am, Joel Sherrill wrote: > I'm ok with this but since you said Sebastian committed something which broke > this, it would be good for him to ack as well. > > Are there other BSPs which might have this issue? I am also wondering this. There is another patch Duc posted for ARM and

Re: [PATCH] bsps/microblaze: Fix build option definition order

2022-07-07 Thread Joel Sherrill
On Thu, Jul 7, 2022, 7:42 PM Chris Johns wrote: > On 8/7/2022 5:26 am, Joel Sherrill wrote: > > I'm ok with this but since you said Sebastian committed something which > broke > > this, it would be good for him to ack as well. > > > > Are there other BSPs which might have this issue? > > I am

Re: [PATCH v2 3/4] bsps: Add GPIO API

2022-07-07 Thread Duc Doan
Hello Karel, On Thu, 2022-07-07 at 14:36 +0200, Karel Gardas wrote: > > Hello Duc, > > just two notes which bothers me most. > > On 7/7/22 13:34, Duc Doan wrote: > > This is the new GPIO API. The header file is > > gpio2.h. > > --- > >   bsps/include/bsp/gpio2.h    | 538 > >

Re: linkcmds.yml problems

2022-07-07 Thread Sam Price
Thanks i was trying to figure out how to debug this but didnt make much progress. Was trying to get waf to generate verbose information of all the calls it was doing but wasnt sure how to do this. Also saw these warnings during the compile process. Have not had a chance to dig into them to see

Re: [tools] tester: Remove hard coded time limit for SIS

2022-07-07 Thread Chris Johns
On 7/7/2022 5:34 pm, Sebastian Huber wrote: > On 07/07/2022 09:29, Chris Johns wrote: >> -1 from me. >> >> On 7/7/2022 4:44 pm, Sebastian Huber wrote: >>> Remove the hard coded time limit in the SIS configuration which would >>> overrule >>> the general tester settings (for example the --timeout

Re: linkcmds.yml problems

2022-07-07 Thread Alex White
On Thu, Jul 7, 2022 at 10:31 AM Sam Price wrote: > Is it possible i have a bad python instance ? I was able to reproduce the linker problem using the latest RTEMS upstream code. It looks like it was broken by commit a0aaa394b68727d204904b59514cb0f90840ba6f from 6 days ago. I will submit a

[PATCH] bsps/microblaze: Fix build option definition order

2022-07-07 Thread Alex White
The build option definitions were rearranged such that the option definitions used in the linker script were not available. This caused linker errors when building. --- spec/build/bsps/microblaze/microblaze_fpga/bspkcu105.yml | 2 --

  1   2   >