i40iw.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. /*******************************************************************************
  2. *
  3. * Copyright (c) 2015-2016 Intel Corporation. All rights reserved.
  4. *
  5. * This software is available to you under a choice of one of two
  6. * licenses. You may choose to be licensed under the terms of the GNU
  7. * General Public License (GPL) Version 2, available from the file
  8. * COPYING in the main directory of this source tree, or the
  9. * OpenFabrics.org BSD license below:
  10. *
  11. * Redistribution and use in source and binary forms, with or
  12. * without modification, are permitted provided that the following
  13. * conditions are met:
  14. *
  15. * - Redistributions of source code must retain the above
  16. * copyright notice, this list of conditions and the following
  17. * disclaimer.
  18. *
  19. * - Redistributions in binary form must reproduce the above
  20. * copyright notice, this list of conditions and the following
  21. * disclaimer in the documentation and/or other materials
  22. * provided with the distribution.
  23. *
  24. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  25. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  26. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  28. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  29. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  30. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  31. * SOFTWARE.
  32. *
  33. *******************************************************************************/
  34. #ifndef I40IW_IW_H
  35. #define I40IW_IW_H
  36. #include <linux/netdevice.h>
  37. #include <linux/inetdevice.h>
  38. #include <linux/spinlock.h>
  39. #include <linux/kernel.h>
  40. #include <linux/delay.h>
  41. #include <linux/pci.h>
  42. #include <linux/dma-mapping.h>
  43. #include <linux/workqueue.h>
  44. #include <linux/slab.h>
  45. #include <linux/io.h>
  46. #include <linux/crc32c.h>
  47. #include <rdma/ib_smi.h>
  48. #include <rdma/ib_verbs.h>
  49. #include <rdma/ib_pack.h>
  50. #include <rdma/rdma_cm.h>
  51. #include <rdma/iw_cm.h>
  52. #include <crypto/hash.h>
  53. #include "i40iw_status.h"
  54. #include "i40iw_osdep.h"
  55. #include "i40iw_d.h"
  56. #include "i40iw_hmc.h"
  57. #include <i40e_client.h>
  58. #include "i40iw_type.h"
  59. #include "i40iw_p.h"
  60. #include <rdma/i40iw-abi.h>
  61. #include "i40iw_pble.h"
  62. #include "i40iw_verbs.h"
  63. #include "i40iw_cm.h"
  64. #include "i40iw_user.h"
  65. #include "i40iw_puda.h"
  66. #define I40IW_FW_VERSION 2
  67. #define I40IW_HW_VERSION 2
  68. #define I40IW_ARP_ADD 1
  69. #define I40IW_ARP_DELETE 2
  70. #define I40IW_ARP_RESOLVE 3
  71. #define I40IW_MACIP_ADD 1
  72. #define I40IW_MACIP_DELETE 2
  73. #define IW_CCQ_SIZE (I40IW_CQP_SW_SQSIZE_2048 + 1)
  74. #define IW_CEQ_SIZE 2048
  75. #define IW_AEQ_SIZE 2048
  76. #define RX_BUF_SIZE (1536 + 8)
  77. #define IW_REG0_SIZE (4 * 1024)
  78. #define IW_TX_TIMEOUT (6 * HZ)
  79. #define IW_FIRST_QPN 1
  80. #define IW_SW_CONTEXT_ALIGN 1024
  81. #define MAX_DPC_ITERATIONS 128
  82. #define I40IW_EVENT_TIMEOUT 100000
  83. #define I40IW_VCHNL_EVENT_TIMEOUT 100000
  84. #define I40IW_NO_VLAN 0xffff
  85. #define I40IW_NO_QSET 0xffff
  86. /* access to mcast filter list */
  87. #define IW_ADD_MCAST false
  88. #define IW_DEL_MCAST true
  89. #define I40IW_DRV_OPT_ENABLE_MPA_VER_0 0x00000001
  90. #define I40IW_DRV_OPT_DISABLE_MPA_CRC 0x00000002
  91. #define I40IW_DRV_OPT_DISABLE_FIRST_WRITE 0x00000004
  92. #define I40IW_DRV_OPT_DISABLE_INTF 0x00000008
  93. #define I40IW_DRV_OPT_ENABLE_MSI 0x00000010
  94. #define I40IW_DRV_OPT_DUAL_LOGICAL_PORT 0x00000020
  95. #define I40IW_DRV_OPT_NO_INLINE_DATA 0x00000080
  96. #define I40IW_DRV_OPT_DISABLE_INT_MOD 0x00000100
  97. #define I40IW_DRV_OPT_DISABLE_VIRT_WQ 0x00000200
  98. #define I40IW_DRV_OPT_ENABLE_PAU 0x00000400
  99. #define I40IW_DRV_OPT_MCAST_LOGPORT_MAP 0x00000800
  100. #define IW_HMC_OBJ_TYPE_NUM ARRAY_SIZE(iw_hmc_obj_types)
  101. #define IW_CFG_FPM_QP_COUNT 32768
  102. #define I40IW_MAX_PAGES_PER_FMR 512
  103. #define I40IW_MIN_PAGES_PER_FMR 1
  104. #define I40IW_CQP_COMPL_RQ_WQE_FLUSHED 2
  105. #define I40IW_CQP_COMPL_SQ_WQE_FLUSHED 3
  106. #define I40IW_CQP_COMPL_RQ_SQ_WQE_FLUSHED 4
  107. struct i40iw_cqp_compl_info {
  108. u32 op_ret_val;
  109. u16 maj_err_code;
  110. u16 min_err_code;
  111. bool error;
  112. u8 op_code;
  113. };
  114. #define i40iw_pr_err(fmt, args ...) pr_err("%s: "fmt, __func__, ## args)
  115. #define i40iw_pr_info(fmt, args ...) pr_info("%s: " fmt, __func__, ## args)
  116. #define i40iw_pr_warn(fmt, args ...) pr_warn("%s: " fmt, __func__, ## args)
  117. struct i40iw_cqp_request {
  118. struct cqp_commands_info info;
  119. wait_queue_head_t waitq;
  120. struct list_head list;
  121. atomic_t refcount;
  122. void (*callback_fcn)(struct i40iw_cqp_request*, u32);
  123. void *param;
  124. struct i40iw_cqp_compl_info compl_info;
  125. bool waiting;
  126. bool request_done;
  127. bool dynamic;
  128. };
  129. struct i40iw_cqp {
  130. struct i40iw_sc_cqp sc_cqp;
  131. spinlock_t req_lock; /*cqp request list */
  132. wait_queue_head_t waitq;
  133. struct i40iw_dma_mem sq;
  134. struct i40iw_dma_mem host_ctx;
  135. u64 *scratch_array;
  136. struct i40iw_cqp_request *cqp_requests;
  137. struct list_head cqp_avail_reqs;
  138. struct list_head cqp_pending_reqs;
  139. };
  140. struct i40iw_device;
  141. struct i40iw_ccq {
  142. struct i40iw_sc_cq sc_cq;
  143. spinlock_t lock; /* ccq control */
  144. wait_queue_head_t waitq;
  145. struct i40iw_dma_mem mem_cq;
  146. struct i40iw_dma_mem shadow_area;
  147. };
  148. struct i40iw_ceq {
  149. struct i40iw_sc_ceq sc_ceq;
  150. struct i40iw_dma_mem mem;
  151. u32 irq;
  152. u32 msix_idx;
  153. struct i40iw_device *iwdev;
  154. struct tasklet_struct dpc_tasklet;
  155. };
  156. struct i40iw_aeq {
  157. struct i40iw_sc_aeq sc_aeq;
  158. struct i40iw_dma_mem mem;
  159. };
  160. struct i40iw_arp_entry {
  161. u32 ip_addr[4];
  162. u8 mac_addr[ETH_ALEN];
  163. };
  164. enum init_completion_state {
  165. INVALID_STATE = 0,
  166. INITIAL_STATE,
  167. CQP_CREATED,
  168. HMC_OBJS_CREATED,
  169. PBLE_CHUNK_MEM,
  170. CCQ_CREATED,
  171. AEQ_CREATED,
  172. CEQ_CREATED,
  173. ILQ_CREATED,
  174. IEQ_CREATED,
  175. IP_ADDR_REGISTERED,
  176. RDMA_DEV_REGISTERED
  177. };
  178. struct i40iw_msix_vector {
  179. u32 idx;
  180. u32 irq;
  181. u32 cpu_affinity;
  182. u32 ceq_id;
  183. cpumask_t mask;
  184. };
  185. struct l2params_work {
  186. struct work_struct work;
  187. struct i40iw_device *iwdev;
  188. struct i40iw_l2params l2params;
  189. };
  190. #define I40IW_MSIX_TABLE_SIZE 65
  191. struct virtchnl_work {
  192. struct work_struct work;
  193. union {
  194. struct i40iw_cqp_request *cqp_request;
  195. struct i40iw_virtchnl_work_info work_info;
  196. };
  197. };
  198. struct i40e_qvlist_info;
  199. struct i40iw_device {
  200. struct i40iw_ib_device *iwibdev;
  201. struct net_device *netdev;
  202. wait_queue_head_t vchnl_waitq;
  203. struct i40iw_sc_dev sc_dev;
  204. struct i40iw_sc_vsi vsi;
  205. struct i40iw_handler *hdl;
  206. struct i40e_info *ldev;
  207. struct i40e_client *client;
  208. struct i40iw_hw hw;
  209. struct i40iw_cm_core cm_core;
  210. u8 *mem_resources;
  211. unsigned long *allocated_qps;
  212. unsigned long *allocated_cqs;
  213. unsigned long *allocated_mrs;
  214. unsigned long *allocated_pds;
  215. unsigned long *allocated_arps;
  216. struct i40iw_qp **qp_table;
  217. bool msix_shared;
  218. u32 msix_count;
  219. struct i40iw_msix_vector *iw_msixtbl;
  220. struct i40e_qvlist_info *iw_qvlist;
  221. struct i40iw_hmc_pble_rsrc *pble_rsrc;
  222. struct i40iw_arp_entry *arp_table;
  223. struct i40iw_cqp cqp;
  224. struct i40iw_ccq ccq;
  225. u32 ceqs_count;
  226. struct i40iw_ceq *ceqlist;
  227. struct i40iw_aeq aeq;
  228. u32 arp_table_size;
  229. u32 next_arp_index;
  230. spinlock_t resource_lock; /* hw resource access */
  231. spinlock_t qptable_lock;
  232. u32 vendor_id;
  233. u32 vendor_part_id;
  234. u32 of_device_registered;
  235. u32 device_cap_flags;
  236. unsigned long db_start;
  237. u8 resource_profile;
  238. u8 max_rdma_vfs;
  239. u8 max_enabled_vfs;
  240. u8 max_sge;
  241. u8 iw_status;
  242. u8 send_term_ok;
  243. bool push_mode; /* Initialized from parameter passed to driver */
  244. /* x710 specific */
  245. struct mutex pbl_mutex;
  246. struct tasklet_struct dpc_tasklet;
  247. struct workqueue_struct *virtchnl_wq;
  248. struct virtchnl_work virtchnl_w[I40IW_MAX_PE_ENABLED_VF_COUNT];
  249. struct i40iw_dma_mem obj_mem;
  250. struct i40iw_dma_mem obj_next;
  251. u8 *hmc_info_mem;
  252. u32 sd_type;
  253. struct workqueue_struct *param_wq;
  254. atomic_t params_busy;
  255. enum init_completion_state init_state;
  256. u16 mac_ip_table_idx;
  257. atomic_t vchnl_msgs;
  258. u32 max_mr;
  259. u32 max_qp;
  260. u32 max_cq;
  261. u32 max_pd;
  262. u32 next_qp;
  263. u32 next_cq;
  264. u32 next_pd;
  265. u32 max_mr_size;
  266. u32 max_qp_wr;
  267. u32 max_cqe;
  268. u32 mr_stagmask;
  269. u32 mpa_version;
  270. bool dcb;
  271. bool closing;
  272. bool reset;
  273. u32 used_pds;
  274. u32 used_cqs;
  275. u32 used_mrs;
  276. u32 used_qps;
  277. wait_queue_head_t close_wq;
  278. atomic64_t use_count;
  279. };
  280. struct i40iw_ib_device {
  281. struct ib_device ibdev;
  282. struct i40iw_device *iwdev;
  283. };
  284. struct i40iw_handler {
  285. struct list_head list;
  286. struct i40e_client *client;
  287. struct i40iw_device device;
  288. struct i40e_info ldev;
  289. };
  290. /**
  291. * to_iwdev - get device
  292. * @ibdev: ib device
  293. **/
  294. static inline struct i40iw_device *to_iwdev(struct ib_device *ibdev)
  295. {
  296. return container_of(ibdev, struct i40iw_ib_device, ibdev)->iwdev;
  297. }
  298. /**
  299. * to_ucontext - get user context
  300. * @ibucontext: ib user context
  301. **/
  302. static inline struct i40iw_ucontext *to_ucontext(struct ib_ucontext *ibucontext)
  303. {
  304. return container_of(ibucontext, struct i40iw_ucontext, ibucontext);
  305. }
  306. /**
  307. * to_iwpd - get protection domain
  308. * @ibpd: ib pd
  309. **/
  310. static inline struct i40iw_pd *to_iwpd(struct ib_pd *ibpd)
  311. {
  312. return container_of(ibpd, struct i40iw_pd, ibpd);
  313. }
  314. /**
  315. * to_iwmr - get device memory region
  316. * @ibdev: ib memory region
  317. **/
  318. static inline struct i40iw_mr *to_iwmr(struct ib_mr *ibmr)
  319. {
  320. return container_of(ibmr, struct i40iw_mr, ibmr);
  321. }
  322. /**
  323. * to_iwmr_from_ibfmr - get device memory region
  324. * @ibfmr: ib fmr
  325. **/
  326. static inline struct i40iw_mr *to_iwmr_from_ibfmr(struct ib_fmr *ibfmr)
  327. {
  328. return container_of(ibfmr, struct i40iw_mr, ibfmr);
  329. }
  330. /**
  331. * to_iwmw - get device memory window
  332. * @ibmw: ib memory window
  333. **/
  334. static inline struct i40iw_mr *to_iwmw(struct ib_mw *ibmw)
  335. {
  336. return container_of(ibmw, struct i40iw_mr, ibmw);
  337. }
  338. /**
  339. * to_iwcq - get completion queue
  340. * @ibcq: ib cqdevice
  341. **/
  342. static inline struct i40iw_cq *to_iwcq(struct ib_cq *ibcq)
  343. {
  344. return container_of(ibcq, struct i40iw_cq, ibcq);
  345. }
  346. /**
  347. * to_iwqp - get device qp
  348. * @ibqp: ib qp
  349. **/
  350. static inline struct i40iw_qp *to_iwqp(struct ib_qp *ibqp)
  351. {
  352. return container_of(ibqp, struct i40iw_qp, ibqp);
  353. }
  354. /* i40iw.c */
  355. void i40iw_add_ref(struct ib_qp *);
  356. void i40iw_rem_ref(struct ib_qp *);
  357. struct ib_qp *i40iw_get_qp(struct ib_device *, int);
  358. void i40iw_flush_wqes(struct i40iw_device *iwdev,
  359. struct i40iw_qp *qp);
  360. void i40iw_manage_arp_cache(struct i40iw_device *iwdev,
  361. unsigned char *mac_addr,
  362. u32 *ip_addr,
  363. bool ipv4,
  364. u32 action);
  365. int i40iw_manage_apbvt(struct i40iw_device *iwdev,
  366. u16 accel_local_port,
  367. bool add_port);
  368. struct i40iw_cqp_request *i40iw_get_cqp_request(struct i40iw_cqp *cqp, bool wait);
  369. void i40iw_free_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp_request);
  370. void i40iw_put_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp_request);
  371. /**
  372. * i40iw_alloc_resource - allocate a resource
  373. * @iwdev: device pointer
  374. * @resource_array: resource bit array:
  375. * @max_resources: maximum resource number
  376. * @req_resources_num: Allocated resource number
  377. * @next: next free id
  378. **/
  379. static inline int i40iw_alloc_resource(struct i40iw_device *iwdev,
  380. unsigned long *resource_array,
  381. u32 max_resources,
  382. u32 *req_resource_num,
  383. u32 *next)
  384. {
  385. u32 resource_num;
  386. unsigned long flags;
  387. spin_lock_irqsave(&iwdev->resource_lock, flags);
  388. resource_num = find_next_zero_bit(resource_array, max_resources, *next);
  389. if (resource_num >= max_resources) {
  390. resource_num = find_first_zero_bit(resource_array, max_resources);
  391. if (resource_num >= max_resources) {
  392. spin_unlock_irqrestore(&iwdev->resource_lock, flags);
  393. return -EOVERFLOW;
  394. }
  395. }
  396. set_bit(resource_num, resource_array);
  397. *next = resource_num + 1;
  398. if (*next == max_resources)
  399. *next = 0;
  400. *req_resource_num = resource_num;
  401. spin_unlock_irqrestore(&iwdev->resource_lock, flags);
  402. return 0;
  403. }
  404. /**
  405. * i40iw_is_resource_allocated - detrmine if resource is
  406. * allocated
  407. * @iwdev: device pointer
  408. * @resource_array: resource array for the resource_num
  409. * @resource_num: resource number to check
  410. **/
  411. static inline bool i40iw_is_resource_allocated(struct i40iw_device *iwdev,
  412. unsigned long *resource_array,
  413. u32 resource_num)
  414. {
  415. bool bit_is_set;
  416. unsigned long flags;
  417. spin_lock_irqsave(&iwdev->resource_lock, flags);
  418. bit_is_set = test_bit(resource_num, resource_array);
  419. spin_unlock_irqrestore(&iwdev->resource_lock, flags);
  420. return bit_is_set;
  421. }
  422. /**
  423. * i40iw_free_resource - free a resource
  424. * @iwdev: device pointer
  425. * @resource_array: resource array for the resource_num
  426. * @resource_num: resource number to free
  427. **/
  428. static inline void i40iw_free_resource(struct i40iw_device *iwdev,
  429. unsigned long *resource_array,
  430. u32 resource_num)
  431. {
  432. unsigned long flags;
  433. spin_lock_irqsave(&iwdev->resource_lock, flags);
  434. clear_bit(resource_num, resource_array);
  435. spin_unlock_irqrestore(&iwdev->resource_lock, flags);
  436. }
  437. /**
  438. * to_iwhdl - Get the handler from the device pointer
  439. * @iwdev: device pointer
  440. **/
  441. static inline struct i40iw_handler *to_iwhdl(struct i40iw_device *iw_dev)
  442. {
  443. return container_of(iw_dev, struct i40iw_handler, device);
  444. }
  445. struct i40iw_handler *i40iw_find_netdev(struct net_device *netdev);
  446. /**
  447. * iw_init_resources -
  448. */
  449. u32 i40iw_initialize_hw_resources(struct i40iw_device *iwdev);
  450. int i40iw_register_rdma_device(struct i40iw_device *iwdev);
  451. void i40iw_port_ibevent(struct i40iw_device *iwdev);
  452. void i40iw_cm_disconn(struct i40iw_qp *iwqp);
  453. void i40iw_cm_disconn_worker(void *);
  454. int mini_cm_recv_pkt(struct i40iw_cm_core *, struct i40iw_device *,
  455. struct sk_buff *);
  456. enum i40iw_status_code i40iw_handle_cqp_op(struct i40iw_device *iwdev,
  457. struct i40iw_cqp_request *cqp_request);
  458. enum i40iw_status_code i40iw_add_mac_addr(struct i40iw_device *iwdev,
  459. u8 *mac_addr, u8 *mac_index);
  460. int i40iw_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *);
  461. void i40iw_cq_wq_destroy(struct i40iw_device *iwdev, struct i40iw_sc_cq *cq);
  462. void i40iw_cleanup_pending_cqp_op(struct i40iw_device *iwdev);
  463. void i40iw_rem_pdusecount(struct i40iw_pd *iwpd, struct i40iw_device *iwdev);
  464. void i40iw_add_pdusecount(struct i40iw_pd *iwpd);
  465. void i40iw_rem_devusecount(struct i40iw_device *iwdev);
  466. void i40iw_add_devusecount(struct i40iw_device *iwdev);
  467. void i40iw_hw_modify_qp(struct i40iw_device *iwdev, struct i40iw_qp *iwqp,
  468. struct i40iw_modify_qp_info *info, bool wait);
  469. void i40iw_qp_suspend_resume(struct i40iw_sc_dev *dev,
  470. struct i40iw_sc_qp *qp,
  471. bool suspend);
  472. enum i40iw_status_code i40iw_manage_qhash(struct i40iw_device *iwdev,
  473. struct i40iw_cm_info *cminfo,
  474. enum i40iw_quad_entry_type etype,
  475. enum i40iw_quad_hash_manage_type mtype,
  476. void *cmnode,
  477. bool wait);
  478. void i40iw_receive_ilq(struct i40iw_sc_vsi *vsi, struct i40iw_puda_buf *rbuf);
  479. void i40iw_free_sqbuf(struct i40iw_sc_vsi *vsi, void *bufp);
  480. void i40iw_free_qp_resources(struct i40iw_device *iwdev,
  481. struct i40iw_qp *iwqp,
  482. u32 qp_num);
  483. enum i40iw_status_code i40iw_obj_aligned_mem(struct i40iw_device *iwdev,
  484. struct i40iw_dma_mem *memptr,
  485. u32 size, u32 mask);
  486. void i40iw_request_reset(struct i40iw_device *iwdev);
  487. void i40iw_destroy_rdma_device(struct i40iw_ib_device *iwibdev);
  488. void i40iw_setup_cm_core(struct i40iw_device *iwdev);
  489. void i40iw_cleanup_cm_core(struct i40iw_cm_core *cm_core);
  490. void i40iw_process_ceq(struct i40iw_device *, struct i40iw_ceq *iwceq);
  491. void i40iw_process_aeq(struct i40iw_device *);
  492. void i40iw_next_iw_state(struct i40iw_qp *iwqp,
  493. u8 state, u8 del_hash,
  494. u8 term, u8 term_len);
  495. int i40iw_send_syn(struct i40iw_cm_node *cm_node, u32 sendack);
  496. int i40iw_send_reset(struct i40iw_cm_node *cm_node);
  497. struct i40iw_cm_node *i40iw_find_node(struct i40iw_cm_core *cm_core,
  498. u16 rem_port,
  499. u32 *rem_addr,
  500. u16 loc_port,
  501. u32 *loc_addr,
  502. bool add_refcnt,
  503. bool accelerated_list);
  504. enum i40iw_status_code i40iw_hw_flush_wqes(struct i40iw_device *iwdev,
  505. struct i40iw_sc_qp *qp,
  506. struct i40iw_qp_flush_info *info,
  507. bool wait);
  508. void i40iw_gen_ae(struct i40iw_device *iwdev,
  509. struct i40iw_sc_qp *qp,
  510. struct i40iw_gen_ae_info *info,
  511. bool wait);
  512. void i40iw_copy_ip_ntohl(u32 *dst, __be32 *src);
  513. struct ib_mr *i40iw_reg_phys_mr(struct ib_pd *ib_pd,
  514. u64 addr,
  515. u64 size,
  516. int acc,
  517. u64 *iova_start);
  518. int i40iw_inetaddr_event(struct notifier_block *notifier,
  519. unsigned long event,
  520. void *ptr);
  521. int i40iw_inet6addr_event(struct notifier_block *notifier,
  522. unsigned long event,
  523. void *ptr);
  524. int i40iw_net_event(struct notifier_block *notifier,
  525. unsigned long event,
  526. void *ptr);
  527. int i40iw_netdevice_event(struct notifier_block *notifier,
  528. unsigned long event,
  529. void *ptr);
  530. #endif