freebsd-dev/sys/dev/mlx5/mlx5_en
Hans Petter Selasky 7272f9cd77 Implement hardware TLS via send tags for mlx5en(4), which is supported by
ConnectX-6 DX.

Currently TLS v1.2 and v1.3 with AES 128/256 crypto over TCP/IP (v4
and v6) is supported.

A per PCI device UMA zone is used to manage the memory of the send
tags.  To optimize performance some crypto contexts may be cached by
the UMA zone, until the UMA zone finishes the memory of the given send
tag.

An asynchronous task is used manage setup of the send tags towards the
firmware. Most importantly setting the AES 128/256 bit pre-shared keys
for the crypto context.

Updating the state of the AES crypto engine and encrypting data, is
all done in the fast path. Each send tag tracks the TCP sequence
number in order to detect non-contiguous blocks of data, which may
require a dump of prior unencrypted data, to restore the crypto state
prior to wire transmission.

Statistics counters have been added to count the amount of TLS data
transmitted in total, and the amount of TLS data which has been dumped
prior to transmission. When non-contiguous TCP sequence numbers are
detected, the software needs to dump the beginning of the current TLS
record up until the point of retransmission. All TLS counters utilize
the counter(9) API.

In order to enable hardware TLS offload the following sysctls must be set:
kern.ipc.mb_use_ext_pgs=1
kern.ipc.tls.ifnet.permitted=1
kern.ipc.tls.enable=1

Sponsored by:	Mellanox Technologies
2019-12-06 15:36:32 +00:00
..
en_hw_tls.h Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
en_rl.h Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
en.h Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_dim.c Add support for Dynamic Interrupt Moderation, DIM, in mlx5en(4). 2019-05-08 10:23:33 +00:00
mlx5_en_ethtool.c Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_flow_table.c Convert to if_foreach_llmaddr() KPI. 2019-10-14 20:23:16 +00:00
mlx5_en_hw_tls.c Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_main.c Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_port_buffer.c Add print to show user a reason for rejecting buffer size change in mlx5en(4). 2019-10-02 11:05:05 +00:00
mlx5_en_rl.c Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_rx.c Remove non-functional MLX5E_MAX_RX_SEGS macro in mlx5en(4). 2019-05-08 11:06:42 +00:00
mlx5_en_tx.c Implement hardware TLS via send tags for mlx5en(4), which is supported by 2019-12-06 15:36:32 +00:00
mlx5_en_txrx.c Unify prints in mlx5en(4). 2019-10-02 09:49:44 +00:00
port_buffer.h Import Linux code to query/set buffer state in mlx5en(4). 2019-10-02 10:05:34 +00:00