1cdcd52d4SBartosz Sobczak /*- 2cdcd52d4SBartosz Sobczak * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB 3cdcd52d4SBartosz Sobczak * 401fbb869SBartosz Sobczak * Copyright (c) 2015 - 2023 Intel Corporation 5cdcd52d4SBartosz Sobczak * 6cdcd52d4SBartosz Sobczak * This software is available to you under a choice of one of two 7cdcd52d4SBartosz Sobczak * licenses. You may choose to be licensed under the terms of the GNU 8cdcd52d4SBartosz Sobczak * General Public License (GPL) Version 2, available from the file 9cdcd52d4SBartosz Sobczak * COPYING in the main directory of this source tree, or the 10cdcd52d4SBartosz Sobczak * OpenFabrics.org BSD license below: 11cdcd52d4SBartosz Sobczak * 12cdcd52d4SBartosz Sobczak * Redistribution and use in source and binary forms, with or 13cdcd52d4SBartosz Sobczak * without modification, are permitted provided that the following 14cdcd52d4SBartosz Sobczak * conditions are met: 15cdcd52d4SBartosz Sobczak * 16cdcd52d4SBartosz Sobczak * - Redistributions of source code must retain the above 17cdcd52d4SBartosz Sobczak * copyright notice, this list of conditions and the following 18cdcd52d4SBartosz Sobczak * disclaimer. 19cdcd52d4SBartosz Sobczak * 20cdcd52d4SBartosz Sobczak * - Redistributions in binary form must reproduce the above 21cdcd52d4SBartosz Sobczak * copyright notice, this list of conditions and the following 22cdcd52d4SBartosz Sobczak * disclaimer in the documentation and/or other materials 23cdcd52d4SBartosz Sobczak * provided with the distribution. 24cdcd52d4SBartosz Sobczak * 25cdcd52d4SBartosz Sobczak * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26cdcd52d4SBartosz Sobczak * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27cdcd52d4SBartosz Sobczak * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28cdcd52d4SBartosz Sobczak * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29cdcd52d4SBartosz Sobczak * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30cdcd52d4SBartosz Sobczak * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31cdcd52d4SBartosz Sobczak * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32cdcd52d4SBartosz Sobczak * SOFTWARE. 33cdcd52d4SBartosz Sobczak */ 34cdcd52d4SBartosz Sobczak 35cdcd52d4SBartosz Sobczak #ifndef IRDMA_MAIN_H 36cdcd52d4SBartosz Sobczak #define IRDMA_MAIN_H 37cdcd52d4SBartosz Sobczak 38cdcd52d4SBartosz Sobczak #include <linux/in.h> 39cdcd52d4SBartosz Sobczak #include <netinet/ip6.h> 40cdcd52d4SBartosz Sobczak #include <netinet/udp.h> 41cdcd52d4SBartosz Sobczak #include <netinet/tcp.h> 42cdcd52d4SBartosz Sobczak #include <sys/socket.h> 43cdcd52d4SBartosz Sobczak #include <netinet/if_ether.h> 44cdcd52d4SBartosz Sobczak #include <linux/slab.h> 45cdcd52d4SBartosz Sobczak #include <linux/rculist.h> 46a527c18cSBartosz Sobczak #if __FreeBSD_version >= 1400000 47777e472cSBartosz Sobczak #include <rdma/uverbs_ioctl.h> 48a527c18cSBartosz Sobczak #endif 49cdcd52d4SBartosz Sobczak #include <rdma/ib_smi.h> 50cdcd52d4SBartosz Sobczak #include <rdma/ib_verbs.h> 51cdcd52d4SBartosz Sobczak #include <rdma/ib_pack.h> 52cdcd52d4SBartosz Sobczak #include <rdma/rdma_cm.h> 53cdcd52d4SBartosz Sobczak #include <rdma/iw_cm.h> 54cdcd52d4SBartosz Sobczak #include <rdma/ib_user_verbs.h> 55cdcd52d4SBartosz Sobczak #include <rdma/ib_umem.h> 56cdcd52d4SBartosz Sobczak #include <rdma/ib_cache.h> 57cdcd52d4SBartosz Sobczak #include "osdep.h" 58cdcd52d4SBartosz Sobczak #include "irdma_defs.h" 59cdcd52d4SBartosz Sobczak #include "irdma_hmc.h" 60cdcd52d4SBartosz Sobczak #include "irdma_type.h" 61cdcd52d4SBartosz Sobczak #include "irdma_ws.h" 62cdcd52d4SBartosz Sobczak #include "irdma_protos.h" 63cdcd52d4SBartosz Sobczak #include "irdma_pble.h" 64cdcd52d4SBartosz Sobczak #include "irdma_cm.h" 65cdcd52d4SBartosz Sobczak #include "fbsd_kcompat.h" 66cdcd52d4SBartosz Sobczak #include "irdma-abi.h" 67cdcd52d4SBartosz Sobczak #include "irdma_verbs.h" 68cdcd52d4SBartosz Sobczak #include "irdma_user.h" 69cdcd52d4SBartosz Sobczak #include "irdma_puda.h" 70cdcd52d4SBartosz Sobczak 71cdcd52d4SBartosz Sobczak extern struct list_head irdma_handlers; 72cdcd52d4SBartosz Sobczak extern spinlock_t irdma_handler_lock; 73cdcd52d4SBartosz Sobczak extern bool irdma_upload_context; 74cdcd52d4SBartosz Sobczak 75cdcd52d4SBartosz Sobczak #define IRDMA_FW_VER_DEFAULT 2 76cdcd52d4SBartosz Sobczak #define IRDMA_HW_VER 2 77cdcd52d4SBartosz Sobczak 78cdcd52d4SBartosz Sobczak #define IRDMA_ARP_ADD 1 79cdcd52d4SBartosz Sobczak #define IRDMA_ARP_DELETE 2 80cdcd52d4SBartosz Sobczak #define IRDMA_ARP_RESOLVE 3 81cdcd52d4SBartosz Sobczak 82cdcd52d4SBartosz Sobczak #define IRDMA_MACIP_ADD 1 83cdcd52d4SBartosz Sobczak #define IRDMA_MACIP_DELETE 2 84cdcd52d4SBartosz Sobczak 85cdcd52d4SBartosz Sobczak #define IW_CCQ_SIZE (IRDMA_CQP_SW_SQSIZE_2048 + 1) 86cdcd52d4SBartosz Sobczak #define IW_CEQ_SIZE 2048 87cdcd52d4SBartosz Sobczak #define IW_AEQ_SIZE 2048 88cdcd52d4SBartosz Sobczak 89cdcd52d4SBartosz Sobczak #define RX_BUF_SIZE (1536 + 8) 90cdcd52d4SBartosz Sobczak #define IW_REG0_SIZE (4 * 1024) 91cdcd52d4SBartosz Sobczak #define IW_TX_TIMEOUT (6 * HZ) 92cdcd52d4SBartosz Sobczak #define IW_FIRST_QPN 1 93cdcd52d4SBartosz Sobczak 94cdcd52d4SBartosz Sobczak #define IW_SW_CONTEXT_ALIGN 1024 95cdcd52d4SBartosz Sobczak 96cdcd52d4SBartosz Sobczak #define MAX_DPC_ITERATIONS 128 97cdcd52d4SBartosz Sobczak 98cdcd52d4SBartosz Sobczak #define IRDMA_EVENT_TIMEOUT_MS 5000 99cdcd52d4SBartosz Sobczak #define IRDMA_VCHNL_EVENT_TIMEOUT_MS 10000 100cdcd52d4SBartosz Sobczak #define IRDMA_RST_TIMEOUT_HZ 4 101cdcd52d4SBartosz Sobczak 102cdcd52d4SBartosz Sobczak #define IRDMA_NO_QSET 0xffff 103cdcd52d4SBartosz Sobczak 104cdcd52d4SBartosz Sobczak #define IW_CFG_FPM_QP_COUNT 32768 105777e472cSBartosz Sobczak #define IRDMA_MAX_PAGES_PER_FMR 262144 106cdcd52d4SBartosz Sobczak #define IRDMA_MIN_PAGES_PER_FMR 1 107cdcd52d4SBartosz Sobczak #define IRDMA_CQP_COMPL_RQ_WQE_FLUSHED 2 108cdcd52d4SBartosz Sobczak #define IRDMA_CQP_COMPL_SQ_WQE_FLUSHED 3 109cdcd52d4SBartosz Sobczak 110cdcd52d4SBartosz Sobczak #define IRDMA_Q_TYPE_PE_AEQ 0x80 111cdcd52d4SBartosz Sobczak #define IRDMA_Q_INVALID_IDX 0xffff 112cdcd52d4SBartosz Sobczak #define IRDMA_REM_ENDPOINT_TRK_QPID 3 113cdcd52d4SBartosz Sobczak 114cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_ENA_MPA_VER_0 0x00000001 115cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DISABLE_MPA_CRC 0x00000002 116cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DISABLE_FIRST_WRITE 0x00000004 117cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DISABLE_INTF 0x00000008 118cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_ENA_MSI 0x00000010 119cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DUAL_LOGICAL_PORT 0x00000020 120cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_NO_INLINE_DATA 0x00000080 121cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DISABLE_INT_MOD 0x00000100 122cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_DISABLE_VIRT_WQ 0x00000200 123cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_ENA_PAU 0x00000400 124cdcd52d4SBartosz Sobczak #define IRDMA_DRV_OPT_MCAST_LOGPORT_MAP 0x00000800 125cdcd52d4SBartosz Sobczak 126cdcd52d4SBartosz Sobczak #define IW_HMC_OBJ_TYPE_NUM ARRAY_SIZE(iw_hmc_obj_types) 127cdcd52d4SBartosz Sobczak #define IRDMA_ROCE_CWND_DEFAULT 0x400 128cdcd52d4SBartosz Sobczak #define IRDMA_ROCE_ACKCREDS_DEFAULT 0x1E 129cdcd52d4SBartosz Sobczak 130cdcd52d4SBartosz Sobczak #define IRDMA_FLUSH_SQ BIT(0) 131cdcd52d4SBartosz Sobczak #define IRDMA_FLUSH_RQ BIT(1) 132cdcd52d4SBartosz Sobczak #define IRDMA_REFLUSH BIT(2) 133cdcd52d4SBartosz Sobczak #define IRDMA_FLUSH_WAIT BIT(3) 134cdcd52d4SBartosz Sobczak 13535105900SBartosz Sobczak #define IRDMA_IRQ_NAME_STR_LEN 64 13635105900SBartosz Sobczak 137cdcd52d4SBartosz Sobczak enum init_completion_state { 138cdcd52d4SBartosz Sobczak INVALID_STATE = 0, 139cdcd52d4SBartosz Sobczak INITIAL_STATE, 140cdcd52d4SBartosz Sobczak CQP_CREATED, 141cdcd52d4SBartosz Sobczak HMC_OBJS_CREATED, 142cdcd52d4SBartosz Sobczak HW_RSRC_INITIALIZED, 143cdcd52d4SBartosz Sobczak CCQ_CREATED, 144cdcd52d4SBartosz Sobczak CEQ0_CREATED, /* Last state of probe */ 145cdcd52d4SBartosz Sobczak ILQ_CREATED, 146cdcd52d4SBartosz Sobczak IEQ_CREATED, 147cdcd52d4SBartosz Sobczak REM_ENDPOINT_TRK_CREATED, 148cdcd52d4SBartosz Sobczak CEQS_CREATED, 149cdcd52d4SBartosz Sobczak PBLE_CHUNK_MEM, 150cdcd52d4SBartosz Sobczak AEQ_CREATED, 151cdcd52d4SBartosz Sobczak IP_ADDR_REGISTERED, /* Last state of open */ 152cdcd52d4SBartosz Sobczak }; 153cdcd52d4SBartosz Sobczak 15401fbb869SBartosz Sobczak struct ae_desc { 15501fbb869SBartosz Sobczak u16 id; 15601fbb869SBartosz Sobczak const char *desc; 15701fbb869SBartosz Sobczak }; 15801fbb869SBartosz Sobczak 159cdcd52d4SBartosz Sobczak struct irdma_rsrc_limits { 160cdcd52d4SBartosz Sobczak u32 qplimit; 161cdcd52d4SBartosz Sobczak u32 mrlimit; 162cdcd52d4SBartosz Sobczak u32 cqlimit; 163cdcd52d4SBartosz Sobczak }; 164cdcd52d4SBartosz Sobczak 165cdcd52d4SBartosz Sobczak struct irdma_cqp_err_info { 166cdcd52d4SBartosz Sobczak u16 maj; 167cdcd52d4SBartosz Sobczak u16 min; 168cdcd52d4SBartosz Sobczak const char *desc; 169cdcd52d4SBartosz Sobczak }; 170cdcd52d4SBartosz Sobczak 171cdcd52d4SBartosz Sobczak struct irdma_cqp_compl_info { 172cdcd52d4SBartosz Sobczak u32 op_ret_val; 173cdcd52d4SBartosz Sobczak u16 maj_err_code; 174cdcd52d4SBartosz Sobczak u16 min_err_code; 175cdcd52d4SBartosz Sobczak bool error; 176cdcd52d4SBartosz Sobczak u8 op_code; 177cdcd52d4SBartosz Sobczak }; 178cdcd52d4SBartosz Sobczak 179cdcd52d4SBartosz Sobczak struct irdma_cqp_request { 180cdcd52d4SBartosz Sobczak struct cqp_cmds_info info; 181cdcd52d4SBartosz Sobczak wait_queue_head_t waitq; 182cdcd52d4SBartosz Sobczak struct list_head list; 183cdcd52d4SBartosz Sobczak atomic_t refcnt; 184cdcd52d4SBartosz Sobczak void (*callback_fcn)(struct irdma_cqp_request *cqp_request); 185cdcd52d4SBartosz Sobczak void *param; 186cdcd52d4SBartosz Sobczak struct irdma_cqp_compl_info compl_info; 18701fbb869SBartosz Sobczak bool request_done; /* READ/WRITE_ONCE macros operate on it */ 188cdcd52d4SBartosz Sobczak bool waiting:1; 189cdcd52d4SBartosz Sobczak bool dynamic:1; 190cdcd52d4SBartosz Sobczak }; 191cdcd52d4SBartosz Sobczak 192cdcd52d4SBartosz Sobczak struct irdma_cqp { 193cdcd52d4SBartosz Sobczak struct irdma_sc_cqp sc_cqp; 194cdcd52d4SBartosz Sobczak spinlock_t req_lock; /* protect CQP request list */ 195cdcd52d4SBartosz Sobczak spinlock_t compl_lock; /* protect CQP completion processing */ 196cdcd52d4SBartosz Sobczak wait_queue_head_t waitq; 197cdcd52d4SBartosz Sobczak wait_queue_head_t remove_wq; 198cdcd52d4SBartosz Sobczak struct irdma_dma_mem sq; 199cdcd52d4SBartosz Sobczak struct irdma_dma_mem host_ctx; 200cdcd52d4SBartosz Sobczak u64 *scratch_array; 201cdcd52d4SBartosz Sobczak struct irdma_cqp_request *cqp_requests; 202cdcd52d4SBartosz Sobczak struct list_head cqp_avail_reqs; 203cdcd52d4SBartosz Sobczak struct list_head cqp_pending_reqs; 204cdcd52d4SBartosz Sobczak }; 205cdcd52d4SBartosz Sobczak 206cdcd52d4SBartosz Sobczak struct irdma_ccq { 207cdcd52d4SBartosz Sobczak struct irdma_sc_cq sc_cq; 208cdcd52d4SBartosz Sobczak struct irdma_dma_mem mem_cq; 209cdcd52d4SBartosz Sobczak struct irdma_dma_mem shadow_area; 210cdcd52d4SBartosz Sobczak }; 211cdcd52d4SBartosz Sobczak 212cdcd52d4SBartosz Sobczak struct irdma_ceq { 213cdcd52d4SBartosz Sobczak struct irdma_sc_ceq sc_ceq; 214cdcd52d4SBartosz Sobczak struct irdma_dma_mem mem; 215cdcd52d4SBartosz Sobczak u32 irq; 216cdcd52d4SBartosz Sobczak u32 msix_idx; 217cdcd52d4SBartosz Sobczak struct irdma_pci_f *rf; 218cdcd52d4SBartosz Sobczak struct tasklet_struct dpc_tasklet; 219cdcd52d4SBartosz Sobczak spinlock_t ce_lock; /* sync cq destroy with cq completion event notification */ 220cdcd52d4SBartosz Sobczak }; 221cdcd52d4SBartosz Sobczak 222cdcd52d4SBartosz Sobczak struct irdma_aeq { 223cdcd52d4SBartosz Sobczak struct irdma_sc_aeq sc_aeq; 224cdcd52d4SBartosz Sobczak struct irdma_dma_mem mem; 225cdcd52d4SBartosz Sobczak struct irdma_pble_alloc palloc; 226cdcd52d4SBartosz Sobczak bool virtual_map; 227cdcd52d4SBartosz Sobczak }; 228cdcd52d4SBartosz Sobczak 229cdcd52d4SBartosz Sobczak struct irdma_arp_entry { 230cdcd52d4SBartosz Sobczak u32 ip_addr[4]; 23101fbb869SBartosz Sobczak u8 mac_addr[ETHER_ADDR_LEN]; 232cdcd52d4SBartosz Sobczak }; 233cdcd52d4SBartosz Sobczak 234cdcd52d4SBartosz Sobczak struct irdma_msix_vector { 235cdcd52d4SBartosz Sobczak u32 idx; 236cdcd52d4SBartosz Sobczak u32 irq; 237cdcd52d4SBartosz Sobczak u32 cpu_affinity; 238cdcd52d4SBartosz Sobczak u32 ceq_id; 23935105900SBartosz Sobczak char name[IRDMA_IRQ_NAME_STR_LEN]; 240cdcd52d4SBartosz Sobczak struct resource *res; 241cdcd52d4SBartosz Sobczak void *tag; 242cdcd52d4SBartosz Sobczak }; 243cdcd52d4SBartosz Sobczak 244cdcd52d4SBartosz Sobczak struct irdma_mc_table_info { 245cdcd52d4SBartosz Sobczak u32 mgn; 246cdcd52d4SBartosz Sobczak u32 dest_ip[4]; 247cdcd52d4SBartosz Sobczak bool lan_fwd:1; 248cdcd52d4SBartosz Sobczak bool ipv4_valid:1; 249cdcd52d4SBartosz Sobczak }; 250cdcd52d4SBartosz Sobczak 251cdcd52d4SBartosz Sobczak struct mc_table_list { 252cdcd52d4SBartosz Sobczak struct list_head list; 253cdcd52d4SBartosz Sobczak struct irdma_mc_table_info mc_info; 254cdcd52d4SBartosz Sobczak struct irdma_mcast_grp_info mc_grp_ctx; 255cdcd52d4SBartosz Sobczak }; 256cdcd52d4SBartosz Sobczak 257cdcd52d4SBartosz Sobczak struct irdma_qv_info { 258cdcd52d4SBartosz Sobczak u32 v_idx; /* msix_vector */ 259cdcd52d4SBartosz Sobczak u16 ceq_idx; 260cdcd52d4SBartosz Sobczak u16 aeq_idx; 261cdcd52d4SBartosz Sobczak u8 itr_idx; 262cdcd52d4SBartosz Sobczak }; 263cdcd52d4SBartosz Sobczak 264cdcd52d4SBartosz Sobczak struct irdma_qvlist_info { 265cdcd52d4SBartosz Sobczak u32 num_vectors; 266cdcd52d4SBartosz Sobczak struct irdma_qv_info qv_info[1]; 267cdcd52d4SBartosz Sobczak }; 268cdcd52d4SBartosz Sobczak 269cdcd52d4SBartosz Sobczak struct irdma_gen_ops { 270cdcd52d4SBartosz Sobczak void (*request_reset)(struct irdma_pci_f *rf); 271cdcd52d4SBartosz Sobczak int (*register_qset)(struct irdma_sc_vsi *vsi, 272cdcd52d4SBartosz Sobczak struct irdma_ws_node *tc_node); 273cdcd52d4SBartosz Sobczak void (*unregister_qset)(struct irdma_sc_vsi *vsi, 274cdcd52d4SBartosz Sobczak struct irdma_ws_node *tc_node); 275cdcd52d4SBartosz Sobczak }; 276cdcd52d4SBartosz Sobczak 277cdcd52d4SBartosz Sobczak struct irdma_pci_f { 278cdcd52d4SBartosz Sobczak bool reset:1; 279cdcd52d4SBartosz Sobczak bool rsrc_created:1; 280cdcd52d4SBartosz Sobczak bool msix_shared:1; 281cdcd52d4SBartosz Sobczak bool ftype:1; 282cdcd52d4SBartosz Sobczak u8 rsrc_profile; 283cdcd52d4SBartosz Sobczak u8 *hmc_info_mem; 284cdcd52d4SBartosz Sobczak u8 *mem_rsrc; 285cdcd52d4SBartosz Sobczak u8 rdma_ver; 286cdcd52d4SBartosz Sobczak u8 rst_to; 287777e472cSBartosz Sobczak /* Not used in SRIOV VF mode */ 288777e472cSBartosz Sobczak u8 pf_id; 289cdcd52d4SBartosz Sobczak enum irdma_protocol_used protocol_used; 290cdcd52d4SBartosz Sobczak bool en_rem_endpoint_trk:1; 291cdcd52d4SBartosz Sobczak bool dcqcn_ena:1; 292cdcd52d4SBartosz Sobczak u32 sd_type; 293cdcd52d4SBartosz Sobczak u32 msix_count; 294cdcd52d4SBartosz Sobczak u32 max_mr; 295cdcd52d4SBartosz Sobczak u32 max_qp; 296cdcd52d4SBartosz Sobczak u32 max_cq; 297cdcd52d4SBartosz Sobczak u32 max_ah; 298cdcd52d4SBartosz Sobczak u32 next_ah; 299cdcd52d4SBartosz Sobczak u32 max_mcg; 300cdcd52d4SBartosz Sobczak u32 next_mcg; 301cdcd52d4SBartosz Sobczak u32 max_pd; 302cdcd52d4SBartosz Sobczak u32 next_qp; 303cdcd52d4SBartosz Sobczak u32 next_cq; 304cdcd52d4SBartosz Sobczak u32 next_pd; 305cdcd52d4SBartosz Sobczak u32 max_mr_size; 306cdcd52d4SBartosz Sobczak u32 max_cqe; 307cdcd52d4SBartosz Sobczak u32 mr_stagmask; 308cdcd52d4SBartosz Sobczak u32 used_pds; 309cdcd52d4SBartosz Sobczak u32 used_cqs; 310cdcd52d4SBartosz Sobczak u32 used_mrs; 311cdcd52d4SBartosz Sobczak u32 used_qps; 312cdcd52d4SBartosz Sobczak u32 arp_table_size; 313cdcd52d4SBartosz Sobczak u32 next_arp_index; 314cdcd52d4SBartosz Sobczak u32 ceqs_count; 315cdcd52d4SBartosz Sobczak u32 next_ws_node_id; 316cdcd52d4SBartosz Sobczak u32 max_ws_node_id; 317cdcd52d4SBartosz Sobczak u32 limits_sel; 318cdcd52d4SBartosz Sobczak unsigned long *allocated_ws_nodes; 319cdcd52d4SBartosz Sobczak unsigned long *allocated_qps; 320cdcd52d4SBartosz Sobczak unsigned long *allocated_cqs; 321cdcd52d4SBartosz Sobczak unsigned long *allocated_mrs; 322cdcd52d4SBartosz Sobczak unsigned long *allocated_pds; 323cdcd52d4SBartosz Sobczak unsigned long *allocated_mcgs; 324cdcd52d4SBartosz Sobczak unsigned long *allocated_ahs; 325cdcd52d4SBartosz Sobczak unsigned long *allocated_arps; 326cdcd52d4SBartosz Sobczak enum init_completion_state init_state; 327cdcd52d4SBartosz Sobczak struct irdma_sc_dev sc_dev; 328cdcd52d4SBartosz Sobczak struct irdma_dev_ctx dev_ctx; 329cdcd52d4SBartosz Sobczak struct irdma_tunable_info tun_info; 330cdcd52d4SBartosz Sobczak eventhandler_tag irdma_ifaddr_event; 331cdcd52d4SBartosz Sobczak struct irdma_handler *hdl; 332cdcd52d4SBartosz Sobczak struct pci_dev *pcidev; 333cdcd52d4SBartosz Sobczak struct ice_rdma_peer *peer_info; 334cdcd52d4SBartosz Sobczak struct irdma_hw hw; 335cdcd52d4SBartosz Sobczak struct irdma_cqp cqp; 336cdcd52d4SBartosz Sobczak struct irdma_ccq ccq; 337cdcd52d4SBartosz Sobczak struct irdma_aeq aeq; 338cdcd52d4SBartosz Sobczak struct irdma_ceq *ceqlist; 339cdcd52d4SBartosz Sobczak struct irdma_hmc_pble_rsrc *pble_rsrc; 340cdcd52d4SBartosz Sobczak struct irdma_arp_entry *arp_table; 341cdcd52d4SBartosz Sobczak spinlock_t arp_lock; /*protect ARP table access*/ 342cdcd52d4SBartosz Sobczak spinlock_t rsrc_lock; /* protect HW resource array access */ 343cdcd52d4SBartosz Sobczak spinlock_t qptable_lock; /*protect QP table access*/ 344cdcd52d4SBartosz Sobczak spinlock_t cqtable_lock; /*protect CQ table access*/ 345cdcd52d4SBartosz Sobczak struct irdma_qp **qp_table; 346cdcd52d4SBartosz Sobczak struct irdma_cq **cq_table; 347cdcd52d4SBartosz Sobczak spinlock_t qh_list_lock; /* protect mc_qht_list */ 348cdcd52d4SBartosz Sobczak struct mc_table_list mc_qht_list; 349cdcd52d4SBartosz Sobczak struct irdma_msix_vector *iw_msixtbl; 350cdcd52d4SBartosz Sobczak struct irdma_qvlist_info *iw_qvlist; 351cdcd52d4SBartosz Sobczak struct tasklet_struct dpc_tasklet; 352cdcd52d4SBartosz Sobczak struct msix_entry msix_info; 353cdcd52d4SBartosz Sobczak struct irdma_dma_mem obj_mem; 354cdcd52d4SBartosz Sobczak struct irdma_dma_mem obj_next; 355cdcd52d4SBartosz Sobczak atomic_t vchnl_msgs; 356cdcd52d4SBartosz Sobczak wait_queue_head_t vchnl_waitq; 357cdcd52d4SBartosz Sobczak struct workqueue_struct *cqp_cmpl_wq; 358cdcd52d4SBartosz Sobczak struct work_struct cqp_cmpl_work; 359cdcd52d4SBartosz Sobczak struct irdma_sc_vsi default_vsi; 360cdcd52d4SBartosz Sobczak void *back_fcn; 361cdcd52d4SBartosz Sobczak struct irdma_gen_ops gen_ops; 362cdcd52d4SBartosz Sobczak void (*check_fc)(struct irdma_sc_vsi *vsi, struct irdma_sc_qp *sc_qp); 363cdcd52d4SBartosz Sobczak struct irdma_dcqcn_cc_params dcqcn_params; 364cdcd52d4SBartosz Sobczak struct irdma_device *iwdev; 365cdcd52d4SBartosz Sobczak }; 366cdcd52d4SBartosz Sobczak 367cdcd52d4SBartosz Sobczak struct irdma_device { 368cdcd52d4SBartosz Sobczak struct ib_device ibdev; 369cdcd52d4SBartosz Sobczak struct irdma_pci_f *rf; 370cfaab41cSJustin Hibbits if_t netdev; 371777e472cSBartosz Sobczak struct notifier_block nb_netdevice_event; 372cdcd52d4SBartosz Sobczak struct irdma_handler *hdl; 373cdcd52d4SBartosz Sobczak struct workqueue_struct *cleanup_wq; 374cdcd52d4SBartosz Sobczak struct irdma_sc_vsi vsi; 375cdcd52d4SBartosz Sobczak struct irdma_cm_core cm_core; 376cdcd52d4SBartosz Sobczak u32 roce_cwnd; 377cdcd52d4SBartosz Sobczak u32 roce_ackcreds; 378cdcd52d4SBartosz Sobczak u32 vendor_id; 379cdcd52d4SBartosz Sobczak u32 vendor_part_id; 380cdcd52d4SBartosz Sobczak u32 push_mode; 381cdcd52d4SBartosz Sobczak u32 rcv_wnd; 382cdcd52d4SBartosz Sobczak u16 mac_ip_table_idx; 383cdcd52d4SBartosz Sobczak u16 vsi_num; 384cdcd52d4SBartosz Sobczak u8 rcv_wscale; 385cdcd52d4SBartosz Sobczak u8 iw_status; 38635105900SBartosz Sobczak u8 roce_rtomin; 387cdcd52d4SBartosz Sobczak u8 rd_fence_rate; 388777e472cSBartosz Sobczak bool override_rcv_wnd:1; 389777e472cSBartosz Sobczak bool override_cwnd:1; 390777e472cSBartosz Sobczak bool override_ackcreds:1; 391777e472cSBartosz Sobczak bool override_ooo:1; 392777e472cSBartosz Sobczak bool override_rd_fence_rate:1; 393777e472cSBartosz Sobczak bool override_rtomin:1; 394cdcd52d4SBartosz Sobczak bool roce_mode:1; 395cdcd52d4SBartosz Sobczak bool roce_dcqcn_en:1; 396cdcd52d4SBartosz Sobczak bool dcb_vlan_mode:1; 397cdcd52d4SBartosz Sobczak bool iw_ooo:1; 398cdcd52d4SBartosz Sobczak enum init_completion_state init_state; 399cdcd52d4SBartosz Sobczak 400cdcd52d4SBartosz Sobczak wait_queue_head_t suspend_wq; 401cdcd52d4SBartosz Sobczak }; 402cdcd52d4SBartosz Sobczak 403cdcd52d4SBartosz Sobczak struct irdma_handler { 404cdcd52d4SBartosz Sobczak struct list_head list; 405cdcd52d4SBartosz Sobczak struct irdma_device *iwdev; 406cdcd52d4SBartosz Sobczak struct task deferred_task; 407cdcd52d4SBartosz Sobczak struct taskqueue *deferred_tq; 408cdcd52d4SBartosz Sobczak bool shared_res_created; 409cdcd52d4SBartosz Sobczak }; 410cdcd52d4SBartosz Sobczak 411cdcd52d4SBartosz Sobczak static inline struct irdma_device *to_iwdev(struct ib_device *ibdev) 412cdcd52d4SBartosz Sobczak { 413cdcd52d4SBartosz Sobczak return container_of(ibdev, struct irdma_device, ibdev); 414cdcd52d4SBartosz Sobczak } 415cdcd52d4SBartosz Sobczak 416cdcd52d4SBartosz Sobczak static inline struct irdma_ucontext *to_ucontext(struct ib_ucontext *ibucontext) 417cdcd52d4SBartosz Sobczak { 418cdcd52d4SBartosz Sobczak return container_of(ibucontext, struct irdma_ucontext, ibucontext); 419cdcd52d4SBartosz Sobczak } 420cdcd52d4SBartosz Sobczak 421a527c18cSBartosz Sobczak #if __FreeBSD_version >= 1400026 422cdcd52d4SBartosz Sobczak static inline struct irdma_user_mmap_entry * 423cdcd52d4SBartosz Sobczak to_irdma_mmap_entry(struct rdma_user_mmap_entry *rdma_entry) 424cdcd52d4SBartosz Sobczak { 425cdcd52d4SBartosz Sobczak return container_of(rdma_entry, struct irdma_user_mmap_entry, 426cdcd52d4SBartosz Sobczak rdma_entry); 427cdcd52d4SBartosz Sobczak } 428cdcd52d4SBartosz Sobczak 429a527c18cSBartosz Sobczak #endif 430cdcd52d4SBartosz Sobczak static inline struct irdma_pd *to_iwpd(struct ib_pd *ibpd) 431cdcd52d4SBartosz Sobczak { 432cdcd52d4SBartosz Sobczak return container_of(ibpd, struct irdma_pd, ibpd); 433cdcd52d4SBartosz Sobczak } 434cdcd52d4SBartosz Sobczak 435cdcd52d4SBartosz Sobczak static inline struct irdma_ah *to_iwah(struct ib_ah *ibah) 436cdcd52d4SBartosz Sobczak { 437cdcd52d4SBartosz Sobczak return container_of(ibah, struct irdma_ah, ibah); 438cdcd52d4SBartosz Sobczak } 439cdcd52d4SBartosz Sobczak 440cdcd52d4SBartosz Sobczak static inline struct irdma_mr *to_iwmr(struct ib_mr *ibmr) 441cdcd52d4SBartosz Sobczak { 442cdcd52d4SBartosz Sobczak return container_of(ibmr, struct irdma_mr, ibmr); 443cdcd52d4SBartosz Sobczak } 444cdcd52d4SBartosz Sobczak 445cdcd52d4SBartosz Sobczak static inline struct irdma_mr *to_iwmw(struct ib_mw *ibmw) 446cdcd52d4SBartosz Sobczak { 447cdcd52d4SBartosz Sobczak return container_of(ibmw, struct irdma_mr, ibmw); 448cdcd52d4SBartosz Sobczak } 449cdcd52d4SBartosz Sobczak 450cdcd52d4SBartosz Sobczak static inline struct irdma_cq *to_iwcq(struct ib_cq *ibcq) 451cdcd52d4SBartosz Sobczak { 452cdcd52d4SBartosz Sobczak return container_of(ibcq, struct irdma_cq, ibcq); 453cdcd52d4SBartosz Sobczak } 454cdcd52d4SBartosz Sobczak 455cdcd52d4SBartosz Sobczak static inline struct irdma_qp *to_iwqp(struct ib_qp *ibqp) 456cdcd52d4SBartosz Sobczak { 457cdcd52d4SBartosz Sobczak return container_of(ibqp, struct irdma_qp, ibqp); 458cdcd52d4SBartosz Sobczak } 459cdcd52d4SBartosz Sobczak 460cdcd52d4SBartosz Sobczak static inline struct irdma_pci_f *dev_to_rf(struct irdma_sc_dev *dev) 461cdcd52d4SBartosz Sobczak { 462cdcd52d4SBartosz Sobczak return container_of(dev, struct irdma_pci_f, sc_dev); 463cdcd52d4SBartosz Sobczak } 464cdcd52d4SBartosz Sobczak 465cdcd52d4SBartosz Sobczak /** 466cdcd52d4SBartosz Sobczak * irdma_alloc_resource - allocate a resource 467cdcd52d4SBartosz Sobczak * @iwdev: device pointer 468cdcd52d4SBartosz Sobczak * @resource_array: resource bit array: 469cdcd52d4SBartosz Sobczak * @max_resources: maximum resource number 470cdcd52d4SBartosz Sobczak * @req_resources_num: Allocated resource number 471cdcd52d4SBartosz Sobczak * @next: next free id 472cdcd52d4SBartosz Sobczak **/ 473cdcd52d4SBartosz Sobczak static inline int irdma_alloc_rsrc(struct irdma_pci_f *rf, 474cdcd52d4SBartosz Sobczak unsigned long *rsrc_array, u32 max_rsrc, 475cdcd52d4SBartosz Sobczak u32 *req_rsrc_num, u32 *next) 476cdcd52d4SBartosz Sobczak { 477cdcd52d4SBartosz Sobczak u32 rsrc_num; 478cdcd52d4SBartosz Sobczak unsigned long flags; 479cdcd52d4SBartosz Sobczak 480cdcd52d4SBartosz Sobczak spin_lock_irqsave(&rf->rsrc_lock, flags); 481cdcd52d4SBartosz Sobczak rsrc_num = find_next_zero_bit(rsrc_array, max_rsrc, *next); 482cdcd52d4SBartosz Sobczak if (rsrc_num >= max_rsrc) { 483cdcd52d4SBartosz Sobczak rsrc_num = find_first_zero_bit(rsrc_array, max_rsrc); 484cdcd52d4SBartosz Sobczak if (rsrc_num >= max_rsrc) { 485cdcd52d4SBartosz Sobczak spin_unlock_irqrestore(&rf->rsrc_lock, flags); 486cdcd52d4SBartosz Sobczak irdma_debug(&rf->sc_dev, IRDMA_DEBUG_ERR, 487cdcd52d4SBartosz Sobczak "resource [%d] allocation failed\n", 488cdcd52d4SBartosz Sobczak rsrc_num); 489cdcd52d4SBartosz Sobczak return -EOVERFLOW; 490cdcd52d4SBartosz Sobczak } 491cdcd52d4SBartosz Sobczak } 492cdcd52d4SBartosz Sobczak __set_bit(rsrc_num, rsrc_array); 493cdcd52d4SBartosz Sobczak *next = rsrc_num + 1; 494cdcd52d4SBartosz Sobczak if (*next == max_rsrc) 495cdcd52d4SBartosz Sobczak *next = 0; 496cdcd52d4SBartosz Sobczak *req_rsrc_num = rsrc_num; 497cdcd52d4SBartosz Sobczak spin_unlock_irqrestore(&rf->rsrc_lock, flags); 498cdcd52d4SBartosz Sobczak 499cdcd52d4SBartosz Sobczak return 0; 500cdcd52d4SBartosz Sobczak } 501cdcd52d4SBartosz Sobczak 502cdcd52d4SBartosz Sobczak /** 503cdcd52d4SBartosz Sobczak * irdma_free_resource - free a resource 504cdcd52d4SBartosz Sobczak * @iwdev: device pointer 505cdcd52d4SBartosz Sobczak * @resource_array: resource array for the resource_num 506cdcd52d4SBartosz Sobczak * @resource_num: resource number to free 507cdcd52d4SBartosz Sobczak **/ 508cdcd52d4SBartosz Sobczak static inline void irdma_free_rsrc(struct irdma_pci_f *rf, 509cdcd52d4SBartosz Sobczak unsigned long *rsrc_array, u32 rsrc_num) 510cdcd52d4SBartosz Sobczak { 511cdcd52d4SBartosz Sobczak unsigned long flags; 512cdcd52d4SBartosz Sobczak 513cdcd52d4SBartosz Sobczak spin_lock_irqsave(&rf->rsrc_lock, flags); 514cdcd52d4SBartosz Sobczak __clear_bit(rsrc_num, rsrc_array); 515cdcd52d4SBartosz Sobczak spin_unlock_irqrestore(&rf->rsrc_lock, flags); 516cdcd52d4SBartosz Sobczak } 517cdcd52d4SBartosz Sobczak 518cdcd52d4SBartosz Sobczak int irdma_ctrl_init_hw(struct irdma_pci_f *rf); 519cdcd52d4SBartosz Sobczak void irdma_ctrl_deinit_hw(struct irdma_pci_f *rf); 520cdcd52d4SBartosz Sobczak int irdma_rt_init_hw(struct irdma_device *iwdev, 521cdcd52d4SBartosz Sobczak struct irdma_l2params *l2params); 522cdcd52d4SBartosz Sobczak void irdma_rt_deinit_hw(struct irdma_device *iwdev); 523cdcd52d4SBartosz Sobczak void irdma_qp_add_ref(struct ib_qp *ibqp); 524cdcd52d4SBartosz Sobczak void irdma_qp_rem_ref(struct ib_qp *ibqp); 525cdcd52d4SBartosz Sobczak void irdma_free_lsmm_rsrc(struct irdma_qp *iwqp); 526cdcd52d4SBartosz Sobczak struct ib_qp *irdma_get_qp(struct ib_device *ibdev, int qpn); 527cdcd52d4SBartosz Sobczak void irdma_flush_wqes(struct irdma_qp *iwqp, u32 flush_mask); 528777e472cSBartosz Sobczak void irdma_manage_arp_cache(struct irdma_pci_f *rf, const unsigned char *mac_addr, 529cdcd52d4SBartosz Sobczak u32 *ip_addr, u32 action); 530cdcd52d4SBartosz Sobczak struct irdma_apbvt_entry *irdma_add_apbvt(struct irdma_device *iwdev, u16 port); 531cdcd52d4SBartosz Sobczak void irdma_del_apbvt(struct irdma_device *iwdev, 532cdcd52d4SBartosz Sobczak struct irdma_apbvt_entry *entry); 533cdcd52d4SBartosz Sobczak struct irdma_cqp_request *irdma_alloc_and_get_cqp_request(struct irdma_cqp *cqp, 534cdcd52d4SBartosz Sobczak bool wait); 535cdcd52d4SBartosz Sobczak void irdma_free_cqp_request(struct irdma_cqp *cqp, 536cdcd52d4SBartosz Sobczak struct irdma_cqp_request *cqp_request); 537cdcd52d4SBartosz Sobczak void irdma_put_cqp_request(struct irdma_cqp *cqp, 538cdcd52d4SBartosz Sobczak struct irdma_cqp_request *cqp_request); 539cdcd52d4SBartosz Sobczak int irdma_alloc_local_mac_entry(struct irdma_pci_f *rf, u16 *mac_tbl_idx); 54035105900SBartosz Sobczak int irdma_add_local_mac_entry(struct irdma_pci_f *rf, const u8 *mac_addr, u16 idx); 541cdcd52d4SBartosz Sobczak void irdma_del_local_mac_entry(struct irdma_pci_f *rf, u16 idx); 54201fbb869SBartosz Sobczak const char *irdma_get_ae_desc(u16 ae_id); 543cdcd52d4SBartosz Sobczak 544cdcd52d4SBartosz Sobczak u32 irdma_initialize_hw_rsrc(struct irdma_pci_f *rf); 545cdcd52d4SBartosz Sobczak void irdma_port_ibevent(struct irdma_device *iwdev); 546cdcd52d4SBartosz Sobczak void irdma_cm_disconn(struct irdma_qp *qp); 547cdcd52d4SBartosz Sobczak 548cdcd52d4SBartosz Sobczak bool irdma_cqp_crit_err(struct irdma_sc_dev *dev, u8 cqp_cmd, 549cdcd52d4SBartosz Sobczak u16 maj_err_code, u16 min_err_code); 550cdcd52d4SBartosz Sobczak int irdma_handle_cqp_op(struct irdma_pci_f *rf, 551cdcd52d4SBartosz Sobczak struct irdma_cqp_request *cqp_request); 552cdcd52d4SBartosz Sobczak 553cdcd52d4SBartosz Sobczak int irdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, 554cdcd52d4SBartosz Sobczak struct ib_udata *udata); 555cdcd52d4SBartosz Sobczak int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr, 556cdcd52d4SBartosz Sobczak int attr_mask, struct ib_udata *udata); 557cdcd52d4SBartosz Sobczak void irdma_cq_add_ref(struct ib_cq *ibcq); 558cdcd52d4SBartosz Sobczak void irdma_cq_rem_ref(struct ib_cq *ibcq); 559cdcd52d4SBartosz Sobczak void irdma_cq_wq_destroy(struct irdma_pci_f *rf, struct irdma_sc_cq *cq); 560cdcd52d4SBartosz Sobczak 561cdcd52d4SBartosz Sobczak void irdma_cleanup_pending_cqp_op(struct irdma_pci_f *rf); 562cdcd52d4SBartosz Sobczak int irdma_hw_modify_qp(struct irdma_device *iwdev, struct irdma_qp *iwqp, 563cdcd52d4SBartosz Sobczak struct irdma_modify_qp_info *info, bool wait); 564cdcd52d4SBartosz Sobczak int irdma_qp_suspend_resume(struct irdma_sc_qp *qp, bool suspend); 565cdcd52d4SBartosz Sobczak int irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo, 566cdcd52d4SBartosz Sobczak enum irdma_quad_entry_type etype, 567cdcd52d4SBartosz Sobczak enum irdma_quad_hash_manage_type mtype, void *cmnode, 568cdcd52d4SBartosz Sobczak bool wait); 569cdcd52d4SBartosz Sobczak void irdma_receive_ilq(struct irdma_sc_vsi *vsi, struct irdma_puda_buf *rbuf); 570cdcd52d4SBartosz Sobczak void irdma_free_sqbuf(struct irdma_sc_vsi *vsi, void *bufp); 571cdcd52d4SBartosz Sobczak void irdma_free_qp_rsrc(struct irdma_qp *iwqp); 572cdcd52d4SBartosz Sobczak int irdma_setup_cm_core(struct irdma_device *iwdev, u8 ver); 573cdcd52d4SBartosz Sobczak void irdma_cleanup_cm_core(struct irdma_cm_core *cm_core); 574cdcd52d4SBartosz Sobczak void irdma_next_iw_state(struct irdma_qp *iwqp, u8 state, u8 del_hash, u8 term, 575cdcd52d4SBartosz Sobczak u8 term_len); 576cdcd52d4SBartosz Sobczak int irdma_send_syn(struct irdma_cm_node *cm_node, u32 sendack); 577cdcd52d4SBartosz Sobczak int irdma_send_reset(struct irdma_cm_node *cm_node); 578cdcd52d4SBartosz Sobczak struct irdma_cm_node *irdma_find_node(struct irdma_cm_core *cm_core, 579cdcd52d4SBartosz Sobczak u16 rem_port, u32 *rem_addr, u16 loc_port, 580cdcd52d4SBartosz Sobczak u32 *loc_addr, u16 vlan_id); 581cdcd52d4SBartosz Sobczak int irdma_hw_flush_wqes(struct irdma_pci_f *rf, struct irdma_sc_qp *qp, 582cdcd52d4SBartosz Sobczak struct irdma_qp_flush_info *info, bool wait); 583cdcd52d4SBartosz Sobczak void irdma_gen_ae(struct irdma_pci_f *rf, struct irdma_sc_qp *qp, 584cdcd52d4SBartosz Sobczak struct irdma_gen_ae_info *info, bool wait); 585cdcd52d4SBartosz Sobczak void irdma_copy_ip_ntohl(u32 *dst, __be32 *src); 586cdcd52d4SBartosz Sobczak void irdma_copy_ip_htonl(__be32 *dst, u32 *src); 587*bc3a013cSBartosz Sobczak u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr); 588*bc3a013cSBartosz Sobczak if_t irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, 589*bc3a013cSBartosz Sobczak u8 *mac); 590cdcd52d4SBartosz Sobczak struct ib_mr *irdma_reg_phys_mr(struct ib_pd *ib_pd, u64 addr, u64 size, 591cdcd52d4SBartosz Sobczak int acc, u64 *iova_start); 592cdcd52d4SBartosz Sobczak int irdma_upload_qp_context(struct irdma_qp *iwqp, bool freeze, bool raw); 593cdcd52d4SBartosz Sobczak void irdma_del_hmc_objects(struct irdma_sc_dev *dev, 594cdcd52d4SBartosz Sobczak struct irdma_hmc_info *hmc_info, bool privileged, 595cdcd52d4SBartosz Sobczak bool reset, enum irdma_vers vers); 596cdcd52d4SBartosz Sobczak void irdma_cqp_ce_handler(struct irdma_pci_f *rf, struct irdma_sc_cq *cq); 597cdcd52d4SBartosz Sobczak int irdma_ah_cqp_op(struct irdma_pci_f *rf, struct irdma_sc_ah *sc_ah, u8 cmd, 598cdcd52d4SBartosz Sobczak bool wait, 599cdcd52d4SBartosz Sobczak void (*callback_fcn)(struct irdma_cqp_request *cqp_request), 600cdcd52d4SBartosz Sobczak void *cb_param); 601cdcd52d4SBartosz Sobczak void irdma_gsi_ud_qp_ah_cb(struct irdma_cqp_request *cqp_request); 60235105900SBartosz Sobczak void irdma_udqp_qs_worker(struct work_struct *work); 603cdcd52d4SBartosz Sobczak bool irdma_cq_empty(struct irdma_cq *iwcq); 604777e472cSBartosz Sobczak int irdma_netdevice_event(struct notifier_block *notifier, unsigned long event, 605777e472cSBartosz Sobczak void *ptr); 606777e472cSBartosz Sobczak void irdma_unregister_notifiers(struct irdma_device *iwdev); 607777e472cSBartosz Sobczak int irdma_register_notifiers(struct irdma_device *iwdev); 608cdcd52d4SBartosz Sobczak void irdma_set_rf_user_cfg_params(struct irdma_pci_f *rf); 609cdcd52d4SBartosz Sobczak void irdma_add_ip(struct irdma_device *iwdev); 610cdcd52d4SBartosz Sobczak void irdma_add_handler(struct irdma_handler *hdl); 611cdcd52d4SBartosz Sobczak void irdma_del_handler(struct irdma_handler *hdl); 612cdcd52d4SBartosz Sobczak void cqp_compl_worker(struct work_struct *work); 61335105900SBartosz Sobczak void irdma_cleanup_dead_qps(struct irdma_sc_vsi *vsi); 614cdcd52d4SBartosz Sobczak #endif /* IRDMA_MAIN_H */ 615