Skip to content

Commit 21d8c25

Browse files
vinaychelsiodavem330
authored andcommitted
ch_ktls: tcb close causes tls connection failure
HW doesn't need marking TCB closed. This TCB state change sometimes causes problem to the new connection which gets the same tid. Fixes: 34aba2c ("cxgb4/chcr : Register to tls add and del callback") Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com> Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent bc16efd commit 21d8c25

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

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

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -349,18 +349,6 @@ static int chcr_set_tcb_field(struct chcr_ktls_info *tx_info, u16 word,
349349
return cxgb4_ofld_send(tx_info->netdev, skb);
350350
}
351351

352-
/*
353-
* chcr_ktls_mark_tcb_close: mark tcb state to CLOSE
354-
* @tx_info - driver specific tls info.
355-
* return: NET_TX_OK/NET_XMIT_DROP.
356-
*/
357-
static int chcr_ktls_mark_tcb_close(struct chcr_ktls_info *tx_info)
358-
{
359-
return chcr_set_tcb_field(tx_info, TCB_T_STATE_W,
360-
TCB_T_STATE_V(TCB_T_STATE_M),
361-
CHCR_TCB_STATE_CLOSED, 1);
362-
}
363-
364352
/*
365353
* chcr_ktls_dev_del: call back for tls_dev_del.
366354
* Remove the tid and l2t entry and close the connection.
@@ -395,8 +383,6 @@ static void chcr_ktls_dev_del(struct net_device *netdev,
395383

396384
/* clear tid */
397385
if (tx_info->tid != -1) {
398-
/* clear tcb state and then release tid */
399-
chcr_ktls_mark_tcb_close(tx_info);
400386
cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
401387
tx_info->tid, tx_info->ip_family);
402388
}
@@ -574,7 +560,6 @@ static int chcr_ktls_dev_add(struct net_device *netdev, struct sock *sk,
574560
return 0;
575561

576562
free_tid:
577-
chcr_ktls_mark_tcb_close(tx_info);
578563
#if IS_ENABLED(CONFIG_IPV6)
579564
/* clear clip entry */
580565
if (tx_info->ip_family == AF_INET6)
@@ -672,10 +657,6 @@ static int chcr_ktls_cpl_act_open_rpl(struct adapter *adap,
672657
if (tx_info->pending_close) {
673658
spin_unlock(&tx_info->lock);
674659
if (!status) {
675-
/* it's a late success, tcb status is established,
676-
* mark it close.
677-
*/
678-
chcr_ktls_mark_tcb_close(tx_info);
679660
cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
680661
tid, tx_info->ip_family);
681662
}

0 commit comments

Comments
 (0)