linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2018 Chelsio Communications, Inc.
 */

#ifndef __CHTLS_CM_H__
#define __CHTLS_CM_H__

/*
 * TCB settings
 */
/* 3:0 */
#define TCB_ULP_TYPE_W
#define TCB_ULP_TYPE_S
#define TCB_ULP_TYPE_M
#define TCB_ULP_TYPE_V(x)

/* 11:4 */
#define TCB_ULP_RAW_W
#define TCB_ULP_RAW_S
#define TCB_ULP_RAW_M
#define TCB_ULP_RAW_V(x)

#define TF_TLS_KEY_SIZE_S
#define TF_TLS_KEY_SIZE_V(x)

#define TF_TLS_CONTROL_S
#define TF_TLS_CONTROL_V(x)

#define TF_TLS_ACTIVE_S
#define TF_TLS_ACTIVE_V(x)

#define TF_TLS_ENABLE_S
#define TF_TLS_ENABLE_V(x)

#define TF_RX_QUIESCE_S
#define TF_RX_QUIESCE_V(x)

/*
 * Max receive window supported by HW in bytes.  Only a small part of it can
 * be set through option0, the rest needs to be set through RX_DATA_ACK.
 */
#define MAX_RCV_WND
#define MAX_MSS

/*
 * Min receive window.  We want it to be large enough to accommodate receive
 * coalescing, handle jumbo frames, and not trigger sender SWS avoidance.
 */
#define MIN_RCV_WND
#define LOOPBACK(x)

/* for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */
#define TX_HEADER_LEN
#define TX_TLSHDR_LEN
#define TXDATA_SKB_LEN

enum {};

enum {};

defer_handler_t;
extern struct request_sock_ops chtls_rsk_ops;
extern struct request_sock_ops chtls_rsk_opsv6;

struct deferred_skb_cb {};

#define DEFERRED_SKB_CB(skb)
#define failover_flowc_wr_len
#define WR_SKB_CB(skb)
#define ACCEPT_QUEUE(sk)

#define SND_WSCALE(tp)
#define RCV_WSCALE(tp)
#define USER_MSS(tp)
#define TS_RECENT_STAMP(tp)
#define WSCALE_OK(tp)
#define TSTAMP_OK(tp)
#define SACK_OK(tp)
#define INC_ORPHAN_COUNT(sk)

/* TLS SKB */
#define skb_ulp_tls_inline(skb)
#define skb_ulp_tls_iv_imm(skb)

void chtls_defer_reply(struct sk_buff *skb, struct chtls_dev *dev,
		       defer_handler_t handler);

/*
 * Returns true if the socket is in one of the supplied states.
 */
static inline unsigned int sk_in_state(const struct sock *sk,
				       unsigned int states)
{}

static void chtls_rsk_destructor(struct request_sock *req)
{}

static inline void chtls_init_rsk_ops(struct proto *chtls_tcp_prot,
				      struct request_sock_ops *chtls_tcp_ops,
				      struct proto *tcp_prot, int family)
{}

static inline void chtls_reqsk_free(struct request_sock *req)
{}

#define DECLARE_TASK_FUNC(task, task_param)

static inline void sk_wakeup_sleepers(struct sock *sk, bool interruptable)
{}

static inline void chtls_set_req_port(struct request_sock *oreq,
				      __be16 source, __be16 dest)
{}

static inline void chtls_set_req_addr(struct request_sock *oreq,
				      __be32 local_ip, __be32 peer_ip)
{}

static inline void chtls_free_skb(struct sock *sk, struct sk_buff *skb)
{}

static inline void chtls_kfree_skb(struct sock *sk, struct sk_buff *skb)
{}

static inline void chtls_reset_wr_list(struct chtls_sock *csk)
{}

static inline void enqueue_wr(struct chtls_sock *csk, struct sk_buff *skb)
{}

static inline struct sk_buff *dequeue_wr(struct sock *sk)
{}
#endif