| 5767c8ca | 13-Sep-2021 |
John Baldwin <[email protected]> |
cxgbei: Only convert "plain" TCP connections to ISCSI.
Reject attempts to convert a connection using a different ULP mode: (e.g. DDP or TLS) to ISCSI.
Reported by: Jithesh Arakkan @ Chelsio Sponsor
cxgbei: Only convert "plain" TCP connections to ISCSI.
Reject attempts to convert a connection using a different ULP mode: (e.g. DDP or TLS) to ISCSI.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit f63ddf465fe09d3547deaf80fbdb91bc7b816dfb)
show more ...
|
| ed2a5ae6 | 13-Sep-2021 |
John Baldwin <[email protected]> |
cxgbei: Return early for EBUSY error in icl_cxgbei_conn_handoff.
This permits unindenting almost half of the function.
Sponsored by: Chelsio Communications
(cherry picked from commit b7caa8157602f
cxgbei: Return early for EBUSY error in icl_cxgbei_conn_handoff.
This permits unindenting almost half of the function.
Sponsored by: Chelsio Communications
(cherry picked from commit b7caa8157602f4eb9acd2729b48ba3a0c0cdc045)
show more ...
|
| 56bc3b1a | 13-Sep-2021 |
John Baldwin <[email protected]> |
cxgbei: Disable ISO for -SO cards without external memory.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 9b1bb0aee697352b39b3efa1843f581ca29
cxgbei: Disable ISO for -SO cards without external memory.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 9b1bb0aee697352b39b3efa1843f581ca29068ba)
show more ...
|
| 075c8d9d | 10-Sep-2021 |
John Baldwin <[email protected]> |
cxgbei: Handle errors in PDUs.
When a PDU with an error (bad padding, header digest, or data digest) is received, log the error via ICL_WARN() and then reset the connection via the ic_error callback
cxgbei: Handle errors in PDUs.
When a PDU with an error (bad padding, header digest, or data digest) is received, log the error via ICL_WARN() and then reset the connection via the ic_error callback.
While here, add per-rxq counters for errors.
Sponsored by: Chelsio Communications
(cherry picked from commit 4d4cf62e29b06a763dfa8b218de38c8d2cf051bb)
show more ...
|
| a75428c3 | 30-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Add sysctls to report the maximum data segment lengths.
These sysctls report the maximum data segment lengths supported by an adapter. These are the values advertised to the remote end duri
cxgbei: Add sysctls to report the maximum data segment lengths.
These sysctls report the maximum data segment lengths supported by an adapter. These are the values advertised to the remote end during the login phase.
Sponsored by: Chelsio Communications
(cherry picked from commit d39e65b5bdc04cac4521ad8e071015cd751c2302)
show more ...
|
| d724218a | 30-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Limit T5 transmit data segments to 15k.
This avoids exceeding a limit in the firmware when using ISO with jumbo frames.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communic
cxgbei: Limit T5 transmit data segments to 15k.
This avoids exceeding a limit in the firmware when using ISO with jumbo frames.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 64f09f2346650f02b6deccbe05bb02b88fce4a5e)
show more ...
|
| 51983604 | 18-Aug-2021 |
John Baldwin <[email protected]> |
iscsi: Teach the iSCSI stack about "large" received PDUs.
When using iSCSI PDU offload (cxgbei) on T6 adapters, a burst of received PDUs can be reported via a single message to the driver.
Previous
iscsi: Teach the iSCSI stack about "large" received PDUs.
When using iSCSI PDU offload (cxgbei) on T6 adapters, a burst of received PDUs can be reported via a single message to the driver.
Previously the driver passed these multi-PDU bursts up to the iSCSI stack up as a single "large" PDU by rewriting the buffer offset, data segment length, and DataSN fields in the iSCSI header. The DataSN field in particular was rewritten so that each of the "large" PDUs used consecutively increasing values. While this worked, the forged DataSN values did not match the ExpDataSN value in the subsequent SCSI Response PDU. The initiator does not currently verify this value, but the forged DataSN values prevent adding a check.
To avoid this, allow a logical iSCSI PDU (struct icl_pdu) to describe a burst of PDUs via a new 'ip_additional_pdus' field. Normally this field is set to zero when 'struct icl_pdu' represents a single PDU. If logical PDU represents a burst of on-the-wire PDUs, then 'ip_npdus' contains the count of additional on-the-wire PDUs. The header of this "large" PDU is still modified, but the DataSN field now contains the DataSN value of the first on-the-wire PDU in the burst.
Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31577
(cherry picked from commit c261b6ea4e2ef1fc6a446443ee594ad76f392350)
show more ...
|
| 0967aa71 | 17-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Restrict received PDUs to 4 DDP pages in length.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31576
(cherry picked from commit d7
cxgbei: Restrict received PDUs to 4 DDP pages in length.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31576
(cherry picked from commit d75b0870e542613e63d9f4ac8ec9fb22817e34fa)
show more ...
|
| da92c273 | 17-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Only round PDU data segment lengths down by 512 on T5.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31575
(cherry picked from com
cxgbei: Only round PDU data segment lengths down by 512 on T5.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31575
(cherry picked from commit f28715fdc1f7e801b260369787e7bcd633a481bb)
show more ...
|
| 5dfe6f23 | 17-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Restructure how PDU limits are managed.
- Compute data segment limits in read_pdu_limits() rather than PDU length limits.
- Add back connection-specific PDU overhead lengths to compute PD
cxgbei: Restructure how PDU limits are managed.
- Compute data segment limits in read_pdu_limits() rather than PDU length limits.
- Add back connection-specific PDU overhead lengths to compute PDU length limits in icl_cxgbei_conn_handoff().
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31574
(cherry picked from commit cbc186360c658eda884ed97f37cdc2d1b6512b91)
show more ...
|
| 37c5daa8 | 12-Aug-2021 |
John Baldwin <[email protected]> |
cxgbei: Wait for the final CPL to be received in icl_cxgbei_conn_close.
A socket in the FIN_WAIT_1 state is marked disconnected by do_close_con_rpl() even though there might still receive data pendi
cxgbei: Wait for the final CPL to be received in icl_cxgbei_conn_close.
A socket in the FIN_WAIT_1 state is marked disconnected by do_close_con_rpl() even though there might still receive data pending. This is because the socket at that point has set SBS_CANTRCVMORE which causes the protocol layer to discard any data received before the FIN. However, icl_cxgbei_conn_close needs to wait until all the data has been discarded. Replace the wait for SS_ISDISCONNECTED with instead waiting for final_cpl_received() to be called.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 2eb0e53a6b5ec1a72be70e966d4e562e1a8d4e88)
show more ...
|
| 7f82047e | 29-Jul-2021 |
John Baldwin <[email protected]> |
cxgbei: Round up the maximum PDU data length by the MSS for TXDATAPLEN_MAX.
Recent firmware versions round down the value passed here by the MSS and subsequently mishandle transmitted PDUs larger th
cxgbei: Round up the maximum PDU data length by the MSS for TXDATAPLEN_MAX.
Recent firmware versions round down the value passed here by the MSS and subsequently mishandle transmitted PDUs larger than the rounded down value.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit d0d631d5f4437223664f7bbdfdb421ec05cf9657)
show more ...
|
| a2bd630c | 29-Jul-2021 |
John Baldwin <[email protected]> |
cxgbei: Wait for socket to close in icl_cxgbei_conn_close.
This ensures the TOE has finished processing any in-flight received data before returning to the caller. The caller assumes it is safe to
cxgbei: Wait for socket to close in icl_cxgbei_conn_close.
This ensures the TOE has finished processing any in-flight received data before returning to the caller. The caller assumes it is safe to free any open tasks or transfers (and associated buffers) after this function returns.
Previously, data placed directly via DDP could be written to buffers after the caller had freed the buffers.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 67495c13d0bc25c57ebf0103e9d2af7c4a3088c9)
show more ...
|
| a47b1c6f | 19-Jul-2021 |
John Baldwin <[email protected]> |
cxgbei: Don't assert F for data completion PDUs.
If a data PDU encounters an error such as a digest error, the firmware will report that data PDU when completion moderation is active even if it is n
cxgbei: Don't assert F for data completion PDUs.
If a data PDU encounters an error such as a digest error, the firmware will report that data PDU when completion moderation is active even if it is not the final data PDU in a burst.
Sponsored by: Chelsio Communications
(cherry picked from commit b5e73dd952f9d5224e9e076bb9719f7bcec871b0)
show more ...
|
| 4415ec04 | 19-Jul-2021 |
John Baldwin <[email protected]> |
cxgbei: Remove invalid assertion.
A non-placed PDU can be delivered by CPL_RX_ISCSI_CMP in the middle of a burst of placed PDUs (received via DDP) in which case the rcv_nxt will not match the start
cxgbei: Remove invalid assertion.
A non-placed PDU can be delivered by CPL_RX_ISCSI_CMP in the middle of a burst of placed PDUs (received via DDP) in which case the rcv_nxt will not match the start of the non-placed PDU.
Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications
(cherry picked from commit 4a7d15ebb6afe1b662afd2fde0ed2725790a1ba1)
show more ...
|
| f0334cb8 | 18-Jun-2021 |
John Baldwin <[email protected]> |
cxgbei: Better handle new tasks and transfers when disconnecting.
If the connection is in the process of disconnecting, ic_socket can be NULL. For icl_cxgbei_conn_transfer_setup(), lock the connect
cxgbei: Better handle new tasks and transfers when disconnecting.
If the connection is in the process of disconnecting, ic_socket can be NULL. For icl_cxgbei_conn_transfer_setup(), lock the connection and check ic_socket before using it. For icl_cxgbei_conn_task_setup(), the caller already holds the connection lock, so assert it and bail early with ECONNRESET if the connection is disconnecting.
Reported by: Jithesh Arakkan @ Chelsio Fixes: f949967c8eb3 cxgbei: Fix a race between transfer setup and a peer reset.
(cherry picked from commit abc273a2901b116cc98a1fb506c75ac1b0a14cd3)
show more ...
|
| 0695b57a | 20-May-2021 |
John Baldwin <[email protected]> |
cxgbei: Fix a race between transfer setup and a peer reset.
In 4427ac3675f9, the TOM driver stopped sending work requests to program iSCSI page pods directly and instead queued them to be written as
cxgbei: Fix a race between transfer setup and a peer reset.
In 4427ac3675f9, the TOM driver stopped sending work requests to program iSCSI page pods directly and instead queued them to be written asynchronously with iSCSI PDUs. The queue of mbufs to send is protected by the inp lock. However, the inp cannot be safely obtained from the toep since a RST from the remote peer might have cleared toep->inp asynchronously in an ithread. To fix, obtain the inp from the socket as is already done in icl_cxgbei_conn_pdu_queue_cb() and fail the new transfer setup with ECONNRESET if the connection has been reset.
To avoid passing sockets or inps into the page pod routines, pull the mbufq out of the two relevant page pod routines such that the routines queue new work request mbufs to a caller-supplied mbufq.
Reported by: Jithesh Arakkan @ Chelsio Fixes: 4427ac3675f91df039d54a23518132e0e0fede86
(cherry picked from commit f949967c8eb3ab5e5a965e3cf07a726dfdc81263)
show more ...
|
| cc44e4e5 | 28-May-2021 |
John Baldwin <[email protected]> |
cxgbei: Support iSCSI offload on T6.
T6 makes several changes relative to T5 for receive of iSCSI PDUs.
First, earlier adapters issue either 2 or 3 messages to the host for each PDU received: CPL_I
cxgbei: Support iSCSI offload on T6.
T6 makes several changes relative to T5 for receive of iSCSI PDUs.
First, earlier adapters issue either 2 or 3 messages to the host for each PDU received: CPL_ISCSI_HDR contains the BHS of the PDU, CPL_ISCSI_DATA (when DDP is not used for zero-copy receive) contains the PDU data as buffers on the freelist, and CPL_RX_ISCSI_DDP with status of the PDU such as result of CRC checks. In T6, a new CPL_RX_ISCSI_CMP combines CPL_ISCSI_HDR and CPL_RX_ISCSI_DDP. Data PDUs which are directly placed via DDP only report a single CPL_RX_ISCSI_CMP message. Data PDUs received on the free lists are reported as CPL_ISCSI_DATA followed by CPL_RX_ISCSI_CMP. Control PDUs such as R2T are still reported via CPL_ISCSI_HDR and CPL_RX_ISCSI_DDP.
Supporting this requires changing the CPL_ISCSI_DATA handler to allocate a PDU structure if it is not preceded by a CPL_ISCSI_HDR as well as support for the new CPL_RX_ISCSI_CMP.
Second, when using DDP for zero-copy receive, T6 will only issue a CPL_RX_ISCSI_CMP after a burst of PDUs have been received (indicated by the F flag in the BHS). In this case, the CPL_RX_ISCSI_CMP can reflect the completion of multiple PDUs and the BHS and TCP sequence number included in the message are from the last PDU received in the burst. Notably, the message does not include any information about earlier PDUs received as part of the burst. Instead, the driver must track the amount of data already received for a given transfer and use this to compute the amount of data received in a burst. In addition, the iSCSI layer currently has no way to permit receiving a logical PDU which spans multiple PDUs. Instead, the driver presents each burst as a single, "large" PDU to the iSCSI target and initiators. This is done by rewriting the buffer offset and data length fields in the BHS of the final PDU as well as rewriting the DataSN so that the received PDUs appear to be in order.
To track all this, cxgbei maintains a hash table of 'cxgbei_cmp' structures indexed by transfer tags for each offloaded iSCSI connection. When a SCSI_DATA_IN message is received, the ITT from the received BHS is used to find the necessary state in the hash table, whereas SCSI_DATA_OUT replies use the TTT as the key. The structure tracks the expected starting offset and DataSN of the next burst as well as the rewritten DataSN value used for the previously received PDU.
Discussed with: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D30458
(cherry picked from commit 67360f7bb0bb575d823c21420abaf165ecf62066)
show more ...
|
| 4aa41b1e | 19-May-2021 |
John Baldwin <[email protected]> |
cxgbei: Add tunable sysctls for the FirstBurstLength and MaxBurstLength.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D30269
(cherry picke
cxgbei: Add tunable sysctls for the FirstBurstLength and MaxBurstLength.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D30269
(cherry picked from commit 3bede2908acc6cbc8e809d63d7c9b5fd95932dfb)
show more ...
|
| 864d6663 | 19-May-2021 |
John Baldwin <[email protected]> |
cxgbei: Remove unused sysctls.
These were seemingly copied over from icl_soft.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D30268
(cherr
cxgbei: Remove unused sysctls.
These were seemingly copied over from icl_soft.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D30268
(cherry picked from commit 671fd0ec8dbe5fb9c02e4d9cb7080e427dc1048b)
show more ...
|