Skip to content

Commit 7d01c42

Browse files
rmchelsiokuba-moo
authored andcommitted
ch_ktls: tcb update fails sometimes
context id and port id should be filled while sending tcb update. Fixes: 5a4b9fe ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 21f82ac commit 7d01c42

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • drivers/net/ethernet/chelsio/inline_crypto/ch_ktls

drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,8 @@ static int chcr_ktls_cpl_set_tcb_rpl(struct adapter *adap, unsigned char *input)
733733
}
734734

735735
static void *__chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
736-
u32 tid, void *pos, u16 word, u64 mask,
736+
u32 tid, void *pos, u16 word,
737+
struct sge_eth_txq *q, u64 mask,
737738
u64 val, u32 reply)
738739
{
739740
struct cpl_set_tcb_field_core *cpl;
@@ -742,7 +743,10 @@ static void *__chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
742743

743744
/* ULP_TXPKT */
744745
txpkt = pos;
745-
txpkt->cmd_dest = htonl(ULPTX_CMD_V(ULP_TX_PKT) | ULP_TXPKT_DEST_V(0));
746+
txpkt->cmd_dest = htonl(ULPTX_CMD_V(ULP_TX_PKT) |
747+
ULP_TXPKT_CHANNELID_V(tx_info->port_id) |
748+
ULP_TXPKT_FID_V(q->q.cntxt_id) |
749+
ULP_TXPKT_RO_F);
746750
txpkt->len = htonl(DIV_ROUND_UP(CHCR_SET_TCB_FIELD_LEN, 16));
747751

748752
/* ULPTX_IDATA sub-command */
@@ -797,15 +801,15 @@ static void *chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
797801
} else {
798802
u8 buf[48] = {0};
799803

800-
__chcr_write_cpl_set_tcb_ulp(tx_info, tid, buf, word,
804+
__chcr_write_cpl_set_tcb_ulp(tx_info, tid, buf, word, q,
801805
mask, val, reply);
802806

803807
return chcr_copy_to_txd(buf, &q->q, pos,
804808
CHCR_SET_TCB_FIELD_LEN);
805809
}
806810
}
807811

808-
pos = __chcr_write_cpl_set_tcb_ulp(tx_info, tid, pos, word,
812+
pos = __chcr_write_cpl_set_tcb_ulp(tx_info, tid, pos, word, q,
809813
mask, val, reply);
810814

811815
/* check again if we are at the end of the queue */

0 commit comments

Comments
 (0)