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;
531 struct list_head qps_list;
532 struct list_head cq_recv_list;
533 struct list_head cq_send_list;
534 struct mlx5_rate_limit rl;
549 struct mlx5_ib_cq_buf {
550 struct mlx5_frag_buf_ctrl fbc;
551 struct mlx5_frag_buf frag_buf;
552 struct ib_umem *umem;
562 struct mlx5_ib_cq {
563 struct ib_cq ibcq;
564 struct mlx5_core_cq mcq;
565 struct mlx5_ib_cq_buf buf;
566 struct mlx5_db db;
574 struct mutex resize_mutex;
575 struct mlx5_ib_cq_buf *resize_buf;
576 struct ib_umem *resize_umem;
578 struct list_head list_send_qp;
579 struct list_head list_recv_qp;
581 struct list_head wc_list;
583 struct work_struct notify_work;
587 struct mlx5_ib_wc {
588 struct ib_wc wc;
589 struct list_head list;
592 struct mlx5_ib_srq {
593 struct ib_srq ibsrq;
594 struct mlx5_core_srq msrq;
595 struct mlx5_frag_buf buf;
596 struct mlx5_db db;
597 struct mlx5_frag_buf_ctrl fbc;
605 struct ib_umem *umem;
608 struct mutex mutex;
612 struct mlx5_ib_xrcd {
613 struct ib_xrcd ibxrcd;
622 struct mlx5_user_mmap_entry {
623 struct rdma_user_mmap_entry rdma_entry;
637 struct mlx5r_cache_rb_key {
644 struct mlx5_ib_mkey {
648 struct wait_queue_head wait;
651 struct mlx5r_cache_rb_key rb_key;
652 struct mlx5_cache_ent *cache_ent;
678 struct mlx5_ib_mr {
679 struct ib_mr ibmr;
680 struct mlx5_ib_mkey mmkey;
682 struct ib_umem *umem;
688 struct {
697 struct mlx5_core_sig_ctx *sig;
698 struct mlx5_ib_mr *pi_mr;
699 struct mlx5_ib_mr *klm_mr;
700 struct mlx5_ib_mr *mtt_mr;
709 struct {
715 struct mlx5_ib_mr *parent;
716 struct xarray implicit_children;
718 struct work_struct work;
720 struct ib_odp_counters odp_stats;
723 struct mlx5_ib_mr *dd_crossed_mr;
724 struct list_head dd_node;
726 struct mlx5_ib_mkey null_mmkey;
731 static inline bool is_odp_mr(struct mlx5_ib_mr *mr) in is_odp_mr()
737 static inline bool is_dmabuf_mr(struct mlx5_ib_mr *mr) in is_dmabuf_mr()
743 struct mlx5_ib_mw {
744 struct ib_mw ibmw;
745 struct mlx5_ib_mkey mmkey;
748 struct mlx5_ib_umr_context {
749 struct ib_cqe cqe;
751 struct completion done;
761 struct umr_common {
762 struct ib_pd *pd;
763 struct ib_cq *cq;
764 struct ib_qp *qp;
767 struct semaphore sem;
770 struct mutex lock;
773 struct mutex init_lock;
777 ((PAGE_SIZE - sizeof(struct list_head)) / sizeof(u32))
779 struct mlx5_mkeys_page {
781 struct list_head list;
783 static_assert(sizeof(struct mlx5_mkeys_page) == PAGE_SIZE);
785 struct mlx5_mkeys_queue {
786 struct list_head pages_list;
792 struct mlx5_cache_ent {
793 struct mlx5_mkeys_queue mkeys_queue;
798 struct rb_node node;
799 struct mlx5r_cache_rb_key rb_key;
816 struct mlx5_ib_dev *dev;
817 struct delayed_work dwork;
820 struct mlx5r_async_create_mkey {
825 struct mlx5_async_work cb_work;
826 struct mlx5_cache_ent *ent;
830 struct mlx5_mkey_cache {
831 struct workqueue_struct *wq;
832 struct rb_root rb_root;
833 struct mutex rb_lock;
834 struct dentry *fs_root;
838 struct mlx5_ib_port_resources {
839 struct mlx5_ib_gsi_qp *gsi;
840 struct work_struct pkey_change_work;
843 struct mlx5_data_direct_resources {
848 struct mlx5_ib_resources {
849 struct ib_cq *c0;
850 struct mutex cq_lock;
853 struct ib_pd *p0;
854 struct ib_srq *s0;
855 struct ib_srq *s1;
856 struct mutex srq_lock;
857 struct mlx5_ib_port_resources ports[2];
862 struct mlx5_ib_op_fc {
863 struct mlx5_fc *fc;
864 struct mlx5_flow_handle *rule[MAX_OPFC_RULES];
867 struct mlx5_ib_counters {
868 struct rdma_stat_desc *descs;
875 struct mlx5_ib_op_fc opfcs[MLX5_IB_OPCOUNTER_MAX];
878 int mlx5_ib_fs_add_op_fc(struct mlx5_ib_dev *dev, u32 port_num,
879 struct mlx5_ib_op_fc *opfc,
882 void mlx5_ib_fs_remove_op_fc(struct mlx5_ib_dev *dev,
883 struct mlx5_ib_op_fc *opfc,
886 struct mlx5_ib_multiport_info;
888 struct mlx5_ib_multiport {
889 struct mlx5_ib_multiport_info *mpi;
894 struct mlx5_roce {
898 struct notifier_block nb;
899 struct netdev_net_notifier nn;
900 struct notifier_block mdev_nb;
901 struct net_device *tracking_netdev;
904 struct mlx5_ib_dev *dev;
908 struct mlx5_ib_port {
909 struct mlx5_ib_counters cnts;
910 struct mlx5_ib_multiport mp;
911 struct mlx5_ib_dbg_cc_params *dbg_cc_params;
912 struct mlx5_roce roce;
913 struct mlx5_eswitch_rep *rep;
915 struct mlx5_reserved_gids *reserved_gids;
919 struct mlx5_ib_dbg_param {
921 struct mlx5_ib_dev *dev;
922 struct dentry *dentry;
952 struct mlx5_ib_dbg_cc_params {
953 struct dentry *root;
954 struct mlx5_ib_dbg_param params[MLX5_IB_DBG_CC_MAX];
961 struct mlx5_ib_delay_drop {
962 struct mlx5_ib_dev *dev;
963 struct work_struct delay_drop_work;
965 struct mutex lock;
970 struct dentry *dir_debugfs;
997 struct mlx5_ib_stage {
998 int (*init)(struct mlx5_ib_dev *dev);
999 void (*cleanup)(struct mlx5_ib_dev *dev);
1005 struct mlx5_ib_profile {
1006 struct mlx5_ib_stage stage[MLX5_IB_STAGE_MAX];
1009 struct mlx5_ib_multiport_info {
1010 struct list_head list;
1011 struct mlx5_ib_dev *ibdev;
1012 struct mlx5_core_dev *mdev;
1013 struct notifier_block mdev_events;
1014 struct completion unref_comp;
1021 struct mlx5_ib_flow_action {
1022 struct ib_flow_action ib_action;
1024 struct {
1026 struct mlx5_accel_esp_xfrm *ctx;
1028 struct {
1029 struct mlx5_ib_dev *dev;
1032 struct mlx5_modify_hdr *modify_hdr;
1033 struct mlx5_pkt_reformat *pkt_reformat;
1039 struct mlx5_dm {
1040 struct mlx5_core_dev *dev;
1049 struct mlx5_read_counters_attr {
1050 struct mlx5_fc *hw_cntrs_hndl;
1059 struct mlx5_ib_mcounters {
1060 struct ib_counters ibcntrs;
1064 struct mlx5_fc *hw_cntrs_hndl;
1066 int (*read_counters)(struct ib_device *ibdev,
1067 struct mlx5_read_counters_attr *read_attr);
1073 struct mlx5_ib_flow_counters_desc *counters_data;
1075 struct mutex mcntrs_mutex;
1078 static inline struct mlx5_ib_mcounters *
1079 to_mcounters(struct ib_counters *ibcntrs) in to_mcounters()
1081 return container_of(ibcntrs, struct mlx5_ib_mcounters, ibcntrs); in to_mcounters()
1084 int parse_flow_flow_action(struct mlx5_ib_flow_action *maction,
1086 struct mlx5_flow_act *action);
1087 struct mlx5_ib_lb_state {
1089 struct mutex mutex;
1095 struct mlx5_ib_pf_eq {
1096 struct notifier_block irq_nb;
1097 struct mlx5_ib_dev *dev;
1098 struct mlx5_eq *core;
1099 struct work_struct work;
1101 struct workqueue_struct *wq;
1105 struct mlx5_devx_event_table {
1106 struct mlx5_nb devx_nb;
1108 struct mutex event_xa_lock;
1109 struct xarray event_xa;
1112 struct mlx5_var_table {
1114 struct mutex bitmap_lock;
1121 struct mlx5_port_caps {
1127 struct mlx5_special_mkeys {
1133 struct mlx5_macsec {
1134 struct mutex lock; /* Protects mlx5_macsec internal contexts */
1135 struct list_head macsec_devices_list;
1136 struct notifier_block blocking_events_nb;
1139 struct mlx5_ib_dev {
1140 struct ib_device ib_dev;
1141 struct mlx5_core_dev *mdev;
1142 struct mlx5_data_direct_dev *data_direct_dev;
1144 struct mutex data_direct_lock;
1145 struct notifier_block mdev_events;
1146 struct notifier_block lag_events;
1150 struct mutex cap_mask_mutex;
1155 struct umr_common umrc;
1158 struct mlx5_ib_resources devr;
1161 struct mlx5_mkey_cache cache;
1162 struct timer_list delay_timer;
1164 struct mutex slow_path_mutex;
1165 struct ib_odp_caps odp_caps;
1167 struct mutex odp_eq_mutex;
1168 struct mlx5_ib_pf_eq odp_pf_eq;
1170 struct xarray odp_mkeys;
1172 struct mlx5_ib_flow_db *flow_db;
1175 struct list_head qp_list;
1176 struct list_head data_direct_mr_list;
1178 struct mlx5_ib_port *port;
1179 struct mlx5_sq_bfreg bfreg;
1180 struct mlx5_sq_bfreg fp_bfreg;
1181 struct mlx5_ib_delay_drop delay_drop;
1182 const struct mlx5_ib_profile *profile;
1184 struct mlx5_ib_lb_state lb;
1186 struct list_head ib_dev_list;
1188 struct mlx5_dm dm;
1190 struct mlx5_srq_table srq_table;
1191 struct mlx5_qp_table qp_table;
1192 struct mlx5_async_ctx async_ctx;
1193 struct mlx5_devx_event_table devx_event_table;
1194 struct mlx5_var_table var_table;
1196 struct xarray sig_mrs;
1197 struct mlx5_port_caps port_caps[MLX5_MAX_PORTS];
1200 struct mlx5_special_mkeys mkeys;
1201 struct mlx5_data_direct_resources ddr;
1204 struct mlx5_macsec macsec;
1208 struct mlx5_ib_dev *smi_dev;
1212 static inline struct mlx5_ib_cq *to_mibcq(struct mlx5_core_cq *mcq) in to_mibcq()
1214 return container_of(mcq, struct mlx5_ib_cq, mcq); in to_mibcq()
1217 static inline struct mlx5_ib_xrcd *to_mxrcd(struct ib_xrcd *ibxrcd) in to_mxrcd()
1219 return container_of(ibxrcd, struct mlx5_ib_xrcd, ibxrcd); in to_mxrcd()
1222 static inline struct mlx5_ib_dev *to_mdev(struct ib_device *ibdev) in to_mdev()
1224 return container_of(ibdev, struct mlx5_ib_dev, ib_dev); in to_mdev()
1227 static inline struct mlx5_ib_dev *mr_to_mdev(struct mlx5_ib_mr *mr) in mr_to_mdev()
1232 static inline struct mlx5_ib_dev *mlx5_udata_to_mdev(struct ib_udata *udata) in mlx5_udata_to_mdev()
1234 struct mlx5_ib_ucontext *context = rdma_udata_to_drv_context( in mlx5_udata_to_mdev()
1235 udata, struct mlx5_ib_ucontext, ibucontext); in mlx5_udata_to_mdev()
1240 static inline struct mlx5_ib_cq *to_mcq(struct ib_cq *ibcq) in to_mcq()
1242 return container_of(ibcq, struct mlx5_ib_cq, ibcq); in to_mcq()
1245 static inline struct mlx5_ib_qp *to_mibqp(struct mlx5_core_qp *mqp) in to_mibqp()
1247 return container_of(mqp, struct mlx5_ib_qp_base, mqp)->container_mibqp; in to_mibqp()
1250 static inline struct mlx5_ib_rwq *to_mibrwq(struct mlx5_core_qp *core_qp) in to_mibrwq()
1252 return container_of(core_qp, struct mlx5_ib_rwq, core_qp); in to_mibrwq()
1255 static inline struct mlx5_ib_pd *to_mpd(struct ib_pd *ibpd) in to_mpd()
1257 return container_of(ibpd, struct mlx5_ib_pd, ibpd); in to_mpd()
1260 static inline struct mlx5_ib_srq *to_msrq(struct ib_srq *ibsrq) in to_msrq()
1262 return container_of(ibsrq, struct mlx5_ib_srq, ibsrq); in to_msrq()
1265 static inline struct mlx5_ib_qp *to_mqp(struct ib_qp *ibqp) in to_mqp()
1267 return container_of(ibqp, struct mlx5_ib_qp, ibqp); in to_mqp()
1270 static inline struct mlx5_ib_rwq *to_mrwq(struct ib_wq *ibwq) in to_mrwq()
1272 return container_of(ibwq, struct mlx5_ib_rwq, ibwq); in to_mrwq()
1275 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()
1277 return container_of(ib_rwq_ind_tbl, struct mlx5_ib_rwq_ind_table, ib_rwq_ind_tbl); in to_mrwq_ind_table()
1280 static inline struct mlx5_ib_srq *to_mibsrq(struct mlx5_core_srq *msrq) in to_mibsrq()
1282 return container_of(msrq, struct mlx5_ib_srq, msrq); in to_mibsrq()
1285 static inline struct mlx5_ib_mr *to_mmr(struct ib_mr *ibmr) in to_mmr()
1287 return container_of(ibmr, struct mlx5_ib_mr, ibmr); in to_mmr()
1290 static inline struct mlx5_ib_mw *to_mmw(struct ib_mw *ibmw) in to_mmw()
1292 return container_of(ibmw, struct mlx5_ib_mw, ibmw); in to_mmw()
1295 static inline struct mlx5_ib_flow_action *
1296 to_mflow_act(struct ib_flow_action *ibact) in to_mflow_act()
1298 return container_of(ibact, struct mlx5_ib_flow_action, ib_action); in to_mflow_act()
1301 static inline struct mlx5_user_mmap_entry *
1302 to_mmmap(struct rdma_user_mmap_entry *rdma_entry) in to_mmmap()
1305 struct mlx5_user_mmap_entry, rdma_entry); in to_mmmap()
1308 int mlx5_ib_dev_res_cq_init(struct mlx5_ib_dev *dev);
1309 int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev);
1310 int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context, unsigned long virt,
1311 struct mlx5_db *db);
1312 void mlx5_ib_db_unmap_user(struct mlx5_ib_ucontext *context, struct mlx5_db *db);
1313 void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1314 void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
1315 void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int wqe_index);
1316 int mlx5_ib_create_ah(struct ib_ah *ah, struct rdma_ah_init_attr *init_attr,
1317 struct ib_udata *udata);
1318 int mlx5_ib_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
1319 static inline int mlx5_ib_destroy_ah(struct ib_ah *ah, u32 flags) in mlx5_ib_destroy_ah()
1323 int mlx5_ib_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
1324 struct ib_udata *udata);
1325 int mlx5_ib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
1326 enum ib_srq_attr_mask attr_mask, struct ib_udata *udata);
1327 int mlx5_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr);
1328 int mlx5_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
1329 int mlx5_ib_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
1330 const struct ib_recv_wr **bad_wr);
1331 int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1332 void mlx5_ib_disable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
1333 int mlx5_ib_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *init_attr,
1334 struct ib_udata *udata);
1335 int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1336 int attr_mask, struct ib_udata *udata);
1337 int mlx5_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask,
1338 struct ib_qp_init_attr *qp_init_attr);
1339 int mlx5_ib_destroy_qp(struct ib_qp *qp, struct ib_udata *udata);
1340 void mlx5_ib_drain_sq(struct ib_qp *qp);
1341 void mlx5_ib_drain_rq(struct ib_qp *qp);
1342 int mlx5_ib_read_wqe_sq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1344 int mlx5_ib_read_wqe_rq(struct mlx5_ib_qp *qp, int wqe_index, void *buffer,
1346 int mlx5_ib_read_wqe_srq(struct mlx5_ib_srq *srq, int wqe_index, void *buffer,
1348 int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
1349 struct uverbs_attr_bundle *attrs);
1350 int mlx5_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata);
1351 int mlx5_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
1352 int mlx5_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags);
1353 int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
1354 int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata);
1355 struct ib_mr *mlx5_ib_get_dma_mr(struct ib_pd *pd, int acc);
1356 struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
1358 struct ib_udata *udata);
1359 struct ib_mr *mlx5_ib_reg_user_mr_dmabuf(struct ib_pd *pd, u64 start,
1362 struct uverbs_attr_bundle *attrs);
1363 int mlx5_ib_advise_mr(struct ib_pd *pd,
1366 struct ib_sge *sg_list,
1368 struct uverbs_attr_bundle *attrs);
1369 int mlx5_ib_alloc_mw(struct ib_mw *mw, struct ib_udata *udata);
1370 int mlx5_ib_dealloc_mw(struct ib_mw *mw);
1371 struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
1373 void mlx5_ib_free_odp_mr(struct mlx5_ib_mr *mr);
1374 struct ib_mr *mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
1376 struct ib_pd *pd, struct ib_udata *udata);
1377 int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata);
1378 struct ib_mr *mlx5_ib_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
1380 struct ib_mr *mlx5_ib_alloc_mr_integrity(struct ib_pd *pd,
1383 int mlx5_ib_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
1385 int mlx5_ib_map_mr_sg_pi(struct ib_mr *ibmr, struct scatterlist *data_sg,
1387 struct scatterlist *meta_sg, int meta_sg_nents,
1389 int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num,
1390 const struct ib_wc *in_wc, const struct ib_grh *in_grh,
1391 const struct ib_mad *in, struct ib_mad *out,
1393 int mlx5_ib_alloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1394 int mlx5_ib_dealloc_xrcd(struct ib_xrcd *xrcd, struct ib_udata *udata);
1395 int mlx5_query_ext_port_caps(struct mlx5_ib_dev *dev, unsigned int port);
1396 int mlx5_query_mad_ifc_system_image_guid(struct ib_device *ibdev,
1398 int mlx5_query_mad_ifc_max_pkeys(struct ib_device *ibdev,
1400 int mlx5_query_mad_ifc_vendor_id(struct ib_device *ibdev,
1402 int mlx5_query_mad_ifc_node_desc(struct mlx5_ib_dev *dev, char *node_desc);
1403 int mlx5_query_mad_ifc_node_guid(struct mlx5_ib_dev *dev, __be64 *node_guid);
1404 int mlx5_query_mad_ifc_pkey(struct ib_device *ibdev, u32 port, u16 index,
1406 int mlx5_query_mad_ifc_gids(struct ib_device *ibdev, u32 port, int index,
1408 int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port,
1409 struct ib_port_attr *props);
1410 int mlx5_ib_query_port(struct ib_device *ibdev, u32 port,
1411 struct ib_port_attr *props);
1412 void mlx5_ib_populate_pas(struct ib_umem *umem, size_t page_size, __be64 *pas,
1414 int mlx5_ib_get_cqe_size(struct ib_cq *ibcq);
1415 int mlx5_mkey_cache_init(struct mlx5_ib_dev *dev);
1416 void mlx5_mkey_cache_cleanup(struct mlx5_ib_dev *dev);
1417 struct mlx5_cache_ent *
1418 mlx5r_cache_create_ent_locked(struct mlx5_ib_dev *dev,
1419 struct mlx5r_cache_rb_key rb_key,
1422 struct mlx5_ib_mr *mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev,
1426 int mlx5_ib_check_mr_status(struct ib_mr *ibmr, u32 check_mask,
1427 struct ib_mr_status *mr_status);
1428 struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
1429 struct ib_wq_init_attr *init_attr,
1430 struct ib_udata *udata);
1431 int mlx5_ib_destroy_wq(struct ib_wq *wq, struct ib_udata *udata);
1432 int mlx5_ib_modify_wq(struct ib_wq *wq, struct ib_wq_attr *wq_attr,
1433 u32 wq_attr_mask, struct ib_udata *udata);
1434 int mlx5_ib_create_rwq_ind_table(struct ib_rwq_ind_table *ib_rwq_ind_table,
1435 struct ib_rwq_ind_table_init_attr *init_attr,
1436 struct ib_udata *udata);
1437 int mlx5_ib_destroy_rwq_ind_table(struct ib_rwq_ind_table *wq_ind_table);
1438 struct ib_mr *mlx5_ib_reg_dm_mr(struct ib_pd *pd, struct ib_dm *dm,
1439 struct ib_dm_mr_attr *attr,
1440 struct uverbs_attr_bundle *attrs);
1441 void mlx5_ib_data_direct_bind(struct mlx5_ib_dev *ibdev,
1442 struct mlx5_data_direct_dev *dev);
1443 void mlx5_ib_data_direct_unbind(struct mlx5_ib_dev *ibdev);
1444 void mlx5_ib_revoke_data_direct_mrs(struct mlx5_ib_dev *dev);
1447 int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev);
1448 int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq);
1449 void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev);
1452 int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev);
1454 struct mlx5_ib_mr *mr, int flags);
1456 int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
1458 u32 flags, struct ib_sge *sg_list, u32 num_sge);
1459 int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr);
1460 int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr);
1462 static inline int mlx5_ib_odp_init_one(struct mlx5_ib_dev *ibdev) { return 0; } in mlx5_ib_odp_init_one()
1463 static inline int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, in mlx5r_odp_create_eq()
1464 struct mlx5_ib_pf_eq *eq) in mlx5r_odp_create_eq()
1468 static inline void mlx5_ib_odp_cleanup_one(struct mlx5_ib_dev *ibdev) {} in mlx5_ib_odp_cleanup_one()
1471 static inline int mlx5_odp_init_mkey_cache(struct mlx5_ib_dev *dev) in mlx5_odp_init_mkey_cache()
1476 struct mlx5_ib_mr *mr, int flags) {} in mlx5_odp_populate_xlt()
1479 mlx5_ib_advise_mr_prefetch(struct ib_pd *pd, in mlx5_ib_advise_mr_prefetch()
1481 struct ib_sge *sg_list, u32 num_sge) in mlx5_ib_advise_mr_prefetch()
1485 static inline int mlx5_ib_init_odp_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_odp_mr()
1489 static inline int mlx5_ib_init_dmabuf_mr(struct mlx5_ib_mr *mr) in mlx5_ib_init_dmabuf_mr()
1495 extern const struct mmu_interval_notifier_ops mlx5_mn_ops;
1498 void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
1499 const struct mlx5_ib_profile *profile,
1501 int __mlx5_ib_add(struct mlx5_ib_dev *dev,
1502 const struct mlx5_ib_profile *profile);
1504 int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
1505 u32 port, struct ifla_vf_info *info);
1506 int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
1508 int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
1509 u32 port, struct ifla_vf_stats *stats);
1510 int mlx5_ib_get_vf_guid(struct ib_device *device, int vf, u32 port,
1511 struct ifla_vf_guid *node_guid,
1512 struct ifla_vf_guid *port_guid);
1513 int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u32 port,
1516 __be16 mlx5_get_roce_udp_sport_min(const struct mlx5_ib_dev *dev,
1517 const struct ib_gid_attr *attr);
1519 void mlx5_ib_cleanup_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1520 void mlx5_ib_init_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num);
1523 int mlx5_ib_create_gsi(struct ib_pd *pd, struct mlx5_ib_qp *mqp,
1524 struct ib_qp_init_attr *attr);
1525 int mlx5_ib_destroy_gsi(struct mlx5_ib_qp *mqp);
1526 int mlx5_ib_gsi_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
1528 int mlx5_ib_gsi_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
1530 struct ib_qp_init_attr *qp_init_attr);
1531 int mlx5_ib_gsi_post_send(struct ib_qp *qp, const struct ib_send_wr *wr,
1532 const struct ib_send_wr **bad_wr);
1533 int mlx5_ib_gsi_post_recv(struct ib_qp *qp, const struct ib_recv_wr *wr,
1534 const struct ib_recv_wr **bad_wr);
1535 void mlx5_ib_gsi_pkey_change(struct mlx5_ib_gsi_qp *gsi);
1537 int mlx5_ib_generate_wc(struct ib_cq *ibcq, struct ib_wc *wc);
1539 void mlx5_ib_free_bfreg(struct mlx5_ib_dev *dev, struct mlx5_bfreg_info *bfregi,
1541 struct mlx5_ib_dev *mlx5_ib_get_ibdev_from_mpi(struct mlx5_ib_multiport_info *mpi);
1542 struct mlx5_core_dev *mlx5_ib_get_native_port_mdev(struct mlx5_ib_dev *dev,
1545 void mlx5_ib_put_native_port_mdev(struct mlx5_ib_dev *dev,
1548 extern const struct uapi_definition mlx5_ib_devx_defs[];
1549 extern const struct uapi_definition mlx5_ib_flow_defs[];
1550 extern const struct uapi_definition mlx5_ib_qos_defs[];
1551 extern const struct uapi_definition mlx5_ib_std_types_defs[];
1552 extern const struct uapi_definition mlx5_ib_create_cq_defs[];
1584 static inline int get_qp_user_index(struct mlx5_ib_ucontext *ucontext, in get_qp_user_index()
1585 struct mlx5_ib_create_qp *ucmd, in get_qp_user_index()
1601 static inline int get_srq_user_index(struct mlx5_ib_ucontext *ucontext, in get_srq_user_index()
1602 struct mlx5_ib_create_srq *ucmd, in get_srq_user_index()
1618 static inline int get_uars_per_sys_page(struct mlx5_ib_dev *dev, bool lib_support) in get_uars_per_sys_page()
1626 int bfregn_to_uar_index(struct mlx5_ib_dev *dev,
1627 struct mlx5_bfreg_info *bfregi, u32 bfregn,
1630 static inline int mlx5r_store_odp_mkey(struct mlx5_ib_dev *dev, in mlx5r_store_odp_mkey()
1631 struct mlx5_ib_mkey *mmkey) in mlx5r_store_odp_mkey()
1640 static inline void mlx5r_deref_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_odp_mkey()
1647 static inline void mlx5r_deref_wait_odp_mkey(struct mlx5_ib_mkey *mmkey) in mlx5r_deref_wait_odp_mkey()
1653 static inline bool mlx5_ib_lag_should_assign_affinity(struct mlx5_ib_dev *dev) in mlx5_ib_lag_should_assign_affinity()
1708 static inline bool mlx5_umem_needs_ats(struct mlx5_ib_dev *dev, in mlx5_umem_needs_ats()
1709 struct ib_umem *umem, int access_flags) in mlx5_umem_needs_ats()
1716 int set_roce_addr(struct mlx5_ib_dev *dev, u32 port_num,
1718 const struct ib_gid_attr *attr);
1720 static inline u32 smi_to_native_portnum(struct mlx5_ib_dev *dev, u32 port) in smi_to_native_portnum()
1730 mlx5_umem_mkc_find_best_pgsz(struct mlx5_ib_dev *dev, struct ib_umem *umem, in mlx5_umem_mkc_find_best_pgsz()