#
f48fb131 |
| 10-Oct-2024 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/t4_tom: Change stid allocation strategy to be more IPv6 friendly.
A hardware IPv6 server needs 2 consecutive stids (server tids) starting from a 2-aligned stid whereas an IPv4 server needs onl
cxgbe/t4_tom: Change stid allocation strategy to be more IPv6 friendly.
A hardware IPv6 server needs 2 consecutive stids (server tids) starting from a 2-aligned stid whereas an IPv4 server needs only 1 stid without any constraint. The allocator used to grab the first free stid(s) for both but this can fragment the stid space leaving nothing suitable for IPv6 even when lots of stids are available. Change the allocator to prefer stids for IPv4 from the ones that cannot be used for IPv6.
Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D47042
show more ...
|
Revision tags: release/13.4.0 |
|
#
c1c52485 |
| 13-Jul-2024 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
This allows the adapter to be suspended or reset even when stateful TOE is active, in some limited configurations.
The LLD has already
cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
This allows the adapter to be suspended or reset even when stateful TOE is active, in some limited configurations.
The LLD has already stopped the adapter hardware and all its queues by the time these ULD routines get called. The general approach in t4_tom is to purge the lookup tables immediately so that they are ready for operation by the time the adapter resumes, and park all the resources left hanging by the stopped hardware into separate "stranded" queues that can be dealt with at leisure.
Outstanding active opens, live connections, and synq entries (for connections in the middle of the 3-way handshake) are all treated as if the hardware had reported an abrupt error for the tid. The servers/listeners are a bit different in that no error is reported. They're just noted as non-functional when the hardware stops and are recreated by the driver during restart.
MFC after: 1 month Sponsored by: Chelsio Communications
show more ...
|
#
fd3aca5b |
| 13-Jul-2024 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Stop and restart the atid allocator with the LLD.
atids are used by both filters and TOE and the atid table is in the base driver (LLD). New atids cannot be allocated when the allocator i
cxgbe(4): Stop and restart the atid allocator with the LLD.
atids are used by both filters and TOE and the atid table is in the base driver (LLD). New atids cannot be allocated when the allocator is stopped but existing ones can still be freed. It is expected that the owners of outstanding atids will release them in their own stop processing, before the adapter is restarted.
MFC after: 1 month Sponsored by: Chelsio Communications
show more ...
|
#
5241b210 |
| 08-Jul-2024 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.
The suspend/resume/reset implementation in the base driver (LLD) currently works when only stateless features are in use. Th
cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.
The suspend/resume/reset implementation in the base driver (LLD) currently works when only stateless features are in use. This commit adds basic infrastructure for stateful upper layer drivers (ULDs) to participate in suspend/resume/reset.
* Add a uld_restart to indicate that the adapter has been restarted after a stop and the ULD should resume operations. * Move the existing functionality in t4_suspend/t4_resume to stop_lld and restart_lld. Use these and the new uld restart routines everywhere the adapter has to be stopped abruptly and restarted, namely: 1. PCIE bus suspend/resume/reset methods invoked by the kernel. 2. Manual internal-reset using driver sysctl. 3. Automatic internal-reset on a fatal error. * Implement an alternate internal-reset for use in VMs and for testing.
Typical reset sequence is: stop_adapter(sc); stop_lld(sc); stop_all_uld(sc); set_adapter_hwstatus(sc, false);
/* hw reset takes place here. */
restart_adapter(sc); restart_lld(sc); set_adapter_hwstatus(sc, true); restart_all_uld(sc);
MFC after: 1 month Sponsored by: Chelsio Communications
show more ...
|
#
cf5e6370 |
| 06-Jul-2024 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Changes to ULD list management.
* Convert t4_uld_list to an array. There will be at most 3 items in the list and it's simpler to track them in an array with a fixed slot for each ULD.
cxgbe(4): Changes to ULD list management.
* Convert t4_uld_list to an array. There will be at most 3 items in the list and it's simpler to track them in an array with a fixed slot for each ULD. * There is no need to refcount ULDs so stop doing that. * Add uld_ prefix to all members of uld_info. * Rename async_event to uld_stop to match its actual purpose. Call it for all ULDs and not just ULD_IWARP.
Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46029
show more ...
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0, release/13.2.0 |
|
#
43f6f084 |
| 02-Apr-2023 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Reword the comment explaining the atid/cookie split.
Avoid a magic constant while here. No functional change intended.
MFC after: 1 week Sponsored by: Chelsio Communications
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/12.4.0 |
|
#
2ff447ee |
| 15-Nov-2022 |
John Baldwin <jhb@FreeBSD.org> |
cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt().
Rather than requiring a socket to be created as a TLS socket from the get go, switch a TOE socket from "plain" TOE to TLS mode w
cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt().
Rather than requiring a socket to be created as a TLS socket from the get go, switch a TOE socket from "plain" TOE to TLS mode when a receive key is added to the socket.
The firmware is only able to switch a "plain" TOE connection to TLS mode if the head of the pending socket data is the start of a TLS record, so the connection is migrated to TLS mode as a multi-step process.
When TOE TLS RX is enabled, the associated connection's receive side is frozen via a flag in the TCB. The state of the socket buffer is then examined to determine if the pending data in the socket buffer ends on a TLS record boundary. If so, the connection is migrated to TLS mode and unfrozen. Otherwise, the connection is unfrozen temporarily until more data arrives. Once more data arrives, the receive queue is frozen again and rechecked. This continues until the connection is paused at a record boundary. Any records received before TLS mode is enabled are decrypted as software records.
Note that this removes the 'rx_tls_ports' sysctl. TOE TLS offload for receive is now enabled automatically on existing TOE connections when using a KTLS-aware SSL library just as it was previously enabled automatically for TLS transmit. This also enables TLS offload for TOE connections which enable TLS after passing initial data in the clear (e.g. STARTTLS with SMTP).
Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D37351
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
5b27e4b2 |
| 06-Aug-2021 |
John Baldwin <jhb@FreeBSD.org> |
cxgbei: Support for ISO (iSCSI segmentation offload).
ISO can be disabled before establishing a connection by setting dev.tNnex.N.toe.iso to 0.
Sponsored by: Chelsio Communications Differential Rev
cxgbei: Support for ISO (iSCSI segmentation offload).
ISO can be disabled before establishing a connection by setting dev.tNnex.N.toe.iso to 0.
Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31223
show more ...
|
#
557c4521 |
| 14-Apr-2021 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/t4_tom: Implement tod_pmtu_update.
tod_pmtu_update was added to the kernel in 01d74fe1ffc.
Sponsored by: Chelsio Communications
|
Revision tags: release/13.0.0 |
|
#
077ba6a8 |
| 26-Mar-2021 |
John Baldwin <jhb@FreeBSD.org> |
cxgbe: Add a struct sge_ofld_txq type.
This type mirrors struct sge_ofld_rxq and holds state for TCP offload transmit queues. Currently it only holds a work queue but will include additional state
cxgbe: Add a struct sge_ofld_txq type.
This type mirrors struct sge_ofld_rxq and holds state for TCP offload transmit queues. Currently it only holds a work queue but will include additional state in future changes.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29382
show more ...
|
#
0082e479 |
| 03-Dec-2020 |
John Baldwin <jhb@FreeBSD.org> |
Clear TLS offload mode if a TLS socket hangs without receiving data.
By default, if a TOE TLS socket stops receiving data for more than 5 seconds, revert the connection back to plain TOE mode. This
Clear TLS offload mode if a TLS socket hangs without receiving data.
By default, if a TOE TLS socket stops receiving data for more than 5 seconds, revert the connection back to plain TOE mode. This provides a fallback if the userland SSL library does not support KTLS. In addition, for client TLS 1.3 sockets using connect(), the TOE socket blocks before the handshake has completed since the socket option is only invoked for the final handshake.
The timeout defaults to 5 seconds, but can be changed at boot via the hw.cxgbe.toe.tls_rx_timeout tunable or for an individual interface via the dev.<nexus>.toe.tls_rx_timeout sysctl.
Reviewed by: np MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27470
show more ...
|
Revision tags: 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 |
|
#
b0dede77 |
| 19-May-2020 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/iw_cxgbe: Add an async callback to notify iw_cxgbe in case of a fatal error.
Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 2 weeks Sponsored by: Chelsio Communications
|
#
bddf7343 |
| 21-Nov-2019 |
John Baldwin <jhb@FreeBSD.org> |
NIC KTLS for Chelsio T6 adapters.
This adds support for ifnet (NIC) KTLS using Chelsio T6 adapters. Unlike the TOE-based KTLS in r353328, NIC TLS works with non-TOE connections.
NIC KTLS on T6 is n
NIC KTLS for Chelsio T6 adapters.
This adds support for ifnet (NIC) KTLS using Chelsio T6 adapters. Unlike the TOE-based KTLS in r353328, NIC TLS works with non-TOE connections.
NIC KTLS on T6 is not able to use the normal TSO (LSO) path to segment the encrypted TLS frames output by the crypto engine. Instead, the TOE is placed into a special setup to permit "dummy" connections to be associated with regular sockets using KTLS. This permits using the TOE to segment the encrypted TLS records. However, this approach does have some limitations:
1) Regular TOE sockets cannot be used when the TOE is in this special mode. One can use either TOE and TOE-based KTLS or NIC KTLS, but not both at the same time.
2) In NIC KTLS mode, the TOE is only able to accept a per-connection timestamp offset that varies in the upper 4 bits. Put another way, only connections whose timestamp offset has the 28 lower bits cleared can use NIC KTLS and generate correct timestamps. The driver will refuse to enable NIC KTLS on connections with a timestamp offset with any of the lower 28 bits set. To use NIC KTLS, users can either disable TCP timestamps by setting the net.inet.tcp.rfc1323 sysctl to 0, or apply a local patch to the tcp_new_ts_offset() function to clear the lower 28 bits of the generated offset.
3) Because the TCP segmentation relies on fields mirrored in a TCB in the TOE, not all fields in a TCP packet can be sent in the TCP segments generated from a TLS record. Specifically, for packets containing TCP options other than timestamps, the driver will inject an "empty" TCP packet holding the requested options (e.g. a SACK scoreboard) along with the segments from the TLS record. These empty TCP packets are counted by the dev.cc.N.txq.M.kern_tls_options sysctls.
Unlike TOE TLS which is able to buffer encrypted TLS records in on-card memory to handle retransmits, NIC KTLS must re-encrypt TLS records for retransmit requests as well as non-retransmit requests that do not include the start of a TLS record but do include the trailer. The T6 NIC KTLS code tries to optimize some of the cases for requests to transmit partial TLS records. In particular it attempts to minimize sending "waste" bytes that have to be given as input to the crypto engine but are not needed on the wire to satisfy mbufs sent from the TCP stack down to the driver.
TCP packets for TLS requests are broken down into the following classes (with associated counters):
- Mbufs that send an entire TLS record in full do not have any waste bytes (dev.cc.N.txq.M.kern_tls_full).
- Mbufs that send a short TLS record that ends before the end of the trailer (dev.cc.N.txq.M.kern_tls_short). For sockets using AES-CBC, the encryption must always start at the beginning, so if the mbuf starts at an offset into the TLS record, the offset bytes will be "waste" bytes. For sockets using AES-GCM, the encryption can start at the 16 byte block before the starting offset capping the waste at 15 bytes.
- Mbufs that send a partial TLS record that has a non-zero starting offset but ends at the end of the trailer (dev.cc.N.txq.M.kern_tls_partial). In order to compute the authentication hash stored in the trailer, the entire TLS record must be sent as input to the crypto engine, so the bytes before the offset are always "waste" bytes.
In addition, other per-txq sysctls are provided:
- dev.cc.N.txq.M.kern_tls_cbc: Count of sockets sent via this txq using AES-CBC.
- dev.cc.N.txq.M.kern_tls_gcm: Count of sockets sent via this txq using AES-GCM.
- dev.cc.N.txq.M.kern_tls_fin: Count of empty FIN-only packets sent to compensate for the TOE engine not being able to set FIN on the last segment of a TLS record if the TLS record mbuf had FIN set.
- dev.cc.N.txq.M.kern_tls_records: Count of TLS records sent via this txq including full, short, and partial records.
- dev.cc.N.txq.M.kern_tls_octets: Count of non-waste bytes (TLS header and payload) sent for TLS record requests.
- dev.cc.N.txq.M.kern_tls_waste: Count of waste bytes sent for TLS record requests.
To enable NIC KTLS with T6, set the following tunables prior to loading the cxgbe(4) driver:
hw.cxgbe.config_file=kern_tls hw.cxgbe.kern_tls=1
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D21962
show more ...
|
Revision tags: release/12.1.0 |
|
#
e38a50e8 |
| 22-Oct-2019 |
John Baldwin <jhb@FreeBSD.org> |
Split Chelsio send tags into a generic base tag and a ratelimit tag.
NIC KTLS will add a new TLS send tag type in cxgbe(4) that is a distinct tag from a ratelimit tag. To support this, refactor cxg
Split Chelsio send tags into a generic base tag and a ratelimit tag.
NIC KTLS will add a new TLS send tag type in cxgbe(4) that is a distinct tag from a ratelimit tag. To support this, refactor cxgbe_snd_tag to be a simple send tag with a type and convert the existing ratelimit tag to a new cxgbe_rate_tag structure.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D22072
show more ...
|
Revision tags: release/11.3.0 |
|
#
9a696dc6 |
| 04-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345880
|
#
be09e82a |
| 29-Mar-2019 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/t4_tom: Catch up with r344433, which removed tcb_autorcvbuf_inc.
The declaration in tcp_var.h is still around so t4_tom continued to compile but wouldn't load. A separate commit will fix tcp_
cxgbe/t4_tom: Catch up with r344433, which removed tcb_autorcvbuf_inc.
The declaration in tcp_var.h is still around so t4_tom continued to compile but wouldn't load. A separate commit will fix tcp_var.h
Reported By: Dustin Marquess (dmarquess at gmail)
Sponsored by: Chelsio Communications
show more ...
|
Revision tags: release/12.0.0 |
|
#
3611ec60 |
| 18-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337646 through r338014.
|
#
51347c3f |
| 15-Aug-2018 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Use two hashes instead of a table to keep track of hashfilters. Two because the driver needs to look up a hashfilter by its 4-tuple or tid.
A couple of fixes while here: - Reject attempts
cxgbe(4): Use two hashes instead of a table to keep track of hashfilters. Two because the driver needs to look up a hashfilter by its 4-tuple or tid.
A couple of fixes while here: - Reject attempts to add duplicate hashfilters. - Do not assume that any part of the 4-tuple that isn't specified is 0. This makes it consistent with all other mandatory parameters that already require explicit user input.
MFC after: 2 weeks Sponsored by: Chelsio Communications
show more ...
|
#
14b841d4 |
| 11-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
MFH @ r337607, in preparation for boarding
|
#
f9c0a512 |
| 10-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337286 through r337585.
|
#
5fc0f72f |
| 09-Aug-2018 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Add support for high priority filters on T6+. They have their own region in the TCAM starting with T6, unlike previous chips where they were in the same region as normal filters.
These fi
cxgbe(4): Add support for high priority filters on T6+. They have their own region in the TCAM starting with T6, unlike previous chips where they were in the same region as normal filters.
These filters "hit" before anything else in the LE's lookup. The exact order is: a) High priority filters b) TOE's active region (TCAM and/or hash) c) Servers (TOE hw listeners) d) Normal filters
MFC after: 1 week Sponsored by: Chelsio Communications
show more ...
|
#
bbd7a929 |
| 04-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r336870 through r337285, and resolve conflicts.
|