opnsense-src/sys/dev/mlx5
John Baldwin 521eac97f3 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
2020-10-29 00:23:16 +00:00
..
mlx5_accel mlx5fpga: Initial code import. 2018-12-05 14:11:20 +00:00
mlx5_core Properly cleanup driver during remove_one() in mlx5core. 2020-10-07 17:46:49 +00:00
mlx5_en Support hardware rate limiting (pacing) with TLS offload. 2020-10-29 00:23:16 +00:00
mlx5_fpga Add MLX5_FPGA_RELOAD IOCTL(2) to mlx5fpga. 2019-05-08 10:25:14 +00:00
mlx5_fpga_tools Infiniband clients must be attached and detached in a specific order in ibcore. 2020-07-06 08:50:11 +00:00
mlx5_ib Infiniband clients must be attached and detached in a specific order in ibcore. 2020-07-06 08:50:11 +00:00
mlx5_lib mlx5fpga: Initial code import. 2018-12-05 14:11:20 +00:00
cmd.h Remove duplicate prototypes. 2018-03-08 15:37:09 +00:00
cq.h Widen EPOCH(9) usage in mlx5en(4). 2020-01-30 12:35:13 +00:00
device.h mlx5_core: add more port module event types to decode. 2020-05-20 11:20:45 +00:00
diagnostics.h Move EEPROM information query from a sysctl in mlx5en(4) to an ioctl 2019-10-02 10:14:55 +00:00
doorbell.h Update version information for the mlx5 and mlx5en(4) modules. 2018-07-18 10:12:53 +00:00
driver.h mlx5_core: Import PDDR register definitions 2020-08-31 16:23:51 +00:00
fs.h Refactor the flowsteering APIs used by mlx5en(4). This change is needed by 2017-11-10 09:49:08 +00:00
mlx5_ifc.h mlx5_core: add mlx5_query_pddr(). 2020-08-31 16:25:55 +00:00
mlx5_rdma_if.h Update version information for the mlx5 and mlx5en(4) modules. 2018-07-18 10:12:53 +00:00
mlx5io.h Move EEPROM information query from a sysctl in mlx5en(4) to an ioctl 2019-10-02 10:14:55 +00:00
mpfs.h mlx5: Integrate eswitch and mpfs management code. 2020-03-18 22:33:39 +00:00
port.h mlx5en: Support 50GBase-KR4 media type in mlx5en driver. 2020-03-04 17:13:35 +00:00
qp.h Fix compilation issue with mlx5core and sparc64 (gcc48): 2019-12-06 16:20:22 +00:00
srq.h Update version information for the mlx5 and mlx5en(4) modules. 2018-07-18 10:12:53 +00:00
tls.h Add basic support for TCP/IP based hardware TLS offload to mlx5core. 2019-12-05 15:16:19 +00:00
vport.h mlx5en: Fix for inlining issues in transmit path 2018-12-05 14:21:28 +00:00