Home
last modified time | relevance | path

Searched refs:mdev (Results 1 – 25 of 71) sorted by relevance

123

/freebsd-11-stable/sys/dev/mthca/
HDmthca_main.c137 static int mthca_tune_pci(struct mthca_dev *mdev) in mthca_tune_pci() argument
143 if (pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX)) { in mthca_tune_pci()
144 if (pcix_set_mmrbc(mdev->pdev, pcix_get_max_mmrbc(mdev->pdev))) { in mthca_tune_pci()
145 mthca_err(mdev, "Couldn't set PCI-X max read count, " in mthca_tune_pci()
149 } else if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) in mthca_tune_pci()
150 mthca_info(mdev, "No PCI-X capability, not setting RBC.\n"); in mthca_tune_pci()
152 if (pci_is_pcie(mdev->pdev)) { in mthca_tune_pci()
153 if (pcie_set_readrq(mdev->pdev, 4096)) { in mthca_tune_pci()
154 mthca_err(mdev, "Couldn't write PCI Express read request, " in mthca_tune_pci()
158 } else if (mdev->mthca_flags & MTHCA_FLAG_PCIE) in mthca_tune_pci()
[all …]
HDmthca_reset.c41 int mthca_reset(struct mthca_dev *mdev) in mthca_reset() argument
73 if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) { in mthca_reset()
77 while ((bridge = pci_get_device(mdev->pdev->vendor, in mthca_reset()
78 mdev->pdev->device + 2, in mthca_reset()
81 bridge->subordinate == mdev->pdev->bus) { in mthca_reset()
82 mthca_dbg(mdev, "Found bridge: %s\n", in mthca_reset()
94 mthca_warn(mdev, "No bridge found for %s\n", in mthca_reset()
95 pci_name(mdev->pdev)); in mthca_reset()
98 mthca_warn(mdev, "Reset on PCI-X is not supported.\n"); in mthca_reset()
108 mthca_err(mdev, "Couldn't allocate memory to save HCA " in mthca_reset()
[all …]
/freebsd-11-stable/sys/dev/mlx4/mlx4_en/
HDmlx4_en_main.c75 static int mlx4_en_get_profile(struct mlx4_en_dev *mdev) in mlx4_en_get_profile() argument
77 struct mlx4_en_profile *params = &mdev->profile; in mlx4_en_get_profile()
83 if (params->udp_rss && !(mdev->dev->caps.flags in mlx4_en_get_profile()
85 mlx4_warn(mdev, "UDP RSS is not supported on this device.\n"); in mlx4_en_get_profile()
114 struct mlx4_en_dev *mdev = (struct mlx4_en_dev *) endev_ptr; in mlx4_en_event() local
120 if (!mdev->pndev[port]) in mlx4_en_event()
122 priv = netdev_priv(mdev->pndev[port]); in mlx4_en_event()
126 queue_work(mdev->workqueue, &priv->linkstate_task); in mlx4_en_event()
130 mlx4_err(mdev, "Internal error detected, restarting device\n"); in mlx4_en_event()
138 !mdev->pndev[port]) in mlx4_en_event()
[all …]
HDmlx4_en_cq.c57 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_create_cq() local
71 cq->buf_size = cq->size * mdev->dev->caps.cqe_size; in mlx4_en_create_cq()
88 cq->vector = mdev->dev->caps.num_comp_vectors; in mlx4_en_create_cq()
91 err = mlx4_alloc_hwq_res(mdev->dev, &cq->wqres, in mlx4_en_create_cq()
106 mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size); in mlx4_en_create_cq()
116 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_activate_cq() local
121 cq->dev = mdev->pndev[priv->port]; in mlx4_en_activate_cq()
129 if (!mlx4_is_eq_vector_valid(mdev->dev, priv->port, in mlx4_en_activate_cq()
131 cq->vector = cq_idx % mdev->dev->caps.num_comp_vectors; in mlx4_en_activate_cq()
133 err = mlx4_assign_eq(mdev->dev, priv->port, in mlx4_en_activate_cq()
[all …]
HDmlx4_en_netdev.c185 rc = mlx4_flow_detach(priv->mdev->dev, filter->reg_id); in mlx4_en_filter_work()
190 rc = mlx4_flow_attach(priv->mdev->dev, &rule, &filter->reg_id); in mlx4_en_filter_work()
256 rc = mlx4_flow_detach(priv->mdev->dev, filter->reg_id); in mlx4_en_filter_free()
338 queue_work(priv->mdev->workqueue, &filter->work); in mlx4_en_filter_rfs()
403 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_vlan_rx_add_vid() local
415 mutex_lock(&mdev->state_lock); in mlx4_en_vlan_rx_add_vid()
416 if (mdev->device_up && priv->port_up) { in mlx4_en_vlan_rx_add_vid()
417 err = mlx4_SET_VLAN_FLTR(mdev->dev, priv); in mlx4_en_vlan_rx_add_vid()
421 if (mlx4_register_vlan(mdev->dev, priv->port, vid, &idx)) in mlx4_en_vlan_rx_add_vid()
423 mutex_unlock(&mdev->state_lock); in mlx4_en_vlan_rx_add_vid()
[all …]
HDmlx4_en_rx.c58 rx_desc->data[0].lkey = cpu_to_be32(priv->mdev->mr.key); in mlx4_en_init_rx_desc()
321 void mlx4_en_set_num_rx_rings(struct mlx4_en_dev *mdev) in mlx4_en_set_num_rx_rings() argument
326 struct mlx4_dev *dev = mdev->dev; in mlx4_en_set_num_rx_rings()
331 mlx4_get_eqs_per_port(mdev->dev, i), in mlx4_en_set_num_rx_rings()
336 mdev->profile.prof[i].rx_ring_num = in mlx4_en_set_num_rx_rings()
369 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_create_rx_ring() local
383 bus_get_dma_tag(mdev->pdev->dev.bsddev), in mlx4_en_create_rx_ring()
432 err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, in mlx4_en_create_rx_ring()
447 mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); in mlx4_en_create_rx_ring()
501 ring->rx_mr_key_be = cpu_to_be32(priv->mdev->mr.key); in mlx4_en_activate_rx_rings()
[all …]
/freebsd-11-stable/sys/dev/mlx5/mlx5_core/
HDmlx5_fwdump.c54 mlx5_fwdump_destroy_dd(struct mlx5_core_dev *mdev) in mlx5_fwdump_destroy_dd() argument
57 mtx_assert(&mdev->dump_lock, MA_OWNED); in mlx5_fwdump_destroy_dd()
58 free(mdev->dump_data, M_MLX5_DUMP); in mlx5_fwdump_destroy_dd()
59 mdev->dump_data = NULL; in mlx5_fwdump_destroy_dd()
63 mlx5_fwdump_prep(struct mlx5_core_dev *mdev) in mlx5_fwdump_prep() argument
70 mdev->dump_data = NULL; in mlx5_fwdump_prep()
71 error = mlx5_vsc_find_cap(mdev); in mlx5_fwdump_prep()
74 mlx5_core_warn(mdev, in mlx5_fwdump_prep()
79 error = mlx5_vsc_lock(mdev); in mlx5_fwdump_prep()
82 error = mlx5_vsc_set_space(mdev, MLX5_VSC_DOMAIN_SCAN_CRSPACE); in mlx5_fwdump_prep()
[all …]
HDmlx5_vsc.c32 int mlx5_vsc_lock(struct mlx5_core_dev *mdev) in mlx5_vsc_lock() argument
34 device_t dev = mdev->pdev->dev.bsddev; in mlx5_vsc_lock()
35 int vsc_addr = mdev->vsc_addr; in mlx5_vsc_lock()
41 mlx5_core_warn(mdev, "Unable to acquire vsc lock, vsc_addr not initialized\n"); in mlx5_vsc_lock()
72 void mlx5_vsc_unlock(struct mlx5_core_dev *mdev) in mlx5_vsc_unlock() argument
74 device_t dev = mdev->pdev->dev.bsddev; in mlx5_vsc_unlock()
75 int vsc_addr = mdev->vsc_addr; in mlx5_vsc_unlock()
78 mlx5_core_warn(mdev, "Unable to release vsc lock, vsc_addr not initialized\n"); in mlx5_vsc_unlock()
86 mlx5_vsc_wait_on_flag(struct mlx5_core_dev *mdev, u32 expected) in mlx5_vsc_wait_on_flag() argument
88 device_t dev = mdev->pdev->dev.bsddev; in mlx5_vsc_wait_on_flag()
[all …]
HDmlx5_wq.c62 int mlx5_wq_cyc_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param, in mlx5_wq_cyc_create() argument
72 err = mlx5_db_alloc_node(mdev, &wq_ctrl->db, param->db_numa_node); in mlx5_wq_cyc_create()
74 mlx5_core_warn(mdev, "mlx5_db_alloc() failed, %d\n", err); in mlx5_wq_cyc_create()
78 err = mlx5_buf_alloc_node(mdev, mlx5_wq_cyc_get_byte_size(wq), in mlx5_wq_cyc_create()
82 mlx5_core_warn(mdev, "mlx5_buf_alloc() failed, %d\n", err); in mlx5_wq_cyc_create()
89 wq_ctrl->mdev = mdev; in mlx5_wq_cyc_create()
94 mlx5_db_free(mdev, &wq_ctrl->db); in mlx5_wq_cyc_create()
99 int mlx5_cqwq_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param, in mlx5_cqwq_create() argument
110 err = mlx5_db_alloc_node(mdev, &wq_ctrl->db, param->db_numa_node); in mlx5_cqwq_create()
112 mlx5_core_warn(mdev, "mlx5_db_alloc() failed, %d\n", err); in mlx5_cqwq_create()
[all …]
HDmlx5_vport.c33 static int mlx5_modify_nic_vport_context(struct mlx5_core_dev *mdev, void *in,
36 static int _mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, in _mlx5_query_vport_state() argument
49 err = mlx5_cmd_exec(mdev, in, sizeof(in), out, outlen); in _mlx5_query_vport_state()
51 mlx5_core_warn(mdev, "MLX5_CMD_OP_QUERY_VPORT_STATE failed\n"); in _mlx5_query_vport_state()
56 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport) in mlx5_query_vport_state() argument
60 _mlx5_query_vport_state(mdev, opmod, vport, out, sizeof(out)); in mlx5_query_vport_state()
66 u8 mlx5_query_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport) in mlx5_query_vport_admin_state() argument
70 _mlx5_query_vport_state(mdev, opmod, vport, out, sizeof(out)); in mlx5_query_vport_admin_state()
76 int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod, in mlx5_modify_vport_admin_state() argument
93 err = mlx5_cmd_exec(mdev, in, sizeof(in), out, sizeof(out)); in mlx5_modify_vport_admin_state()
[all …]
HDmlx5_port.c69 int mlx5_query_qcam_reg(struct mlx5_core_dev *mdev, u32 *qcam, in mlx5_query_qcam_reg() argument
78 return mlx5_core_access_reg(mdev, in, sz, qcam, sz, MLX5_REG_QCAM, 0, 0); in mlx5_query_qcam_reg()
791 int mlx5_query_port_cong_status(struct mlx5_core_dev *mdev, int protocol, in mlx5_query_port_cong_status() argument
805 err = mlx5_cmd_exec(mdev, in, sizeof(in), out, sizeof(out)); in mlx5_query_port_cong_status()
811 int mlx5_modify_port_cong_status(struct mlx5_core_dev *mdev, int protocol, in mlx5_modify_port_cong_status() argument
823 return mlx5_cmd_exec(mdev, in, sizeof(in), out, sizeof(out)); in mlx5_modify_port_cong_status()
826 int mlx5_query_port_cong_params(struct mlx5_core_dev *mdev, int protocol, in mlx5_query_port_cong_params() argument
835 return mlx5_cmd_exec(mdev, in, sizeof(in), out, out_size); in mlx5_query_port_cong_params()
838 static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out, in mlx5_query_port_qetcr_reg() argument
843 if (!MLX5_CAP_GEN(mdev, ets)) in mlx5_query_port_qetcr_reg()
[all …]
HDmlx5_uar.c162 int mlx5_alloc_map_uar(struct mlx5_core_dev *mdev, struct mlx5_uar *uar) in mlx5_alloc_map_uar() argument
168 err = mlx5_cmd_alloc_uar(mdev, &uar->index); in mlx5_alloc_map_uar()
170 mlx5_core_warn(mdev, "mlx5_cmd_alloc_uar() failed, %d\n", err); in mlx5_alloc_map_uar()
174 uar_bar_start = pci_resource_start(mdev->pdev, 0); in mlx5_alloc_map_uar()
178 mlx5_core_warn(mdev, "ioremap() failed, %d\n", err); in mlx5_alloc_map_uar()
183 if (mdev->priv.bf_mapping) in mlx5_alloc_map_uar()
184 uar->bf_map = io_mapping_map_wc(mdev->priv.bf_mapping, in mlx5_alloc_map_uar()
191 mlx5_cmd_free_uar(mdev, uar->index); in mlx5_alloc_map_uar()
197 void mlx5_unmap_free_uar(struct mlx5_core_dev *mdev, struct mlx5_uar *uar) in mlx5_unmap_free_uar() argument
201 mlx5_cmd_free_uar(mdev, uar->index); in mlx5_unmap_free_uar()
/freebsd-11-stable/sys/dev/mlx5/
HDvport.h39 int mlx5_vport_alloc_q_counter(struct mlx5_core_dev *mdev, int client_id,
41 int mlx5_vport_dealloc_q_counter(struct mlx5_core_dev *mdev, int client_id,
43 int mlx5_vport_query_q_counter(struct mlx5_core_dev *mdev,
48 int mlx5_vport_query_out_of_rx_buffer(struct mlx5_core_dev *mdev,
56 int mlx5_nic_vport_query_local_lb(struct mlx5_core_dev *mdev,
59 int mlx5_nic_vport_modify_local_lb(struct mlx5_core_dev *mdev,
62 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport);
63 u8 mlx5_query_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
65 int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
68 int mlx5_query_vport_mtu(struct mlx5_core_dev *mdev, int *mtu);
[all …]
HDdevice.h957 #define MLX5_CAP_GEN(mdev, cap) \ argument
958 MLX5_GET(cmd_hca_cap, mdev->hca_caps_cur[MLX5_CAP_GENERAL], cap)
960 #define MLX5_CAP_GEN_MAX(mdev, cap) \ argument
961 MLX5_GET(cmd_hca_cap, mdev->hca_caps_max[MLX5_CAP_GENERAL], cap)
963 #define MLX5_CAP_ETH(mdev, cap) \ argument
965 mdev->hca_caps_cur[MLX5_CAP_ETHERNET_OFFLOADS], cap)
967 #define MLX5_CAP_ETH_MAX(mdev, cap) \ argument
969 mdev->hca_caps_max[MLX5_CAP_ETHERNET_OFFLOADS], cap)
971 #define MLX5_CAP_ROCE(mdev, cap) \ argument
972 MLX5_GET(roce_cap, mdev->hca_caps_cur[MLX5_CAP_ROCE], cap)
[all …]
HDport.h259 int mlx5_max_tc(struct mlx5_core_dev *mdev);
260 int mlx5_query_port_tc_rate_limit(struct mlx5_core_dev *mdev,
263 int mlx5_modify_port_tc_rate_limit(struct mlx5_core_dev *mdev,
266 int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev,
268 int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, int prio_index,
270 int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, const u8 *tc_group);
271 int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev,
273 int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, const u8 *tc_bw);
274 int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *bw_pct);
276 int mlx5_set_trust_state(struct mlx5_core_dev *mdev, u8 trust_state);
[all …]
/freebsd-11-stable/sys/dev/mlx5/mlx5_fpga/
HDmlx5fpga_core.c155 err = mlx5_fpga_query(fdev->mdev, &query); in mlx5_fpga_device_load_check()
169 fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); in mlx5_fpga_device_load_check()
186 struct mlx5_core_dev *mdev = fdev->mdev; in mlx5_fpga_device_brb() local
188 err = mlx5_fpga_ctrl_op(mdev, MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON); in mlx5_fpga_device_brb()
193 err = mlx5_fpga_ctrl_op(mdev, MLX5_FPGA_CTRL_OPERATION_RESET_SANDBOX); in mlx5_fpga_device_brb()
198 err = mlx5_fpga_ctrl_op(mdev, MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_OFF); in mlx5_fpga_device_brb()
206 int mlx5_fpga_device_start(struct mlx5_core_dev *mdev) in mlx5_fpga_device_start() argument
209 struct mlx5_fpga_device *fdev = mdev->fpga; in mlx5_fpga_device_start()
222 err = mlx5_fpga_caps(fdev->mdev); in mlx5_fpga_device_start()
230 fpga_id = MLX5_CAP_FPGA(fdev->mdev, fpga_id); in mlx5_fpga_device_start()
[all …]
HDcore.h61 struct mlx5_core_dev *mdev; member
87 dev_dbg(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
91 dev_err(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
95 dev_warn(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
99 dev_warn_ratelimited(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d: " \
103 dev_notice(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__)
106 dev_info(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__)
108 int mlx5_fpga_init(struct mlx5_core_dev *mdev);
109 void mlx5_fpga_cleanup(struct mlx5_core_dev *mdev);
110 int mlx5_fpga_device_start(struct mlx5_core_dev *mdev);
[all …]
HDipsec.h42 void *mlx5_fpga_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev,
46 u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev);
47 unsigned int mlx5_fpga_ipsec_counters_count(struct mlx5_core_dev *mdev);
48 int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters,
51 int mlx5_fpga_ipsec_init(struct mlx5_core_dev *mdev);
52 void mlx5_fpga_ipsec_cleanup(struct mlx5_core_dev *mdev);
56 static inline void *mlx5_fpga_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev, in mlx5_fpga_ipsec_sa_cmd_exec() argument
67 static inline u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev) in mlx5_fpga_ipsec_device_caps() argument
73 mlx5_fpga_ipsec_counters_count(struct mlx5_core_dev *mdev) in mlx5_fpga_ipsec_counters_count() argument
78 static inline int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, in mlx5_fpga_ipsec_counters_read() argument
[all …]
HDmlx5fpga_sdk.c143 if (!fdev->mdev) in mlx5_fpga_mem_read_i2c()
149 err = mlx5_fpga_access_reg(fdev->mdev, actual_size, in mlx5_fpga_mem_read_i2c()
175 if (!fdev->mdev) in mlx5_fpga_mem_write_i2c()
181 err = mlx5_fpga_access_reg(fdev->mdev, actual_size, in mlx5_fpga_mem_write_i2c()
263 return mlx5_fpga_sbu_caps(fdev->mdev, buf, size); in mlx5_fpga_get_sbu_caps()
269 return (u64)MLX5_CAP_FPGA(fdev->mdev, fpga_ddr_size) << 10; in mlx5_fpga_ddr_size_get()
275 return MLX5_CAP64_FPGA(fdev->mdev, fpga_ddr_start_addr); in mlx5_fpga_ddr_base_get()
329 struct mlx5_core_dev *mdev = fdev->mdev; in mlx5_fpga_device_reload_cmd() local
337 err = mlx5_fpga_ctrl_op(mdev, MLX5_FPGA_CTRL_OPERATION_RELOAD); in mlx5_fpga_device_reload_cmd()
352 err = mlx5_fpga_device_start(mdev); in mlx5_fpga_device_reload_cmd()
[all …]
HDmlx5fpga_ipsec.c80 static bool mlx5_fpga_is_ipsec_device(struct mlx5_core_dev *mdev) in mlx5_fpga_is_ipsec_device() argument
82 if (!mdev->fpga || !MLX5_CAP_GEN(mdev, fpga)) in mlx5_fpga_is_ipsec_device()
85 if (MLX5_CAP_FPGA(mdev, ieee_vendor_id) != in mlx5_fpga_is_ipsec_device()
89 if (MLX5_CAP_FPGA(mdev, sandbox_product_id) != in mlx5_fpga_is_ipsec_device()
176 void *mlx5_fpga_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev, in mlx5_fpga_ipsec_sa_cmd_exec() argument
180 struct mlx5_fpga_device *fdev = mdev->fpga; in mlx5_fpga_ipsec_sa_cmd_exec()
238 u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev) in mlx5_fpga_ipsec_device_caps() argument
240 struct mlx5_fpga_device *fdev = mdev->fpga; in mlx5_fpga_ipsec_device_caps()
243 if (mlx5_fpga_is_ipsec_device(mdev)) in mlx5_fpga_ipsec_device_caps()
263 unsigned int mlx5_fpga_ipsec_counters_count(struct mlx5_core_dev *mdev) in mlx5_fpga_ipsec_counters_count() argument
[all …]
HDmlx5fpga_conn.c57 dma_device = &conn->fdev->mdev->pdev->dev; in mlx5_fpga_conn_map_buf()
89 dma_device = &conn->fdev->mdev->pdev->dev; in mlx5_fpga_conn_unmap_buf()
222 static int mlx5_fpga_conn_create_mkey(struct mlx5_core_dev *mdev, u32 pdn, in mlx5_fpga_conn_create_mkey() argument
243 err = mlx5_core_create_mkey(mdev, mkey, in, inlen); in mlx5_fpga_conn_create_mkey()
430 struct mlx5_core_dev *mdev = fdev->mdev; in mlx5_fpga_conn_create_cq() local
443 wqp.buf_numa_node = mdev->priv.numa_node; in mlx5_fpga_conn_create_cq()
444 wqp.db_numa_node = mdev->priv.numa_node; in mlx5_fpga_conn_create_cq()
446 err = mlx5_cqwq_create(mdev, &wqp, temp_cqc, &conn->cq.wq, in mlx5_fpga_conn_create_cq()
464 err = mlx5_vector2eqn(mdev, smp_processor_id(), &eqn, &irqn); in mlx5_fpga_conn_create_cq()
479 err = mlx5_core_create_cq(mdev, &conn->cq.mcq, in, inlen); in mlx5_fpga_conn_create_cq()
[all …]
/freebsd-11-stable/sys/dev/mlx5/mlx5_en/
HDmlx5_en_ethtool.c90 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_getmaxrate() local
97 err = -mlx5_query_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); in mlx5e_getmaxrate()
101 for (i = 0; i <= mlx5_max_tc(mdev); i++) { in mlx5e_getmaxrate()
126 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_get_max_alloc() local
131 err = -mlx5_query_port_tc_bw_alloc(mdev, priv->params_ethtool.max_bw_share); in mlx5e_get_max_alloc()
138 err = -mlx5_set_port_tc_bw_alloc(mdev, in mlx5e_get_max_alloc()
149 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_get_dscp() local
152 if (MLX5_CAP_GEN(mdev, qcam_reg) == 0 || in mlx5e_get_dscp()
153 MLX5_CAP_QCAM_REG(mdev, qpts) == 0 || in mlx5e_get_dscp()
154 MLX5_CAP_QCAM_REG(mdev, qpdpm) == 0) in mlx5e_get_dscp()
[all …]
HDmlx5_en_main.c404 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_update_carrier() local
414 port_state = mlx5_query_vport_state(mdev, in mlx5e_update_carrier()
426 error = mlx5_query_port_ptys(mdev, out, sizeof(out), in mlx5e_update_carrier()
436 ext = MLX5_CAP_PCAM_FEATURE(mdev, ptys_extended_ethernet); in mlx5e_update_carrier()
457 error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); in mlx5e_update_carrier()
466 error = mlx5_query_pddr_range_info(mdev, 1, &is_er_type); in mlx5e_update_carrier()
532 return (mlx5_set_port_pause_and_pfc(priv->mdev, 1, in mlx5e_set_port_pause_and_pfc()
561 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_media_change() local
579 error = mlx5_query_port_ptys(mdev, out, sizeof(out), in mlx5e_media_change()
586 ext = MLX5_CAP_PCAM_FEATURE(mdev, ptys_extended_ethernet); in mlx5e_media_change()
[all …]
/freebsd-11-stable/sys/dev/mlx5/mlx5_accel/
HDipsec.h67 #define MLX5_IPSEC_DEV(mdev) (mlx5_accel_ipsec_device_caps(mdev) & \ argument
104 void *mlx5_accel_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev,
115 u32 mlx5_accel_ipsec_device_caps(struct mlx5_core_dev *mdev);
117 unsigned int mlx5_accel_ipsec_counters_count(struct mlx5_core_dev *mdev);
118 int mlx5_accel_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters,
121 int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev);
122 void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev);
126 #define MLX5_IPSEC_DEV(mdev) false argument
128 static inline int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev) in mlx5_accel_ipsec_init() argument
133 static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev) in mlx5_accel_ipsec_cleanup() argument
/freebsd-11-stable/sys/dev/mlx5/mlx5_ib/
HDmlx5_ib_main.c91 int port_type_cap = MLX5_CAP_GEN(dev->mdev, port_type); in mlx5_ib_port_link_layer()
97 struct mlx5_core_dev *mdev, in mlx5_netdev_match() argument
104 *(struct mlx5_core_dev **)ndev->if_softc == mdev; in mlx5_netdev_match()
119 if (mlx5_netdev_match(ndev, ibdev->mdev, "mce")) in mlx5_netdev_event()
297 err = mlx5_query_port_ptys(dev->mdev, out, sizeof(out), MLX5_PTYS_EN, in mlx5_query_port_roce()
302 ext = MLX5_CAP_PCAM_FEATURE(dev->mdev, ptys_extended_ethernet); in mlx5_query_port_roce()
315 props->gid_tbl_len = MLX5_CAP_ROCE(dev->mdev, in mlx5_query_port_roce()
318 props->max_msg_sz = 1 << MLX5_CAP_GEN(dev->mdev, log_max_msg); in mlx5_query_port_roce()
323 mlx5_query_nic_vport_qkey_viol_cntr(dev->mdev, &qkey_viol_cntr); in mlx5_query_port_roce()
410 return mlx5_cmd_exec(dev->mdev, in, sizeof(in), out, sizeof(out)); in set_roce_addr()
[all …]

123