Lines Matching full:struct

83 	struct ib_umem *umem, unsigned long pgsz_bitmap,
108 mlx5_umem_dmabuf_find_best_pgsz(struct ib_umem_dmabuf *umem_dmabuf) in mlx5_umem_dmabuf_find_best_pgsz()
180 struct mlx5_bfreg_info {
188 struct mutex lock;
198 struct mlx5_ib_ucontext {
199 struct ib_ucontext ibucontext;
200 struct list_head db_page_list;
204 struct mutex db_page_mutex;
205 struct mlx5_bfreg_info bfregi;
216 static inline struct mlx5_ib_ucontext *to_mucontext(struct ib_ucontext *ibucontext) in to_mucontext()
218 return container_of(ibucontext, struct mlx5_ib_ucontext, ibucontext); in to_mucontext()
221 struct mlx5_ib_pd {
222 struct ib_pd ibpd;
245 struct mlx5_ib_anchor {
246 struct mlx5_flow_table *ft;
247 struct mlx5_flow_group *fg_goto_table;
248 struct mlx5_flow_group *fg_drop;
249 struct mlx5_flow_handle *rule_goto_table;
250 struct mlx5_flow_handle *rule_drop;
254 struct mlx5_ib_flow_prio {
255 struct mlx5_flow_table *flow_table;
256 struct mlx5_ib_anchor anchor;
260 struct mlx5_ib_flow_handler {
261 struct list_head list;
262 struct ib_flow ibflow;
263 struct mlx5_ib_flow_prio *prio;
264 struct mlx5_flow_handle *rule;
265 struct ib_counters *ibcounters;
266 struct mlx5_ib_dev *dev;
267 struct mlx5_ib_flow_matcher *flow_matcher;
270 struct mlx5_ib_flow_matcher {
271 struct mlx5_ib_match_params matcher_mask;
276 struct mlx5_core_dev *mdev;
281 struct mlx5_ib_steering_anchor {
282 struct mlx5_ib_flow_prio *ft_prio;
283 struct mlx5_ib_dev *dev;
287 struct mlx5_ib_pp {
289 struct mlx5_core_dev *mdev;
300 struct mlx5_ib_flow_db {
301 struct mlx5_ib_flow_prio prios[MLX5_IB_NUM_FLOW_FT];
302 struct mlx5_ib_flow_prio egress_prios[MLX5_IB_NUM_FLOW_FT];
303 struct mlx5_ib_flow_prio sniffer[MLX5_IB_NUM_SNIFFER_FTS];
304 struct mlx5_ib_flow_prio egress[MLX5_IB_NUM_EGRESS_FTS];
305 struct mlx5_ib_flow_prio fdb[MLX5_IB_NUM_FDB_FTS];
306 struct mlx5_ib_flow_prio rdma_rx[MLX5_IB_NUM_FLOW_FT];
307 struct mlx5_ib_flow_prio rdma_tx[MLX5_IB_NUM_FLOW_FT];
308 struct mlx5_ib_flow_prio opfcs[MLX5_IB_OPCOUNTER_MAX];
309 struct mlx5_flow_table *lag_demux_ft;
315 struct mutex lock;
347 struct wr_list {
357 struct mlx5_ib_wq {
358 struct mlx5_frag_buf_ctrl fbc;
361 struct wr_list *w_list;
391 struct mlx5_ib_rwq {
392 struct ib_wq ibwq;
393 struct mlx5_core_qp core_qp;
402 struct ib_umem *umem;
405 struct mlx5_db db;
413 struct mlx5_ib_rwq_ind_table {
414 struct ib_rwq_ind_table ib_rwq_ind_tbl;
419 struct mlx5_ib_ubuffer {
420 struct ib_umem *umem;
425 struct mlx5_ib_qp_base {
426 struct mlx5_ib_qp *container_mibqp;
427 struct mlx5_core_qp mqp;
428 struct mlx5_ib_ubuffer ubuffer;
431 struct mlx5_ib_qp_trans {
432 struct mlx5_ib_qp_base base;
439 struct mlx5_ib_rss_qp {
443 struct mlx5_ib_rq {
444 struct mlx5_ib_qp_base base;
445 struct mlx5_ib_wq *rq;
446 struct mlx5_ib_ubuffer ubuffer;
447 struct mlx5_db *doorbell;
453 struct mlx5_ib_sq {
454 struct mlx5_ib_qp_base base;
455 struct mlx5_ib_wq *sq;
456 struct mlx5_ib_ubuffer ubuffer;
457 struct mlx5_db *doorbell;
458 struct mlx5_flow_handle *flow_rule;
463 struct mlx5_ib_raw_packet_qp {
464 struct mlx5_ib_sq sq;
465 struct mlx5_ib_rq rq;
468 struct mlx5_bf {
471 struct mlx5_sq_bfreg *bfreg;
474 struct mlx5_ib_dct {
475 struct mlx5_core_dct mdct;
479 struct mlx5_ib_gsi_qp {
480 struct ib_qp *rx_qp;
482 struct ib_qp_cap cap;
483 struct ib_cq *cq;
484 struct mlx5_ib_gsi_wr *outstanding_wrs;
492 struct ib_qp **tx_qps;
495 struct mlx5_ib_qp {
496 struct ib_qp ibqp;
498 struct mlx5_ib_qp_trans trans_qp;
499 struct mlx5_ib_raw_packet_qp raw_packet_qp;
500 struct mlx5_ib_rss_qp rss_qp;
501 struct mlx5_ib_dct dct;
502 struct mlx5_ib_gsi_qp gsi;
504 struct mlx5_frag_buf buf;
506 struct mlx5_db db;
507 struct mlx5_ib_wq rq;
511 struct mlx5_ib_wq sq;
515 struct mutex mutex;
516 /* cached variant of create_flags from struct ib_qp_init_attr */
521 struct mlx5_bf bf;
530 struct list_head qps_list;
531 struct list_head cq_recv_list;
532 struct list_head cq_send_list;
533 struct mlx5_rate_limit rl;
548 struct mlx5_ib_cq_buf {
549 struct mlx5_frag_buf_ctrl fbc;
550 struct mlx5_frag_buf frag_buf;
551 struct ib_umem *umem;
561 struct mlx5_ib_cq {
562 struct ib_cq ibcq;
563 struct mlx5_core_cq mcq;
564 struct mlx5_ib_cq_buf buf;
565 struct mlx5_db db;
573 struct mutex resize_mutex;
574 struct mlx5_ib_cq_buf *resize_buf;
575 struct ib_umem *resize_umem;
577 struct list_head list_send_qp;
578 struct list_head list_recv_qp;
580 struct list_head wc_list;
582 struct work_struct notify_work;
586 struct mlx5_ib_wc {
587 struct ib_wc wc;
588 struct list_head list;
591 struct mlx5_ib_srq {
592 struct ib_srq ibsrq;
593 struct mlx5_core_srq msrq;
594 struct mlx5_frag_buf buf;
595 struct mlx5_db db;
596 struct mlx5_frag_buf_ctrl fbc;
604 struct ib_umem *umem;
607 struct mutex mutex;
611 struct mlx5_ib_xrcd {
612 struct ib_xrcd ibxrcd;
621 struct mlx5_user_mmap_entry {
622 struct rdma_user_mmap_entry rdma_entry;
636 struct mlx5r_cache_rb_key {
643 struct mlx5_ib_mkey {
647 struct wait_queue_head wait;
650 struct mlx5r_cache_rb_key rb_key;
651 struct mlx5_cache_ent *cache_ent;
671 struct mlx5_ib_mr {
672 struct ib_mr ibmr;
673 struct mlx5_ib_mkey mmkey;
675 struct ib_umem *umem;
681 struct {
690 struct mlx5_core_sig_ctx *sig;
691 struct mlx5_ib_mr *pi_mr;
692 struct mlx5_ib_mr *klm_mr;
693 struct mlx5_ib_mr *mtt_mr;
702 struct {
708 struct mlx5_ib_mr *parent;
709 struct xarray implicit_children;
711 struct work_struct work;
713 struct ib_odp_counters odp_stats;
716 struct mlx5_ib_mr *dd_crossed_mr;
717 struct list_head dd_node;
719 struct mlx5_ib_mkey null_mmkey;
724 static inline bool is_odp_mr(struct mlx5_ib_mr *mr) in is_odp_mr()
730 static inline bool is_dmabuf_mr(struct mlx5_ib_mr *mr) in is_dmabuf_mr()
736 struct mlx5_ib_mw {
737 struct ib_mw ibmw;
738 struct mlx5_ib_mkey mmkey;
741 struct mlx5_ib_umr_context {
742 struct ib_cqe cqe;
744 struct completion done;
754 struct umr_common {
755 struct ib_pd *pd;
756 struct ib_cq *cq;
757 struct ib_qp *qp;
760 struct semaphore sem;
763 struct mutex lock;
766 struct mutex init_lock;
770 ((PAGE_SIZE - sizeof(struct list_head)) / sizeof(u32))
772 struct mlx5_mkeys_page {
774 struct list_head list;
776 static_assert(sizeof(struct mlx5_mkeys_page) == PAGE_SIZE);
778 struct mlx5_mkeys_queue {
779 struct list_head pages_list;
785 struct mlx5_cache_ent {
786 struct mlx5_mkeys_queue mkeys_queue;
791 struct rb_node node;
792 struct mlx5r_cache_rb_key rb_key;
809 struct mlx5_ib_dev *dev;
810 struct delayed_work dwork;
813 struct mlx5r_async_create_mkey {
818 struct mlx5_async_work cb_work;
819 struct mlx5_cache_ent *ent;
823 struct mlx5_mkey_cache {
824 struct workqueue_struct *wq;
825 struct rb_root rb_root;
826 struct mutex rb_lock;
827 struct dentry *fs_root;
831 struct mlx5_ib_port_resources {
832 struct mlx5_ib_gsi_qp *gsi;
833 struct work_struct pkey_change_work;
836 struct mlx5_data_direct_resources {
841 struct mlx5_ib_resources {
842 struct ib_cq *c0;
843 struct mutex cq_lock;
846 struct ib_pd *p0;
847 struct ib_srq *s0;
848 struct ib_srq *s1;
849 struct mutex srq_lock;
850 struct mlx5_ib_port_resources ports[2];
855 struct mlx5_ib_op_fc {
856 struct mlx5_fc *fc;
857 struct mlx5_flow_handle *rule[MAX_OPFC_RULES];
860 struct mlx5_ib_counters {
861 struct rdma_stat_desc *descs;
868 struct mlx5_ib_op_fc opfcs[MLX5_IB_OPCOUNTER_MAX];
871 int mlx5_ib_fs_add_op_fc(struct mlx5_ib_dev *dev, u32 port_num,
872 struct mlx5_ib_op_fc *opfc,
875 void mlx5_ib_fs_remove_op_fc(struct mlx5_ib_dev *dev,
876 struct mlx5_ib_op_fc *opfc,
879 struct mlx5_ib_multiport_info;
881 struct mlx5_ib_multiport {
882 struct mlx5_ib_multiport_info *mpi;
887 struct mlx5_roce {
891 struct notifier_block nb;
892 struct netdev_net_notifier nn;
893 struct notifier_block mdev_nb;
894 struct net_device *tracking_netdev;
897 struct mlx5_ib_dev *dev;
901 struct mlx5_ib_port {
902 struct mlx5_ib_counters cnts;
903 struct mlx5_ib_multiport mp;
904 struct mlx5_ib_dbg_cc_params *dbg_cc_params;
905 struct mlx5_roce roce;
906 struct mlx5_eswitch_rep *rep;
908 struct mlx5_reserved_gids *reserved_gids;
912 struct mlx5_ib_dbg_param {
914 struct mlx5_ib_dev *dev;
915 struct dentry *dentry;
945 struct mlx5_ib_dbg_cc_params {
946 struct dentry *root;
947 struct mlx5_ib_dbg_param params[MLX5_IB_DBG_CC_MAX];
954 struct mlx5_ib_delay_drop {
955 struct mlx5_ib_dev *dev;
956 struct work_struct delay_drop_work;
958 struct mutex lock;
963 struct dentry *dir_debugfs;
990 struct mlx5_ib_stage {
991 int (*init)(struct mlx5_ib_dev *dev);
992 void (*cleanup)(struct mlx5_ib_dev *dev);
998 struct mlx5_ib_profile {
999 struct mlx5_ib_stage stage[MLX5_IB_STAGE_MAX];
1002 struct mlx5_ib_multiport_info {
1003 struct list_head list;
1004 struct mlx5_ib_dev *ibdev;
1005 struct mlx5_core_dev *mdev;
1006 struct notifier_block mdev_events;
1007 struct completion unref_comp;
1014 struct mlx5_ib_flow_action {
1015 struct ib_flow_action ib_action;
1017 struct {
1019 struct mlx5_accel_esp_xfrm *ctx;
1021 struct {
1022 struct mlx5_ib_dev *dev;
1025 struct mlx5_modify_hdr *modify_hdr;
1026 struct mlx5_pkt_reformat *pkt_reformat;
1032 struct mlx5_dm {
1033 struct mlx5_core_dev *dev;
1042 struct mlx5_read_counters_attr {
1043 struct mlx5_fc *hw_cntrs_hndl;
1052 struct mlx5_ib_mcounters {
1053 struct ib_counters ibcntrs;
1057 struct mlx5_fc *hw_cntrs_hndl;
1059 int (*read_counters)(struct ib_device *ibdev,
1060 struct mlx5_read_counters_attr *read_attr);
1066 struct mlx5_ib_flow_counters_desc *counters_data;
1068 struct mutex mcntrs_mutex;
1071 static inline struct mlx5_ib_mcounters *
1072 to_mcounters(struct ib_counters *ibcntrs) in to_mcounters()
1074 return container_of(ibcntrs, struct mlx5_ib_mcounters, ibcntrs); in to_mcounters()
1077 int parse_flow_flow_action(struct mlx5_ib_flow_action *maction,
1079 struct mlx5_flow_act *action);
1080 struct mlx5_ib_lb_state {
1082 struct mutex mutex;
1088 struct mlx5_ib_pf_eq {
1089 struct notifier_block irq_nb;
1090 struct mlx5_ib_dev *dev;
1091 struct mlx5_eq *core;
1092 struct work_struct work;
1094 struct workqueue_struct *wq;
1098 struct mlx5_devx_event_table {
1099 struct mlx5_nb devx_nb;
1101 struct mutex event_xa_lock;
1102 struct xarray event_xa;
1105 struct mlx5_var_table {
1107 struct mutex bitmap_lock;
1114 struct mlx5_port_caps {
1120 struct mlx5_special_mkeys {
1126 struct mlx5_macsec {
1127 struct mutex lock; /* Protects mlx5_macsec internal contexts */
1128 struct list_head macsec_devices_list;
1129 struct notifier_block blocking_events_nb;
1132 struct mlx5_ib_dev {
1133 struct ib_device ib_dev;
1134 struct mlx5_core_dev *mdev;
1135 struct mlx5_data_direct_dev *data_direct_dev;
1137 struct mutex data_direct_lock;
1138 struct notifier_block mdev_events;
1139 struct notifier_block lag_events;
1143 struct mutex cap_mask_mutex;
1148 struct umr_common umrc;
1151 struct mlx5_ib_resources devr;
1154 struct mlx5_mkey_cache cache;
1155 struct timer_list delay_timer;
1157 struct mutex slow_path_mutex;
1158 struct ib_odp_caps odp_caps;
1160 struct mutex odp_eq_mutex;
1161 struct mlx5_ib_pf_eq odp_pf_eq;
1163 struct xarray odp_mkeys;
1165 struct mlx5_ib_flow_db *flow_db;
1168 struct list_head qp_list;
1169 struct list_head data_direct_mr_list;
1171 struct mlx5_ib_port *port;
1172 struct mlx5_sq_bfreg bfreg;
1173 struct mlx5_sq_bfreg fp_bfreg;
1174 struct mlx5_ib_delay_drop delay_drop;
1175 const struct mlx5_ib_profile *profile;
1177 struct mlx5_ib_lb_state lb;
1179 struct list_head ib_dev_list;
1181 struct mlx5_dm dm;
1183 struct mlx5_srq_table srq_table;
1184 struct mlx5_qp_table qp_table;
1185 struct mlx5_async_ctx async_ctx;
1186 struct mlx5_devx_event_table devx_event_table;
1187 struct mlx5_var_table var_table;
1189 struct xarray sig_mrs;
1190 struct mlx5_port_caps port_caps[MLX5_MAX_PORTS];
1193 struct mlx5_special_mkeys mkeys;
1194 struct mlx5_data_direct_resources ddr;
1197 struct mlx5_macsec macsec;
1201 struct mlx5_ib_dev *smi_dev;
1205 static inline struct mlx5_ib_cq *to_mibcq(struct mlx5_core_cq *mcq) in to_mibcq()
1207 return container_of(mcq, struct mlx5_ib_cq, mcq); in to_mibcq()
1210 static inline struct mlx5_ib_xrcd *to_mxrcd(struct ib_xrcd *ibxrcd) in to_mxrcd()
1212 return container_of(ibxrcd, struct mlx5_ib_xrcd, ibxrcd); in to_mxrcd()
1215 static inline struct mlx5_ib_dev *to_mdev(struct ib_device *ibdev) in to_mdev()
1217 return container_of(ibdev, struct mlx5_ib_dev, ib_dev); in to_mdev()
1220 static inline struct mlx5_ib_dev *mr_to_mdev(struct mlx5_ib_mr *mr) in mr_to_mdev()
1225 static inline struct mlx5_ib_dev *mlx5_udata_to_mdev(struct ib_udata *udata) in mlx5_udata_to_mdev()
1227 struct mlx5_ib_ucontext *context = rdma_udata_to_drv_context( in mlx5_udata_to_mdev()
1228 udata, struct mlx5_ib_ucontext, ibucontext); in mlx5_udata_to_mdev()
1233 static inline struct mlx5_ib_cq *to_mcq(struct ib_cq *ibcq) in to_mcq()
1235 return container_of(ibcq, struct mlx5_ib_cq, ibcq); in to_mcq()
1238 static inline struct mlx5_ib_qp *to_mibqp(struct mlx5_core_qp *mqp) in to_mibqp()
1240 return container_of(mqp, struct mlx5_ib_qp_base, mqp)->container_mibqp; in to_mibqp()
1243 static inline struct mlx5_ib_rwq *to_mibrwq(struct mlx5_core_qp *core_qp) in to_mibrwq()
1245 return container_of(core_qp, struct mlx5_ib_rwq, core_qp); in to_mibrwq()
1248 static inline struct mlx5_ib_pd *to_mpd(struct ib_pd *ibpd) in to_mpd()
1250 return container_of(ibpd, struct mlx5_ib_pd, ibpd); in to_mpd()
1253 static inline struct mlx5_ib_srq *to_msrq(struct ib_srq *ibsrq) in to_msrq()
1255 return container_of(ibsrq, struct mlx5_ib_srq, ibsrq); in to_msrq()
1258 static inline struct mlx5_ib_qp *to_mqp(struct ib_qp *ibqp) in to_mqp()
1260 return container_of(ibqp, struct mlx5_ib_qp, ibqp); in to_mqp()
1263 static inline struct mlx5_ib_rwq *to_mrwq(struct ib_wq *ibwq) in to_mrwq()
1265 return container_of(ibwq, struct mlx5_ib_rwq, ibwq); in to_mrwq()
1268 static inline struct mlx5_ib_rwq_ind_table *to_mrwq_ind_table(struct ib_rwq_ind_table *ib_rwq_ind_t… in to_mrwq_ind_table()
1270 return container_of(ib_rwq_ind_tbl, struct mlx5_ib_rwq_ind_table, ib_rwq_ind_tbl); in to_mrwq_ind_table()
1273 static inline struct mlx5_ib_srq *to_mibsrq(struct mlx5_core_srq *msrq) in to_mibsrq()
1275 return container_of(msrq, struct mlx5_ib_srq, msrq); in to_mibsrq()
1278 static inline struct mlx5_ib_mr *to_mmr(struct ib_mr *ibmr) in to_mmr()
1280 return container_of(ibmr, struct mlx5_ib_mr, ibmr); in to_mmr()
1283 static inline struct mlx5_ib_mw *to_mmw(struct ib_mw *ibmw) in to_mmw()
1285 return container_of(ibmw, struct mlx5_ib_mw, ibmw); in to_mmw()
1288 static inline struct mlx5_ib_flow_action *
1289 to_mflow_act(struct ib_flow_action *ibact) in to_mflow_act()
1291 return container_of(ibact, struct mlx5_ib_flow_action, ib_action); in to_mflow_act()
1294 static inline struct mlx5_user_mmap_entry *
1295 to_mmmap(struct rdma_user_mmap_entry *rdma_entry) in to_mmmap()
1298 struct mlx5_user_mmap_entry, rdma_entry); in to_mmmap()
1301 int mlx5_ib_dev_res_cq_init(struct mlx5_ib_dev *dev);
1302 int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev);
1303 int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context, unsigned long virt,
1304 struct mlx5_db *db);
1305 void mlx5_ib_db_unmap_user(struct mlx5_ib_ucontext *context, struct mlx5_db *db);
1306 void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1307 void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1308 void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int wqe_index);
1309 int mlx5_ib_create_ah(struct ib_ah *ah, struct rdma_ah_init_attr *init_attr,
1310 struct ib_udata *udata);
1311 int mlx5_ib_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
1312 static inline int mlx5_ib_destroy_ah(struct ib_ah *ah, u32 flags) in mlx5_ib_destroy_ah()
1316 int mlx5_ib_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
1317 struct ib_udata *udata);
1318 int mlx5_ib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
1319 enum ib_srq_attr_mask attr_mask, struct ib_udata *udata);
1320 int mlx5_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr);
1321 int mlx5_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
1322 int mlx5_ib_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
1323 const struct ib_recv_wr **bad_wr);
1324 int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1325 void mlx5_ib_disable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1326 int mlx5_ib_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *init_attr,
1327 struct ib_udata *udata);
1328 int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1329 int attr_mask, struct ib_udata *udata);
1330 int mlx5_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask,
1331 struct ib_qp_init_attr *qp_init_attr);
1332 int mlx5_ib_destroy_qp(struct ib_qp *qp, struct ib_udata *udata);
1333 void mlx5_ib_drain_sq(struct ib_qp *qp);
1334 void mlx5_ib_drain_rq(struct ib_qp *qp);
1335 int mlx5_ib_read_wqe_sq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1337 int mlx5_ib_read_wqe_rq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1339 int mlx5_ib_read_wqe_srq(struct mlx5_ib_srq *srq, int wqe_index, void *buffer,
1341 int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
1342 struct uverbs_attr_bundle *attrs);
1343 int mlx5_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata);
1344 int mlx5_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
1345 int mlx5_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags);
1346 int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
1347 int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata);
1348 struct ib_mr *mlx5_ib_get_dma_mr(struct ib_pd *pd, int acc);
1349 struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
1351 struct ib_udata *udata);
1352 struct ib_mr *mlx5_ib_reg_user_mr_dmabuf(struct ib_pd *pd, u64 start,
1355 struct uverbs_attr_bundle *attrs);
1356 int mlx5_ib_advise_mr(struct ib_pd *pd,
1359 struct ib_sge *sg_list,
1361 struct uverbs_attr_bundle *attrs);
1362 int mlx5_ib_alloc_mw(struct ib_mw *mw, struct ib_udata *udata);
1363 int mlx5_ib_dealloc_mw(struct ib_mw *mw);
1364 struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
1366 void mlx5_ib_free_odp_mr(struct mlx5_ib_mr *mr);
1367 struct ib_mr *mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
1369 struct ib_pd *pd, struct ib_udata *udata);
1370 int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata);
1371 struct ib_mr *mlx5_ib_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
1373 struct ib_mr *mlx5_ib_alloc_mr_integrity(struct ib_pd *pd,
1376 int mlx5_ib_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
1378 int mlx5_ib_map_mr_sg_pi(struct ib_mr *ibmr, struct scatterlist *data_sg,
1380 struct scatterlist *meta_sg, int meta_sg_nents,
1382 int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num,
1383 const struct ib_wc *in_wc, const struct ib_grh *in_grh,
1384 const struct ib_mad *in, struct ib_mad *out,
1386 int mlx5_ib_alloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1387 int mlx5_ib_dealloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1388 int mlx5_query_ext_port_caps(struct mlx5_ib_dev *dev, unsigned int port);
1389 int mlx5_query_mad_ifc_system_image_guid(struct ib_device *ibdev,
1391 int mlx5_query_mad_ifc_max_pkeys(struct ib_device *ibdev,
1393 int mlx5_query_mad_ifc_vendor_id(struct ib_device *ibdev,
1395 int mlx5_query_mad_ifc_node_desc(struct mlx5_ib_dev *dev, char *node_desc);
1396 int mlx5_query_mad_ifc_node_guid(struct mlx5_ib_dev *dev, __be64 *node_guid);
1397 int mlx5_query_mad_ifc_pkey(struct ib_device *ibdev, u32 port, u16 index,
1399 int mlx5_query_mad_ifc_gids(struct ib_device *ibdev, u32 port, int index,
1401 int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port,
1402 struct ib_port_attr *props);
1403 int mlx5_ib_query_port(struct ib_device *ibdev, u32 port,
1404 struct ib_port_attr *props);
1405 void mlx5_ib_populate_pas(struct ib_umem *umem, size_t page_size, __be64 *pas,
1407 int mlx5_ib_get_cqe_size(struct ib_cq *ibcq);
1408 int mlx5_mkey_cache_init(struct mlx5_ib_dev *dev);
1409 void mlx5_mkey_cache_cleanup(struct mlx5_ib_dev *dev);
1410 struct mlx5_cache_ent *
1411 mlx5r_cache_create_ent_locked(struct mlx5_ib_dev *dev,
1412 struct mlx5r_cache_rb_key rb_key,
1415 struct mlx5_ib_mr *mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev,
1419 int mlx5_ib_check_mr_status(struct ib_mr *ibmr, u32 check_mask,
1420 struct ib_mr_status *mr_status);
1421 struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
1422 struct ib_wq_init_attr *init_attr,
1423 struct ib_udata *udata);
1424 int mlx5_ib_destroy_wq(struct ib_wq *wq, struct ib_udata *udata);
1425 int mlx5_ib_modify_wq(struct ib_wq *wq, struct ib_wq_attr *wq_attr,
1426 u32 wq_attr_mask, struct ib_udata *udata);
1427 int mlx5_ib_create_rwq_ind_table(struct ib_rwq_ind_table *ib_rwq_ind_table,
1428 struct ib_rwq_ind_table_init_attr *init_attr,
1429 struct ib_udata *udata);
1430 int mlx5_ib_destroy_rwq_ind_table(struct ib_rwq_ind_table *wq_ind_table);
1431 struct ib_mr *mlx5_ib_reg_dm_mr(struct ib_pd *pd, struct ib_dm *dm,
1432 struct ib_dm_mr_attr *attr,
1433 struct uverbs_attr_bundle *attrs);
1434 void mlx5_ib_data_direct_bind(struct mlx5_ib_dev *ibdev,
1435 struct mlx5_data_direct_dev *dev);
1436 void mlx5_ib_data_direct_unbind(struct mlx5_ib_dev *ibdev);
1437 void mlx5_ib_revoke_data_direct_mrs(struct mlx5_ib_dev *dev);
1440 int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev);
1441 int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq);
1442 void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev);
1445 int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev);
1447 struct mlx5_ib_mr *mr, int flags);
1449 int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
1451 u32 flags, struct ib_sge *sg_list, u32 num_sge);
1452 int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr);
1453 int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr);
1455 static inline int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev) { return 0; } in mlx5_ib_odp_init_one()
1456 static inline int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, in mlx5r_odp_create_eq()
1457 struct mlx5_ib_pf_eq *eq) in mlx5r_odp_create_eq()
1461 static inline void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev) {} in mlx5_ib_odp_cleanup_one()
1464 static inline int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev) in mlx5_odp_init_mkey_cache()
1469 struct mlx5_ib_mr *mr, int flags) {} in mlx5_odp_populate_xlt()
1472 mlx5_ib_advise_mr_prefetch(struct ib_pd *pd, in mlx5_ib_advise_mr_prefetch()
1474 struct ib_sge *sg_list, u32 num_sge) in mlx5_ib_advise_mr_prefetch()
1478 static inline int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_odp_mr()
1482 static inline int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_dmabuf_mr()
1488 extern const struct mmu_interval_notifier_ops mlx5_mn_ops;
1491 void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
1492 const struct mlx5_ib_profile *profile,
1494 int __mlx5_ib_add(struct mlx5_ib_dev *dev,
1495 const struct mlx5_ib_profile *profile);
1497 int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
1498 u32 port, struct ifla_vf_info *info);
1499 int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
1501 int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
1502 u32 port, struct ifla_vf_stats *stats);
1503 int mlx5_ib_get_vf_guid(struct ib_device *device, int vf, u32 port,
1504 struct ifla_vf_guid *node_guid,
1505 struct ifla_vf_guid *port_guid);
1506 int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u32 port,
1509 __be16 mlx5_get_roce_udp_sport_min(const struct mlx5_ib_dev *dev,
1510 const struct ib_gid_attr *attr);
1512 void mlx5_ib_cleanup_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1513 void mlx5_ib_init_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1516 int mlx5_ib_create_gsi(struct ib_pd *pd, struct mlx5_ib_qp *mqp,
1517 struct ib_qp_init_attr *attr);
1518 int mlx5_ib_destroy_gsi(struct mlx5_ib_qp *mqp);
1519 int mlx5_ib_gsi_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
1521 int mlx5_ib_gsi_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
1523 struct ib_qp_init_attr *qp_init_attr);
1524 int mlx5_ib_gsi_post_send(struct ib_qp *qp, const struct ib_send_wr *wr,
1525 const struct ib_send_wr **bad_wr);
1526 int mlx5_ib_gsi_post_recv(struct ib_qp *qp, const struct ib_recv_wr *wr,
1527 const struct ib_recv_wr **bad_wr);
1528 void mlx5_ib_gsi_pkey_change(struct mlx5_ib_gsi_qp *gsi);
1530 int mlx5_ib_generate_wc(struct ib_cq *ibcq, struct ib_wc *wc);
1532 void mlx5_ib_free_bfreg(struct mlx5_ib_dev *dev, struct mlx5_bfreg_info *bfregi,
1534 struct mlx5_ib_dev *mlx5_ib_get_ibdev_from_mpi(struct mlx5_ib_multiport_info *mpi);
1535 struct mlx5_core_dev *mlx5_ib_get_native_port_mdev(struct mlx5_ib_dev *dev,
1538 void mlx5_ib_put_native_port_mdev(struct mlx5_ib_dev *dev,
1541 extern const struct uapi_definition mlx5_ib_devx_defs[];
1542 extern const struct uapi_definition mlx5_ib_flow_defs[];
1543 extern const struct uapi_definition mlx5_ib_qos_defs[];
1544 extern const struct uapi_definition mlx5_ib_std_types_defs[];
1545 extern const struct uapi_definition mlx5_ib_create_cq_defs[];
1577 static inline int get_qp_user_index(struct mlx5_ib_ucontext *ucontext, in get_qp_user_index()
1578 struct mlx5_ib_create_qp *ucmd, in get_qp_user_index()
1594 static inline int get_srq_user_index(struct mlx5_ib_ucontext *ucontext, in get_srq_user_index()
1595 struct mlx5_ib_create_srq *ucmd, in get_srq_user_index()
1611 static inline int get_uars_per_sys_page(struct mlx5_ib_dev *dev, bool lib_support) in get_uars_per_sys_page()
1619 int bfregn_to_uar_index(struct mlx5_ib_dev *dev,
1620 struct mlx5_bfreg_info *bfregi, u32 bfregn,
1623 static inline int mlx5r_store_odp_mkey(struct mlx5_ib_dev *dev, in mlx5r_store_odp_mkey()
1624 struct mlx5_ib_mkey *mmkey) in mlx5r_store_odp_mkey()
1633 static inline void mlx5r_deref_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_odp_mkey()
1640 static inline void mlx5r_deref_wait_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_wait_odp_mkey()
1646 static inline bool mlx5_ib_lag_should_assign_affinity(struct mlx5_ib_dev *dev) in mlx5_ib_lag_should_assign_affinity()
1701 static inline bool mlx5_umem_needs_ats(struct mlx5_ib_dev *dev, in mlx5_umem_needs_ats()
1702 struct ib_umem *umem, int access_flags) in mlx5_umem_needs_ats()
1709 int set_roce_addr(struct mlx5_ib_dev *dev, u32 port_num,
1711 const struct ib_gid_attr *attr);
1713 static inline u32 smi_to_native_portnum(struct mlx5_ib_dev *dev, u32 port) in smi_to_native_portnum()
1723 mlx5_umem_mkc_find_best_pgsz(struct mlx5_ib_dev *dev, struct ib_umem *umem, in mlx5_umem_mkc_find_best_pgsz()