acadia-newlib/newlib/libc
John Baldwin 5ea36d92e6 Support hardware rate limiting (pacing) with TLS offload.
- 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
  connection already has a pacing rate.  If so, allocate a tag that
  supports both rate limiting and TLS offload rather than a plain TLS
  offload tag.

- When setting an initial rate on an existing ifnet KTLS connection,
  set the rate in the TCP control block inp and then reset the TLS
  send tag (via ktls_output_eagain) to reallocate a TLS + ratelimit
  send tag.  This allocates the TLS send tag asynchronously from a
  task queue, so the TLS rate limit tag alloc is always sleepable.

- When modifying a rate on a connection using KTLS, look for a TLS
  send tag.  If the send tag is only a plain TLS send tag, assume we
  failed to allocate a TLS ratelimit tag (either during the
  TCP_TXTLS_ENABLE socket option, or during the send tag reset
  triggered by ktls_output_eagain) and ignore the new rate.  If the
  send tag is a ratelimit TLS send tag, change the rate on the TLS tag
  and leave the inp tag alone.

- Lock the inp lock when setting sb_tls_info for a socket send buffer
  so that the routines in tcp_ratelimit can safely dereference the
  pointer without needing to grab the socket buffer lock.

- Add an IFCAP_TXTLS_RTLMT capability flag and associated
  administrative controls in ifconfig(8).  TLS rate limit tags are
  only allocated if this capability is enabled.  Note that TLS offload
  (whether unlimited or rate limited) always requires IFCAP_TXTLS[46].

Reviewed by:	gallatin, hselasky
Relnotes:	yes
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D26691
2022-07-11 11:52:46 +02:00
..
argz newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
ctype newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
errno newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
iconv iconv: Fix EL/IX level 2 handling 2022-03-21 11:32:59 +01:00
include cdefs.h: Remove redundant #ifdefs 2022-07-11 11:52:46 +02:00
locale newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
machine Remove _global_impure_ptr indirection 2022-05-04 17:31:04 +02:00
misc Remove __sinit_locks / __sinit_recursive_mutex 2022-05-13 12:31:56 +02:00
posix Cygwin: simplify some function names 2022-05-29 17:45:52 -04:00
reent Use global stdio streams for all configurations 2022-06-10 20:13:52 +02:00
search newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
signal newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
ssp newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
stdio Cygwin: stdio: don't try again to read after EOF 2022-07-04 18:55:08 -04:00
stdio64 newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
stdlib Use global atexit data for all configurations 2022-05-18 07:45:09 +02:00
string newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
sys Support hardware rate limiting (pacing) with TLS offload. 2022-07-11 11:52:46 +02:00
syscalls newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
time Modify tzset_r.c to handle errors 2022-05-27 11:05:11 -04:00
unix newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
xdr newlib: libc: merge build up a directory 2022-03-16 21:18:25 -04:00
Makefile.inc Silence xsltproc when writing manpages 2022-05-04 17:05:52 -04:00
Makefile.unidata cleanup Unicode data files after generating updated tables 2021-11-16 11:24:29 +01:00
acinclude.m4 newlib: drop phoenix support 2022-03-28 23:17:06 -04:00
libc.in.xml Generate manpages for functions in chapter sys.tex 2022-05-04 17:06:19 -04:00
libc.texi newlib: libc: include all chapters all the time in the manual 2022-02-04 19:39:09 -05:00
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00