#
81b38bce |
| 23-Nov-2024 |
Andrew Gallatin <gallatin@FreeBSD.org> |
mlx5e tls: Ensure all allocated tags have a hw context associated
Ensure all allocated tags have a hardware context associated. The hardware context allocation is moved into the zone import routine,
mlx5e tls: Ensure all allocated tags have a hw context associated
Ensure all allocated tags have a hardware context associated. The hardware context allocation is moved into the zone import routine, as suggested by kib. This is safe because these zone allocations are always done in a sleepable context.
I have removed the now pointless num_resources tracking, and added sysctls / tunables to control UMA zone limits for these tls tags, as well as a tunable to let the driver pre-allocate tags at boot.
MFC after: 2 weeks
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
015f22f5 |
| 17-Feb-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
mlx5en: Fix TLS worker thread race.
Create a dedicated free state, in case the taskqueue worker is still pending, to avoid re-activation of a freed send tag.
MFC after: 1 week Sponsored by: NVIDIA
mlx5en: Fix TLS worker thread race.
Create a dedicated free state, in case the taskqueue worker is still pending, to avoid re-activation of a freed send tag.
MFC after: 1 week Sponsored by: NVIDIA Networking
show more ...
|
#
ebdb7006 |
| 17-Feb-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
mlx5en: Improve RX- and TX- TLS refcounting.
Use the send tag refcounting mechanism to refcount the RX- and TX- TLS send tags. Then it is no longer needed to wait for refcounts to reach zero when de
mlx5en: Improve RX- and TX- TLS refcounting.
Use the send tag refcounting mechanism to refcount the RX- and TX- TLS send tags. Then it is no longer needed to wait for refcounts to reach zero when destroying RX- and TX- TLS send tags as a result of pending data or WQE commands.
This also ensures that when TX-TLS and rate limiting is used at the same time, the underlying SQ is not prematurely destroyed.
MFC after: 1 week Sponsored by: NVIDIA Networking
show more ...
|
#
fad4b7d1 |
| 01-Feb-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
mlx5en: Add missing TLS structure prototype.
MFC after: 1 week Sponsored by: NVIDIA Networking
|
#
3a1bf855 |
| 01-Feb-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
mlx5en: Remove unused hardware TLS field.
MFC after: 1 week Sponsored by: NVIDIA Networking
|
Revision tags: release/12.3.0 |
|
#
c782ea8b |
| 14-Sep-2021 |
John Baldwin <jhb@FreeBSD.org> |
Add a switch structure for send tags.
Move the type and function pointers for operations on existing send tags (modify, query, next, free) out of 'struct ifnet' and into a new 'struct if_snd_tag_sw'
Add a switch structure for send tags.
Move the type and function pointers for operations on existing send tags (modify, query, next, free) out of 'struct ifnet' and into a new 'struct if_snd_tag_sw'. A pointer to this structure is added to the generic part of send tags and is initialized by m_snd_tag_init() (which now accepts a switch structure as a new argument in place of the type).
Previously, device driver ifnet methods switched on the type to call type-specific functions. Now, those type-specific functions are saved in the switch structure and invoked directly. In addition, this more gracefully permits multiple implementations of the same tag within a driver. In particular, NIC TLS for future Chelsio adapters will use a different implementation than the existing NIC TLS support for T6 adapters.
Reviewed by: gallatin, hselasky, kib (older version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31572
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
56fb710f |
| 06-Oct-2020 |
John Baldwin <jhb@FreeBSD.org> |
Store the send tag type in the common send tag header.
Both cxgbe(4) and mlx5(4) wrapped the existing send tag header with their own identical headers that stored the type that the type-specific tag
Store the send tag type in the common send tag header.
Both cxgbe(4) and mlx5(4) wrapped the existing send tag header with their own identical headers that stored the type that the type-specific tag structures inherited from, so in practice it seems drivers need this in the tag anyway. This permits removing these extra header indirections (struct cxgbe_snd_tag and struct mlx5e_snd_tag).
In addition, this permits driver-independent code to query the type of a tag, e.g. to know what type of tag is being queried via if_snd_query.
Reviewed by: gallatin, hselasky, np, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26689
show more ...
|
Revision tags: release/11.4.0 |
|
#
7272f9cd |
| 06-Dec-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
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 U
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
show more ...
|