linux/drivers/infiniband/hw/irdma/cm.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2015 - 2021 Intel Corporation */
#ifndef IRDMA_CM_H
#define IRDMA_CM_H

#define IRDMA_MPA_REQUEST_ACCEPT
#define IRDMA_MPA_REQUEST_REJECT

/* IETF MPA -- defines */
#define IEFT_MPA_KEY_REQ
#define IEFT_MPA_KEY_REP
#define IETF_MPA_KEY_SIZE
#define IETF_MPA_VER
#define IETF_MAX_PRIV_DATA_LEN
#define IETF_MPA_FRAME_SIZE
#define IETF_RTR_MSG_SIZE
#define IETF_MPA_V2_FLAG
#define SNDMARKER_SEQNMASK
#define IRDMA_MAX_IETF_SIZE

/* IETF RTR MSG Fields */
#define IETF_PEER_TO_PEER
#define IETF_FLPDU_ZERO_LEN
#define IETF_RDMA0_WRITE
#define IETF_RDMA0_READ
#define IETF_NO_IRD_ORD

#define MAX_PORTS

#define IRDMA_PASSIVE_STATE_INDICATED
#define IRDMA_DO_NOT_SEND_RESET_EVENT
#define IRDMA_SEND_RESET_EVENT

#define MAX_IRDMA_IFS

#define SET_ACK
#define SET_SYN
#define SET_FIN
#define SET_RST

#define TCP_OPTIONS_PADDING

#define IRDMA_DEFAULT_RETRYS
#define IRDMA_DEFAULT_RETRANS
#define IRDMA_DEFAULT_TTL
#define IRDMA_DEFAULT_RTT_VAR
#define IRDMA_DEFAULT_SS_THRESH
#define IRDMA_DEFAULT_REXMIT_THRESH

#define IRDMA_RETRY_TIMEOUT
#define IRDMA_SHORT_TIME
#define IRDMA_LONG_TIME
#define IRDMA_MAX_TIMEOUT

#define IRDMA_CM_HASHTABLE_SIZE
#define IRDMA_CM_TCP_TIMER_INTERVAL
#define IRDMA_CM_DEFAULT_MTU
#define IRDMA_CM_DEFAULT_FRAME_CNT
#define IRDMA_CM_THREAD_STACK_SIZE
#define IRDMA_CM_DEFAULT_RCV_WND
#define IRDMA_CM_DEFAULT_RCV_WND_SCALED
#define IRDMA_CM_DEFAULT_RCV_WND_SCALE
#define IRDMA_CM_DEFAULT_FREE_PKTS
#define IRDMA_CM_FREE_PKT_LO_WATERMARK
#define IRDMA_CM_DEFAULT_MSS
#define IRDMA_CM_DEFAULT_MPA_VER
#define IRDMA_CM_DEFAULT_SEQ
#define IRDMA_CM_DEFAULT_LOCAL_ID
#define IRDMA_CM_DEFAULT_SEQ2
#define IRDMA_CM_DEFAULT_LOCAL_ID2
#define IRDMA_MAX_CM_BUF

enum ietf_mpa_flags {};

enum irdma_timer_type {};

enum option_nums {};

/* cm node transition states */
enum irdma_cm_node_state {};

enum mpa_frame_ver {};

enum mpa_frame_key {};

enum send_rdma0 {};

enum irdma_tcpip_pkt_type {};

enum irdma_cm_listener_state {};

/* CM event codes */
enum irdma_cm_event_type {};

struct ietf_mpa_v1 {};

struct ietf_rtr_msg {};

struct ietf_mpa_v2 {};

struct option_base {};

struct option_mss {};

struct option_windowscale {};

all_known_options;

struct irdma_timer_entry {};

/* CM context params */
struct irdma_cm_tcp_context {};

struct irdma_apbvt_entry {};

struct irdma_cm_listener {};

struct irdma_kmem_info {};

struct irdma_mpa_priv_info {};

struct irdma_cm_node {};

/* Used by internal CM APIs to pass CM information*/
struct irdma_cm_info {};

struct irdma_cm_event {};

struct irdma_cm_core {};

int irdma_schedule_cm_timer(struct irdma_cm_node *cm_node,
			    struct irdma_puda_buf *sqbuf,
			    enum irdma_timer_type type, int send_retrans,
			    int close_when_complete);

static inline u8 irdma_tos2dscp(u8 tos)
{}

int irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param);
int irdma_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len);
int irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param);
int irdma_create_listen(struct iw_cm_id *cm_id, int backlog);
int irdma_destroy_listen(struct iw_cm_id *cm_id);
int irdma_add_arp(struct irdma_pci_f *rf, u32 *ip, bool ipv4, const u8 *mac);
void irdma_cm_teardown_connections(struct irdma_device *iwdev, u32 *ipaddr,
				   struct irdma_cm_info *nfo,
				   bool disconnect_all);
int irdma_cm_start(struct irdma_device *dev);
int irdma_cm_stop(struct irdma_device *dev);
bool irdma_ipv4_is_lpb(u32 loc_addr, u32 rem_addr);
bool irdma_ipv6_is_lpb(u32 *loc_addr, u32 *rem_addr);
int irdma_arp_table(struct irdma_pci_f *rf, u32 *ip_addr, bool ipv4,
		    const u8 *mac_addr, u32 action);
void irdma_if_notify(struct irdma_device *iwdev, struct net_device *netdev,
		     u32 *ipaddr, bool ipv4, bool ifup);
bool irdma_port_in_use(struct irdma_cm_core *cm_core, u16 port);
void irdma_send_ack(struct irdma_cm_node *cm_node);
void irdma_lpb_nop(struct irdma_sc_qp *qp);
void irdma_rem_ref_cm_node(struct irdma_cm_node *cm_node);
void irdma_add_conn_est_qh(struct irdma_cm_node *cm_node);
#endif /* IRDMA_CM_H */