chcr: Handle first or middle part of record
authorRohit Maheshwari <rohitm@chelsio.com>
Sat, 7 Mar 2020 14:36:07 +0000 (20:06 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:16:23 +0000 (21:16 -0700)
commitdc05f3df8faca14b7cebf0b2bbdeef75225d80f7
treeda0198f209638d36353ae4d274748fcfa50d8854
parent429765a149f18d4c26027a8e9ce12aeae5cd646e
chcr: Handle first or middle part of record

This patch contains handling of first part or middle part of the record.
When we get a middle record, we will fetch few already sent bytes to
make packet start 16 byte aligned.
And if the packet has only the header part, we don't need to send it for
packet encryption, send that packet as a plaintext.

v1->v2:
- un-necessary updating left variable.

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_common.h
drivers/crypto/chelsio/chcr_ktls.c
drivers/crypto/chelsio/chcr_ktls.h