#include <linux/module.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <linux/skbuff.h>
#include <linux/timer.h>
#include <linux/notifier.h>
#include <linux/inetdevice.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/sched/signal.h>
#include <net/tcp.h>
#include <net/busy_poll.h>
#include <crypto/aes.h>
#include "chtls.h"
#include "chtls_cm.h"
static bool is_tls_tx(struct chtls_sock *csk)
{ … }
static bool is_tls_rx(struct chtls_sock *csk)
{ … }
static int data_sgl_len(const struct sk_buff *skb)
{ … }
static int nos_ivs(struct sock *sk, unsigned int size)
{ … }
static int set_ivs_imm(struct sock *sk, const struct sk_buff *skb)
{ … }
static int max_ivs_size(struct sock *sk, int size)
{ … }
static int ivs_size(struct sock *sk, const struct sk_buff *skb)
{ … }
static int flowc_wr_credits(int nparams, int *flowclenp)
{ … }
static struct sk_buff *create_flowc_wr_skb(struct sock *sk,
struct fw_flowc_wr *flowc,
int flowclen)
{ … }
static int send_flowc_wr(struct sock *sk, struct fw_flowc_wr *flowc,
int flowclen)
{ … }
static u8 tcp_state_to_flowc_state(u8 state)
{ … }
int send_tx_flowc_wr(struct sock *sk, int compl,
u32 snd_nxt, u32 rcv_nxt)
{ … }
static int tls_copy_ivs(struct sock *sk, struct sk_buff *skb)
{ … }
static void tls_copy_tx_key(struct sock *sk, struct sk_buff *skb)
{ … }
static u64 tlstx_incr_seqnum(struct chtls_hws *hws)
{ … }
static bool is_sg_request(const struct sk_buff *skb)
{ … }
static bool skb_urgent(struct sk_buff *skb)
{ … }
static unsigned char tls_content_type(unsigned char content_type)
{ … }
static void tls_tx_data_wr(struct sock *sk, struct sk_buff *skb,
int dlen, int tls_immd, u32 credits,
int expn, int pdus)
{ … }
static int chtls_expansion_size(struct sock *sk, int data_len,
int fullpdu,
unsigned short *pducnt)
{ … }
static void make_tlstx_data_wr(struct sock *sk, struct sk_buff *skb,
int tls_tx_imm, int tls_len, u32 credits)
{ … }
static void make_tx_data_wr(struct sock *sk, struct sk_buff *skb,
unsigned int immdlen, int len,
u32 credits, u32 compl)
{ … }
static int chtls_wr_size(struct chtls_sock *csk, const struct sk_buff *skb,
bool size)
{ … }
static bool is_ofld_imm(struct chtls_sock *csk, const struct sk_buff *skb)
{ … }
static unsigned int calc_tx_flits(const struct sk_buff *skb,
unsigned int immdlen)
{ … }
static void arp_failure_discard(void *handle, struct sk_buff *skb)
{ … }
int chtls_push_frames(struct chtls_sock *csk, int comp)
{ … }
static void mark_urg(struct tcp_sock *tp, int flags,
struct sk_buff *skb)
{ … }
static bool should_push(struct sock *sk)
{ … }
static bool corked(const struct tcp_sock *tp, int flags)
{ … }
static bool send_should_push(struct sock *sk, int flags)
{ … }
void chtls_tcp_push(struct sock *sk, int flags)
{ … }
static int select_size(struct sock *sk, int io_len, int flags, int len)
{ … }
void skb_entail(struct sock *sk, struct sk_buff *skb, int flags)
{ … }
static struct sk_buff *get_tx_skb(struct sock *sk, int size)
{ … }
static struct sk_buff *get_record_skb(struct sock *sk, int size, bool zcopy)
{ … }
static void tx_skb_finalize(struct sk_buff *skb)
{ … }
static void push_frames_if_head(struct sock *sk)
{ … }
static int chtls_skb_copy_to_page_nocache(struct sock *sk,
struct iov_iter *from,
struct sk_buff *skb,
struct page *page,
int off, int copy)
{ … }
static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
{ … }
static int csk_wait_memory(struct chtls_dev *cdev,
struct sock *sk, long *timeo_p)
{ … }
static int chtls_proccess_cmsg(struct sock *sk, struct msghdr *msg,
unsigned char *record_type)
{ … }
int chtls_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
{ … }
void chtls_splice_eof(struct socket *sock)
{ … }
static void chtls_select_window(struct sock *sk)
{ … }
static u32 send_rx_credits(struct chtls_sock *csk, u32 credits)
{ … }
#define CREDIT_RETURN_STATE …
static void chtls_cleanup_rbuf(struct sock *sk, int copied)
{ … }
static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int flags, int *addr_len)
{ … }
static int peekmsg(struct sock *sk, struct msghdr *msg,
size_t len, int flags)
{ … }
int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int flags, int *addr_len)
{ … }