linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_common.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (C) 2020 Chelsio Communications.  All rights reserved. */

#ifndef __CHCR_COMMON_H__
#define __CHCR_COMMON_H__

#include "cxgb4.h"

#define CHCR_MAX_SALT
#define CHCR_KEYCTX_MAC_KEY_SIZE_128
#define CHCR_KEYCTX_CIPHER_KEY_SIZE_128
#define CHCR_SCMD_CIPHER_MODE_AES_GCM
#define CHCR_SCMD_CIPHER_MODE_AES_CTR
#define CHCR_CPL_TX_SEC_PDU_LEN_64BIT
#define CHCR_SCMD_SEQ_NO_CTRL_64BIT
#define CHCR_SCMD_PROTO_VERSION_TLS
#define CHCR_SCMD_PROTO_VERSION_GENERIC
#define CHCR_SCMD_AUTH_MODE_GHASH
#define AES_BLOCK_LEN

struct ktls_key_ctx {};

/* Crypto key context */
#define KEY_CONTEXT_CTX_LEN_S
#define KEY_CONTEXT_CTX_LEN_V(x)

#define KEY_CONTEXT_SALT_PRESENT_S
#define KEY_CONTEXT_SALT_PRESENT_V(x)
#define KEY_CONTEXT_SALT_PRESENT_F

#define KEY_CONTEXT_VALID_S
#define KEY_CONTEXT_VALID_V(x)
#define KEY_CONTEXT_VALID_F

#define KEY_CONTEXT_CK_SIZE_S
#define KEY_CONTEXT_CK_SIZE_V(x)

#define KEY_CONTEXT_MK_SIZE_S
#define KEY_CONTEXT_MK_SIZE_V(x)

#define KEY_CONTEXT_OPAD_PRESENT_S
#define KEY_CONTEXT_OPAD_PRESENT_V(x)
#define KEY_CONTEXT_OPAD_PRESENT_F

#define FILL_KEY_CTX_HDR(ck_size, mk_size, ctx_len)

static inline void *chcr_copy_to_txd(const void *src, const struct sge_txq *q,
				     void *pos, int length)
{}

static inline unsigned int chcr_txq_avail(const struct sge_txq *q)
{}

static inline void chcr_txq_advance(struct sge_txq *q, unsigned int n)
{}

static inline void chcr_eth_txq_stop(struct sge_eth_txq *q)
{}

static inline unsigned int chcr_sgl_len(unsigned int n)
{}

static inline unsigned int chcr_flits_to_desc(unsigned int n)
{}
#endif /* __CHCR_COMMON_H__ */