Lines Matching full:struct
94 struct ib_umem *umem, unsigned long pgsz_bitmap,
178 struct mlx5_bfreg_info {
186 struct mutex lock;
196 struct mlx5_ib_ucontext {
197 struct ib_ucontext ibucontext;
198 struct list_head db_page_list;
202 struct mutex db_page_mutex;
203 struct mlx5_bfreg_info bfregi;
214 static inline struct mlx5_ib_ucontext *to_mucontext(struct ib_ucontext *ibucontext) in to_mucontext()
216 return container_of(ibucontext, struct mlx5_ib_ucontext, ibucontext); in to_mucontext()
219 struct mlx5_ib_pd {
220 struct ib_pd ibpd;
243 struct mlx5_ib_anchor {
244 struct mlx5_flow_table *ft;
245 struct mlx5_flow_group *fg_goto_table;
246 struct mlx5_flow_group *fg_drop;
247 struct mlx5_flow_handle *rule_goto_table;
248 struct mlx5_flow_handle *rule_drop;
252 struct mlx5_ib_flow_prio {
253 struct mlx5_flow_table *flow_table;
254 struct mlx5_ib_anchor anchor;
258 struct mlx5_ib_flow_handler {
259 struct list_head list;
260 struct ib_flow ibflow;
261 struct mlx5_ib_flow_prio *prio;
262 struct mlx5_flow_handle *rule;
263 struct ib_counters *ibcounters;
264 struct mlx5_ib_dev *dev;
265 struct mlx5_ib_flow_matcher *flow_matcher;
268 struct mlx5_ib_flow_matcher {
269 struct mlx5_ib_match_params matcher_mask;
274 struct mlx5_core_dev *mdev;
279 struct mlx5_ib_steering_anchor {
280 struct mlx5_ib_flow_prio *ft_prio;
281 struct mlx5_ib_dev *dev;
285 struct mlx5_ib_pp {
287 struct mlx5_core_dev *mdev;
298 struct mlx5_ib_flow_db {
299 struct mlx5_ib_flow_prio prios[MLX5_IB_NUM_FLOW_FT];
300 struct mlx5_ib_flow_prio egress_prios[MLX5_IB_NUM_FLOW_FT];
301 struct mlx5_ib_flow_prio sniffer[MLX5_IB_NUM_SNIFFER_FTS];
302 struct mlx5_ib_flow_prio egress[MLX5_IB_NUM_EGRESS_FTS];
303 struct mlx5_ib_flow_prio fdb[MLX5_IB_NUM_FDB_FTS];
304 struct mlx5_ib_flow_prio rdma_rx[MLX5_IB_NUM_FLOW_FT];
305 struct mlx5_ib_flow_prio rdma_tx[MLX5_IB_NUM_FLOW_FT];
306 struct mlx5_ib_flow_prio opfcs[MLX5_IB_OPCOUNTER_MAX];
307 struct mlx5_flow_table *lag_demux_ft;
313 struct mutex lock;
346 struct wr_list {
356 struct mlx5_ib_wq {
357 struct mlx5_frag_buf_ctrl fbc;
360 struct wr_list *w_list;
390 struct mlx5_ib_rwq {
391 struct ib_wq ibwq;
392 struct mlx5_core_qp core_qp;
401 struct ib_umem *umem;
404 struct mlx5_db db;
412 struct mlx5_ib_rwq_ind_table {
413 struct ib_rwq_ind_table ib_rwq_ind_tbl;
418 struct mlx5_ib_ubuffer {
419 struct ib_umem *umem;
424 struct mlx5_ib_qp_base {
425 struct mlx5_ib_qp *container_mibqp;
426 struct mlx5_core_qp mqp;
427 struct mlx5_ib_ubuffer ubuffer;
430 struct mlx5_ib_qp_trans {
431 struct mlx5_ib_qp_base base;
438 struct mlx5_ib_rss_qp {
442 struct mlx5_ib_rq {
443 struct mlx5_ib_qp_base base;
444 struct mlx5_ib_wq *rq;
445 struct mlx5_ib_ubuffer ubuffer;
446 struct mlx5_db *doorbell;
452 struct mlx5_ib_sq {
453 struct mlx5_ib_qp_base base;
454 struct mlx5_ib_wq *sq;
455 struct mlx5_ib_ubuffer ubuffer;
456 struct mlx5_db *doorbell;
457 struct mlx5_flow_handle *flow_rule;
462 struct mlx5_ib_raw_packet_qp {
463 struct mlx5_ib_sq sq;
464 struct mlx5_ib_rq rq;
467 struct mlx5_bf {
470 struct mlx5_sq_bfreg *bfreg;
473 struct mlx5_ib_dct {
474 struct mlx5_core_dct mdct;
478 struct mlx5_ib_gsi_qp {
479 struct ib_qp *rx_qp;
481 struct ib_qp_cap cap;
482 struct ib_cq *cq;
483 struct mlx5_ib_gsi_wr *outstanding_wrs;
491 struct ib_qp **tx_qps;
494 struct mlx5_ib_qp {
495 struct ib_qp ibqp;
497 struct mlx5_ib_qp_trans trans_qp;
498 struct mlx5_ib_raw_packet_qp raw_packet_qp;
499 struct mlx5_ib_rss_qp rss_qp;
500 struct mlx5_ib_dct dct;
501 struct mlx5_ib_gsi_qp gsi;
503 struct mlx5_frag_buf buf;
505 struct mlx5_db db;
506 struct mlx5_ib_wq rq;
510 struct mlx5_ib_wq sq;
514 struct mutex mutex;
515 /* cached variant of create_flags from struct ib_qp_init_attr */
520 struct mlx5_bf bf;
529 struct list_head qps_list;
530 struct list_head cq_recv_list;
531 struct list_head cq_send_list;
532 struct mlx5_rate_limit rl;
547 struct mlx5_ib_cq_buf {
548 struct mlx5_frag_buf_ctrl fbc;
549 struct mlx5_frag_buf frag_buf;
550 struct ib_umem *umem;
560 struct mlx5_ib_cq {
561 struct ib_cq ibcq;
562 struct mlx5_core_cq mcq;
563 struct mlx5_ib_cq_buf buf;
564 struct mlx5_db db;
572 struct mutex resize_mutex;
573 struct mlx5_ib_cq_buf *resize_buf;
574 struct ib_umem *resize_umem;
576 struct list_head list_send_qp;
577 struct list_head list_recv_qp;
579 struct list_head wc_list;
581 struct work_struct notify_work;
585 struct mlx5_ib_wc {
586 struct ib_wc wc;
587 struct list_head list;
590 struct mlx5_ib_srq {
591 struct ib_srq ibsrq;
592 struct mlx5_core_srq msrq;
593 struct mlx5_frag_buf buf;
594 struct mlx5_db db;
595 struct mlx5_frag_buf_ctrl fbc;
603 struct ib_umem *umem;
606 struct mutex mutex;
610 struct mlx5_ib_xrcd {
611 struct ib_xrcd ibxrcd;
620 struct mlx5_user_mmap_entry {
621 struct rdma_user_mmap_entry rdma_entry;
633 struct mlx5r_cache_rb_key {
640 struct mlx5_ib_mkey {
644 struct wait_queue_head wait;
647 struct mlx5r_cache_rb_key rb_key;
648 struct mlx5_cache_ent *cache_ent;
667 struct mlx5_ib_mr {
668 struct ib_mr ibmr;
669 struct mlx5_ib_mkey mmkey;
671 struct ib_umem *umem;
675 struct {
684 struct mlx5_core_sig_ctx *sig;
685 struct mlx5_ib_mr *pi_mr;
686 struct mlx5_ib_mr *klm_mr;
687 struct mlx5_ib_mr *mtt_mr;
696 struct {
702 struct mlx5_ib_mr *parent;
703 struct xarray implicit_children;
705 struct work_struct work;
707 struct ib_odp_counters odp_stats;
713 static inline bool is_odp_mr(struct mlx5_ib_mr *mr) in is_odp_mr()
719 static inline bool is_dmabuf_mr(struct mlx5_ib_mr *mr) in is_dmabuf_mr()
725 struct mlx5_ib_mw {
726 struct ib_mw ibmw;
727 struct mlx5_ib_mkey mmkey;
730 struct mlx5_ib_umr_context {
731 struct ib_cqe cqe;
733 struct completion done;
743 struct umr_common {
744 struct ib_pd *pd;
745 struct ib_cq *cq;
746 struct ib_qp *qp;
749 struct semaphore sem;
752 struct mutex lock;
757 ((PAGE_SIZE - sizeof(struct list_head)) / sizeof(u32))
759 struct mlx5_mkeys_page {
761 struct list_head list;
763 static_assert(sizeof(struct mlx5_mkeys_page) == PAGE_SIZE);
765 struct mlx5_mkeys_queue {
766 struct list_head pages_list;
772 struct mlx5_cache_ent {
773 struct mlx5_mkeys_queue mkeys_queue;
778 struct rb_node node;
779 struct mlx5r_cache_rb_key rb_key;
795 struct mlx5_ib_dev *dev;
796 struct delayed_work dwork;
799 struct mlx5r_async_create_mkey {
804 struct mlx5_async_work cb_work;
805 struct mlx5_cache_ent *ent;
809 struct mlx5_mkey_cache {
810 struct workqueue_struct *wq;
811 struct rb_root rb_root;
812 struct mutex rb_lock;
813 struct dentry *fs_root;
815 struct delayed_work remove_ent_dwork;
818 struct mlx5_ib_port_resources {
819 struct mlx5_ib_gsi_qp *gsi;
820 struct work_struct pkey_change_work;
823 struct mlx5_ib_resources {
824 struct ib_cq *c0;
827 struct ib_pd *p0;
828 struct ib_srq *s0;
829 struct ib_srq *s1;
830 struct mlx5_ib_port_resources ports[2];
835 struct mlx5_ib_op_fc {
836 struct mlx5_fc *fc;
837 struct mlx5_flow_handle *rule[MAX_OPFC_RULES];
840 struct mlx5_ib_counters {
841 struct rdma_stat_desc *descs;
848 struct mlx5_ib_op_fc opfcs[MLX5_IB_OPCOUNTER_MAX];
851 int mlx5_ib_fs_add_op_fc(struct mlx5_ib_dev *dev, u32 port_num,
852 struct mlx5_ib_op_fc *opfc,
855 void mlx5_ib_fs_remove_op_fc(struct mlx5_ib_dev *dev,
856 struct mlx5_ib_op_fc *opfc,
859 struct mlx5_ib_multiport_info;
861 struct mlx5_ib_multiport {
862 struct mlx5_ib_multiport_info *mpi;
867 struct mlx5_roce {
872 struct net_device *netdev;
873 struct notifier_block nb;
874 struct netdev_net_notifier nn;
875 struct notifier_block mdev_nb;
876 struct net_device *tracking_netdev;
879 struct mlx5_ib_dev *dev;
883 struct mlx5_ib_port {
884 struct mlx5_ib_counters cnts;
885 struct mlx5_ib_multiport mp;
886 struct mlx5_ib_dbg_cc_params *dbg_cc_params;
887 struct mlx5_roce roce;
888 struct mlx5_eswitch_rep *rep;
890 struct mlx5_reserved_gids *reserved_gids;
894 struct mlx5_ib_dbg_param {
896 struct mlx5_ib_dev *dev;
897 struct dentry *dentry;
927 struct mlx5_ib_dbg_cc_params {
928 struct dentry *root;
929 struct mlx5_ib_dbg_param params[MLX5_IB_DBG_CC_MAX];
936 struct mlx5_ib_delay_drop {
937 struct mlx5_ib_dev *dev;
938 struct work_struct delay_drop_work;
940 struct mutex lock;
945 struct dentry *dir_debugfs;
972 struct mlx5_ib_stage {
973 int (*init)(struct mlx5_ib_dev *dev);
974 void (*cleanup)(struct mlx5_ib_dev *dev);
980 struct mlx5_ib_profile {
981 struct mlx5_ib_stage stage[MLX5_IB_STAGE_MAX];
984 struct mlx5_ib_multiport_info {
985 struct list_head list;
986 struct mlx5_ib_dev *ibdev;
987 struct mlx5_core_dev *mdev;
988 struct notifier_block mdev_events;
989 struct completion unref_comp;
996 struct mlx5_ib_flow_action {
997 struct ib_flow_action ib_action;
999 struct {
1001 struct mlx5_accel_esp_xfrm *ctx;
1003 struct {
1004 struct mlx5_ib_dev *dev;
1007 struct mlx5_modify_hdr *modify_hdr;
1008 struct mlx5_pkt_reformat *pkt_reformat;
1014 struct mlx5_dm {
1015 struct mlx5_core_dev *dev;
1024 struct mlx5_read_counters_attr {
1025 struct mlx5_fc *hw_cntrs_hndl;
1034 struct mlx5_ib_mcounters {
1035 struct ib_counters ibcntrs;
1039 struct mlx5_fc *hw_cntrs_hndl;
1041 int (*read_counters)(struct ib_device *ibdev,
1042 struct mlx5_read_counters_attr *read_attr);
1048 struct mlx5_ib_flow_counters_desc *counters_data;
1050 struct mutex mcntrs_mutex;
1053 static inline struct mlx5_ib_mcounters *
1054 to_mcounters(struct ib_counters *ibcntrs) in to_mcounters()
1056 return container_of(ibcntrs, struct mlx5_ib_mcounters, ibcntrs); in to_mcounters()
1059 int parse_flow_flow_action(struct mlx5_ib_flow_action *maction,
1061 struct mlx5_flow_act *action);
1062 struct mlx5_ib_lb_state {
1064 struct mutex mutex;
1070 struct mlx5_ib_pf_eq {
1071 struct notifier_block irq_nb;
1072 struct mlx5_ib_dev *dev;
1073 struct mlx5_eq *core;
1074 struct work_struct work;
1076 struct workqueue_struct *wq;
1080 struct mlx5_devx_event_table {
1081 struct mlx5_nb devx_nb;
1083 struct mutex event_xa_lock;
1084 struct xarray event_xa;
1087 struct mlx5_var_table {
1089 struct mutex bitmap_lock;
1096 struct mlx5_port_caps {
1102 struct mlx5_special_mkeys {
1108 struct mlx5_macsec {
1109 struct mutex lock; /* Protects mlx5_macsec internal contexts */
1110 struct list_head macsec_devices_list;
1111 struct notifier_block blocking_events_nb;
1114 struct mlx5_ib_dev {
1115 struct ib_device ib_dev;
1116 struct mlx5_core_dev *mdev;
1117 struct notifier_block mdev_events;
1121 struct mutex cap_mask_mutex;
1127 struct umr_common umrc;
1130 struct mlx5_ib_resources devr;
1133 struct mlx5_mkey_cache cache;
1134 struct timer_list delay_timer;
1136 struct mutex slow_path_mutex;
1137 struct ib_odp_caps odp_caps;
1139 struct mutex odp_eq_mutex;
1140 struct mlx5_ib_pf_eq odp_pf_eq;
1142 struct xarray odp_mkeys;
1144 struct mlx5_ib_flow_db *flow_db;
1147 struct list_head qp_list;
1149 struct mlx5_ib_port *port;
1150 struct mlx5_sq_bfreg bfreg;
1151 struct mlx5_sq_bfreg wc_bfreg;
1152 struct mlx5_sq_bfreg fp_bfreg;
1153 struct mlx5_ib_delay_drop delay_drop;
1154 const struct mlx5_ib_profile *profile;
1156 struct mlx5_ib_lb_state lb;
1158 struct list_head ib_dev_list;
1160 struct mlx5_dm dm;
1162 struct mlx5_srq_table srq_table;
1163 struct mlx5_qp_table qp_table;
1164 struct mlx5_async_ctx async_ctx;
1165 struct mlx5_devx_event_table devx_event_table;
1166 struct mlx5_var_table var_table;
1168 struct xarray sig_mrs;
1169 struct mlx5_port_caps port_caps[MLX5_MAX_PORTS];
1172 struct mlx5_special_mkeys mkeys;
1175 struct mlx5_macsec macsec;
1179 static inline struct mlx5_ib_cq *to_mibcq(struct mlx5_core_cq *mcq) in to_mibcq()
1181 return container_of(mcq, struct mlx5_ib_cq, mcq); in to_mibcq()
1184 static inline struct mlx5_ib_xrcd *to_mxrcd(struct ib_xrcd *ibxrcd) in to_mxrcd()
1186 return container_of(ibxrcd, struct mlx5_ib_xrcd, ibxrcd); in to_mxrcd()
1189 static inline struct mlx5_ib_dev *to_mdev(struct ib_device *ibdev) in to_mdev()
1191 return container_of(ibdev, struct mlx5_ib_dev, ib_dev); in to_mdev()
1194 static inline struct mlx5_ib_dev *mr_to_mdev(struct mlx5_ib_mr *mr) in mr_to_mdev()
1199 static inline struct mlx5_ib_dev *mlx5_udata_to_mdev(struct ib_udata *udata) in mlx5_udata_to_mdev()
1201 struct mlx5_ib_ucontext *context = rdma_udata_to_drv_context( in mlx5_udata_to_mdev()
1202 udata, struct mlx5_ib_ucontext, ibucontext); in mlx5_udata_to_mdev()
1207 static inline struct mlx5_ib_cq *to_mcq(struct ib_cq *ibcq) in to_mcq()
1209 return container_of(ibcq, struct mlx5_ib_cq, ibcq); in to_mcq()
1212 static inline struct mlx5_ib_qp *to_mibqp(struct mlx5_core_qp *mqp) in to_mibqp()
1214 return container_of(mqp, struct mlx5_ib_qp_base, mqp)->container_mibqp; in to_mibqp()
1217 static inline struct mlx5_ib_rwq *to_mibrwq(struct mlx5_core_qp *core_qp) in to_mibrwq()
1219 return container_of(core_qp, struct mlx5_ib_rwq, core_qp); in to_mibrwq()
1222 static inline struct mlx5_ib_pd *to_mpd(struct ib_pd *ibpd) in to_mpd()
1224 return container_of(ibpd, struct mlx5_ib_pd, ibpd); in to_mpd()
1227 static inline struct mlx5_ib_srq *to_msrq(struct ib_srq *ibsrq) in to_msrq()
1229 return container_of(ibsrq, struct mlx5_ib_srq, ibsrq); in to_msrq()
1232 static inline struct mlx5_ib_qp *to_mqp(struct ib_qp *ibqp) in to_mqp()
1234 return container_of(ibqp, struct mlx5_ib_qp, ibqp); in to_mqp()
1237 static inline struct mlx5_ib_rwq *to_mrwq(struct ib_wq *ibwq) in to_mrwq()
1239 return container_of(ibwq, struct mlx5_ib_rwq, ibwq); in to_mrwq()
1242 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()
1244 return container_of(ib_rwq_ind_tbl, struct mlx5_ib_rwq_ind_table, ib_rwq_ind_tbl); in to_mrwq_ind_table()
1247 static inline struct mlx5_ib_srq *to_mibsrq(struct mlx5_core_srq *msrq) in to_mibsrq()
1249 return container_of(msrq, struct mlx5_ib_srq, msrq); in to_mibsrq()
1252 static inline struct mlx5_ib_mr *to_mmr(struct ib_mr *ibmr) in to_mmr()
1254 return container_of(ibmr, struct mlx5_ib_mr, ibmr); in to_mmr()
1257 static inline struct mlx5_ib_mw *to_mmw(struct ib_mw *ibmw) in to_mmw()
1259 return container_of(ibmw, struct mlx5_ib_mw, ibmw); in to_mmw()
1262 static inline struct mlx5_ib_flow_action *
1263 to_mflow_act(struct ib_flow_action *ibact) in to_mflow_act()
1265 return container_of(ibact, struct mlx5_ib_flow_action, ib_action); in to_mflow_act()
1268 static inline struct mlx5_user_mmap_entry *
1269 to_mmmap(struct rdma_user_mmap_entry *rdma_entry) in to_mmmap()
1272 struct mlx5_user_mmap_entry, rdma_entry); in to_mmmap()
1275 int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context, unsigned long virt,
1276 struct mlx5_db *db);
1277 void mlx5_ib_db_unmap_user(struct mlx5_ib_ucontext *context, struct mlx5_db *db);
1278 void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1279 void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1280 void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int wqe_index);
1281 int mlx5_ib_create_ah(struct ib_ah *ah, struct rdma_ah_init_attr *init_attr,
1282 struct ib_udata *udata);
1283 int mlx5_ib_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
1284 static inline int mlx5_ib_destroy_ah(struct ib_ah *ah, u32 flags) in mlx5_ib_destroy_ah()
1288 int mlx5_ib_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
1289 struct ib_udata *udata);
1290 int mlx5_ib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
1291 enum ib_srq_attr_mask attr_mask, struct ib_udata *udata);
1292 int mlx5_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr);
1293 int mlx5_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
1294 int mlx5_ib_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
1295 const struct ib_recv_wr **bad_wr);
1296 int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1297 void mlx5_ib_disable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1298 int mlx5_ib_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *init_attr,
1299 struct ib_udata *udata);
1300 int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1301 int attr_mask, struct ib_udata *udata);
1302 int mlx5_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask,
1303 struct ib_qp_init_attr *qp_init_attr);
1304 int mlx5_ib_destroy_qp(struct ib_qp *qp, struct ib_udata *udata);
1305 void mlx5_ib_drain_sq(struct ib_qp *qp);
1306 void mlx5_ib_drain_rq(struct ib_qp *qp);
1307 int mlx5_ib_read_wqe_sq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1309 int mlx5_ib_read_wqe_rq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1311 int mlx5_ib_read_wqe_srq(struct mlx5_ib_srq *srq, int wqe_index, void *buffer,
1313 int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
1314 struct ib_udata *udata);
1315 int mlx5_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata);
1316 int mlx5_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
1317 int mlx5_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags);
1318 int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
1319 int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata);
1320 struct ib_mr *mlx5_ib_get_dma_mr(struct ib_pd *pd, int acc);
1321 struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
1323 struct ib_udata *udata);
1324 struct ib_mr *mlx5_ib_reg_user_mr_dmabuf(struct ib_pd *pd, u64 start,
1327 struct ib_udata *udata);
1328 int mlx5_ib_advise_mr(struct ib_pd *pd,
1331 struct ib_sge *sg_list,
1333 struct uverbs_attr_bundle *attrs);
1334 int mlx5_ib_alloc_mw(struct ib_mw *mw, struct ib_udata *udata);
1335 int mlx5_ib_dealloc_mw(struct ib_mw *mw);
1336 struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
1338 void mlx5_ib_free_implicit_mr(struct mlx5_ib_mr *mr);
1339 void mlx5_ib_free_odp_mr(struct mlx5_ib_mr *mr);
1340 struct ib_mr *mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
1342 struct ib_pd *pd, struct ib_udata *udata);
1343 int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata);
1344 struct ib_mr *mlx5_ib_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
1346 struct ib_mr *mlx5_ib_alloc_mr_integrity(struct ib_pd *pd,
1349 int mlx5_ib_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
1351 int mlx5_ib_map_mr_sg_pi(struct ib_mr *ibmr, struct scatterlist *data_sg,
1353 struct scatterlist *meta_sg, int meta_sg_nents,
1355 int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num,
1356 const struct ib_wc *in_wc, const struct ib_grh *in_grh,
1357 const struct ib_mad *in, struct ib_mad *out,
1359 int mlx5_ib_alloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1360 int mlx5_ib_dealloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1361 int mlx5_query_ext_port_caps(struct mlx5_ib_dev *dev, unsigned int port);
1362 int mlx5_query_mad_ifc_system_image_guid(struct ib_device *ibdev,
1364 int mlx5_query_mad_ifc_max_pkeys(struct ib_device *ibdev,
1366 int mlx5_query_mad_ifc_vendor_id(struct ib_device *ibdev,
1368 int mlx5_query_mad_ifc_node_desc(struct mlx5_ib_dev *dev, char *node_desc);
1369 int mlx5_query_mad_ifc_node_guid(struct mlx5_ib_dev *dev, __be64 *node_guid);
1370 int mlx5_query_mad_ifc_pkey(struct ib_device *ibdev, u32 port, u16 index,
1372 int mlx5_query_mad_ifc_gids(struct ib_device *ibdev, u32 port, int index,
1374 int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port,
1375 struct ib_port_attr *props);
1376 int mlx5_ib_query_port(struct ib_device *ibdev, u32 port,
1377 struct ib_port_attr *props);
1378 void mlx5_ib_populate_pas(struct ib_umem *umem, size_t page_size, __be64 *pas,
1381 int mlx5_ib_get_cqe_size(struct ib_cq *ibcq);
1382 int mlx5_mkey_cache_init(struct mlx5_ib_dev *dev);
1383 void mlx5_mkey_cache_cleanup(struct mlx5_ib_dev *dev);
1384 struct mlx5_cache_ent *
1385 mlx5r_cache_create_ent_locked(struct mlx5_ib_dev *dev,
1386 struct mlx5r_cache_rb_key rb_key,
1389 struct mlx5_ib_mr *mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev,
1393 int mlx5_ib_check_mr_status(struct ib_mr *ibmr, u32 check_mask,
1394 struct ib_mr_status *mr_status);
1395 struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
1396 struct ib_wq_init_attr *init_attr,
1397 struct ib_udata *udata);
1398 int mlx5_ib_destroy_wq(struct ib_wq *wq, struct ib_udata *udata);
1399 int mlx5_ib_modify_wq(struct ib_wq *wq, struct ib_wq_attr *wq_attr,
1400 u32 wq_attr_mask, struct ib_udata *udata);
1401 int mlx5_ib_create_rwq_ind_table(struct ib_rwq_ind_table *ib_rwq_ind_table,
1402 struct ib_rwq_ind_table_init_attr *init_attr,
1403 struct ib_udata *udata);
1404 int mlx5_ib_destroy_rwq_ind_table(struct ib_rwq_ind_table *wq_ind_table);
1405 struct ib_mr *mlx5_ib_reg_dm_mr(struct ib_pd *pd, struct ib_dm *dm,
1406 struct ib_dm_mr_attr *attr,
1407 struct uverbs_attr_bundle *attrs);
1410 int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev);
1411 int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq);
1412 void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev);
1415 int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev);
1417 struct mlx5_ib_mr *mr, int flags);
1419 int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
1421 u32 flags, struct ib_sge *sg_list, u32 num_sge);
1422 int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr);
1423 int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr);
1425 static inline int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev) { return 0; } in mlx5_ib_odp_init_one()
1426 static inline int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, in mlx5r_odp_create_eq()
1427 struct mlx5_ib_pf_eq *eq) in mlx5r_odp_create_eq()
1431 static inline void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev) {} in mlx5_ib_odp_cleanup_one()
1434 static inline int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev) in mlx5_odp_init_mkey_cache()
1439 struct mlx5_ib_mr *mr, int flags) {} in mlx5_odp_populate_xlt()
1442 mlx5_ib_advise_mr_prefetch(struct ib_pd *pd, in mlx5_ib_advise_mr_prefetch()
1444 struct ib_sge *sg_list, u32 num_sge) in mlx5_ib_advise_mr_prefetch()
1448 static inline int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_odp_mr()
1452 static inline int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_dmabuf_mr()
1458 extern const struct mmu_interval_notifier_ops mlx5_mn_ops;
1461 void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
1462 const struct mlx5_ib_profile *profile,
1464 int __mlx5_ib_add(struct mlx5_ib_dev *dev,
1465 const struct mlx5_ib_profile *profile);
1467 int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
1468 u32 port, struct ifla_vf_info *info);
1469 int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
1471 int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
1472 u32 port, struct ifla_vf_stats *stats);
1473 int mlx5_ib_get_vf_guid(struct ib_device *device, int vf, u32 port,
1474 struct ifla_vf_guid *node_guid,
1475 struct ifla_vf_guid *port_guid);
1476 int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u32 port,
1479 __be16 mlx5_get_roce_udp_sport_min(const struct mlx5_ib_dev *dev,
1480 const struct ib_gid_attr *attr);
1482 void mlx5_ib_cleanup_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1483 void mlx5_ib_init_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1486 int mlx5_ib_create_gsi(struct ib_pd *pd, struct mlx5_ib_qp *mqp,
1487 struct ib_qp_init_attr *attr);
1488 int mlx5_ib_destroy_gsi(struct mlx5_ib_qp *mqp);
1489 int mlx5_ib_gsi_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
1491 int mlx5_ib_gsi_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
1493 struct ib_qp_init_attr *qp_init_attr);
1494 int mlx5_ib_gsi_post_send(struct ib_qp *qp, const struct ib_send_wr *wr,
1495 const struct ib_send_wr **bad_wr);
1496 int mlx5_ib_gsi_post_recv(struct ib_qp *qp, const struct ib_recv_wr *wr,
1497 const struct ib_recv_wr **bad_wr);
1498 void mlx5_ib_gsi_pkey_change(struct mlx5_ib_gsi_qp *gsi);
1500 int mlx5_ib_generate_wc(struct ib_cq *ibcq, struct ib_wc *wc);
1502 void mlx5_ib_free_bfreg(struct mlx5_ib_dev *dev, struct mlx5_bfreg_info *bfregi,
1504 struct mlx5_ib_dev *mlx5_ib_get_ibdev_from_mpi(struct mlx5_ib_multiport_info *mpi);
1505 struct mlx5_core_dev *mlx5_ib_get_native_port_mdev(struct mlx5_ib_dev *dev,
1508 void mlx5_ib_put_native_port_mdev(struct mlx5_ib_dev *dev,
1511 extern const struct uapi_definition mlx5_ib_devx_defs[];
1512 extern const struct uapi_definition mlx5_ib_flow_defs[];
1513 extern const struct uapi_definition mlx5_ib_qos_defs[];
1514 extern const struct uapi_definition mlx5_ib_std_types_defs[];
1546 static inline int get_qp_user_index(struct mlx5_ib_ucontext *ucontext, in get_qp_user_index()
1547 struct mlx5_ib_create_qp *ucmd, in get_qp_user_index()
1563 static inline int get_srq_user_index(struct mlx5_ib_ucontext *ucontext, in get_srq_user_index()
1564 struct mlx5_ib_create_srq *ucmd, in get_srq_user_index()
1580 static inline int get_uars_per_sys_page(struct mlx5_ib_dev *dev, bool lib_support) in get_uars_per_sys_page()
1588 int bfregn_to_uar_index(struct mlx5_ib_dev *dev,
1589 struct mlx5_bfreg_info *bfregi, u32 bfregn,
1592 static inline int mlx5r_store_odp_mkey(struct mlx5_ib_dev *dev, in mlx5r_store_odp_mkey()
1593 struct mlx5_ib_mkey *mmkey) in mlx5r_store_odp_mkey()
1602 static inline void mlx5r_deref_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_odp_mkey()
1609 static inline void mlx5r_deref_wait_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_wait_odp_mkey()
1615 int mlx5_ib_test_wc(struct mlx5_ib_dev *dev);
1617 static inline bool mlx5_ib_lag_should_assign_affinity(struct mlx5_ib_dev *dev) in mlx5_ib_lag_should_assign_affinity()
1672 static inline bool mlx5_umem_needs_ats(struct mlx5_ib_dev *dev, in mlx5_umem_needs_ats()
1673 struct ib_umem *umem, int access_flags) in mlx5_umem_needs_ats()
1680 int set_roce_addr(struct mlx5_ib_dev *dev, u32 port_num,
1682 const struct ib_gid_attr *attr);