scsi: cxgb4i: libcxgbi: cxgb4: add T6 iSCSI completion feature

T6 adapters reduce number of completions to host by generating single
completion for all the directly placed(DDP) iSCSI pdus in a sequence.

This patch adds new structure for completion hw cmd (struct
cpl_rx_iscsi_cmp) and implements T6 completion feature.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Varun Prakash
2016-12-01 20:28:29 +05:30
committed by Martin K. Petersen
orang tua 586be7cb69
melakukan 44830d8fd2
4 mengubah file dengan 226 tambahan dan 26 penghapusan

Melihat File

@@ -1574,6 +1574,25 @@ static int skb_read_pdu_bhs(struct iscsi_conn *conn, struct sk_buff *skb)
return -EIO;
}
if (cxgbi_skcb_test_flag(skb, SKCBF_RX_ISCSI_COMPL) &&
cxgbi_skcb_test_flag(skb, SKCBF_RX_DATA_DDPD)) {
/* If completion flag is set and data is directly
* placed in to the host memory then update
* task->exp_datasn to the datasn in completion
* iSCSI hdr as T6 adapter generates completion only
* for the last pdu of a sequence.
*/
itt_t itt = ((struct iscsi_data *)skb->data)->itt;
struct iscsi_task *task = iscsi_itt_to_ctask(conn, itt);
u32 data_sn = be32_to_cpu(((struct iscsi_data *)
skb->data)->datasn);
if (task && task->sc) {
struct iscsi_tcp_task *tcp_task = task->dd_data;
tcp_task->exp_datasn = data_sn;
}
}
return read_pdu_skb(conn, skb, 0, 0);
}