chcr: handle partial end part of a record
authorRohit Maheshwari <rohitm@chelsio.com>
Sat, 7 Mar 2020 14:36:06 +0000 (20:06 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:16:23 +0000 (21:16 -0700)
commit429765a149f18d4c26027a8e9ce12aeae5cd646e
tree9430a2763df11775a13596d9bec20c28e571c3b2
parent5a4b9fe7fece62ecab6fb28fe92362f83b41c33e
chcr: handle partial end part of a record

TCP segment can chop a record in any order. Record can either be
complete or it can be partial (first part which contains header,
middle part which doesn't have header or TAG, and the end part
which contains TAG. This patch handles partial end part of a tx
record. In case of partial end part's, driver will send complete
record to HW, so that HW will calculate GHASH (TAG) of complete
packet.
Also added support to handle multiple records in a segment.

v1->v2:
- miner change in calling chcr_write_cpl_set_tcb_ulp.
- no need of checking return value of chcr_ktls_write_tcp_options.

v3->v4:
- replaced kfree_skb with dev_kfree_skb_any.

Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/crypto/chelsio/chcr_ktls.c