Skip to content

Commit

Permalink
chcr: Handle first or middle part of record
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rohit Maheshwari authored and David S. Miller committed Mar 9, 2020
1 parent 429765a commit dc05f3d
Show file tree
Hide file tree
Showing 3 changed files with 489 additions and 2 deletions.
3 changes: 3 additions & 0 deletions drivers/crypto/chelsio/chcr_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
#define CHCR_KEYCTX_MAC_KEY_SIZE_128 0
#define CHCR_KEYCTX_CIPHER_KEY_SIZE_128 0
#define CHCR_SCMD_CIPHER_MODE_AES_GCM 2
#define CHCR_SCMD_CIPHER_MODE_AES_CTR 3
#define CHCR_CPL_TX_SEC_PDU_LEN_64BIT 2
#define CHCR_SCMD_SEQ_NO_CTRL_64BIT 3
#define CHCR_SCMD_PROTO_VERSION_TLS 0
#define CHCR_SCMD_PROTO_VERSION_GENERIC 4
#define CHCR_SCMD_AUTH_MODE_GHASH 4
#define AES_BLOCK_LEN 16

enum chcr_state {
CHCR_INIT = 0,
Expand Down
Loading

0 comments on commit dc05f3d

Please sign in to comment.