Home
last modified time | relevance | path

Searched refs:mad (Results 1 – 25 of 38) sorted by relevance

12

/Linux-v6.6/Documentation/translations/zh_CN/infiniband/
Duser_mad.rst57 要的缓冲区长度被设置在mad.length中。
61 struct ib_user_mad *mad;
62 mad = malloc(sizeof *mad + 256);
63 ret = read(fd, mad, sizeof *mad + 256);
64 if (ret != sizeof mad + 256) {
66 free(mad);
71 struct ib_user_mad *mad;
72 mad = malloc(sizeof *mad + 256);
73 ret = read(fd, mad, sizeof *mad + 256);
75 length = mad.length;
[all …]
/Linux-v6.6/drivers/infiniband/hw/mlx4/
Dcm.c85 static void set_local_comm_id(struct ib_mad *mad, u32 cm_id) in set_local_comm_id() argument
87 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in set_local_comm_id()
89 (struct cm_sidr_generic_msg *)mad; in set_local_comm_id()
91 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in set_local_comm_id()
95 struct cm_generic_msg *msg = (struct cm_generic_msg *)mad; in set_local_comm_id()
100 static u32 get_local_comm_id(struct ib_mad *mad) in get_local_comm_id() argument
102 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in get_local_comm_id()
104 (struct cm_sidr_generic_msg *)mad; in get_local_comm_id()
106 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in get_local_comm_id()
110 struct cm_generic_msg *msg = (struct cm_generic_msg *)mad; in get_local_comm_id()
[all …]
Dmcg.c209 static int send_mad_to_wire(struct mlx4_ib_demux_ctx *ctx, struct ib_mad *mad) in send_mad_to_wire() argument
225 &ah_attr, NULL, 0xffff, mad); in send_mad_to_wire()
229 struct ib_mad *mad) in send_mad_to_slave() argument
249 return mlx4_ib_send_to_slave(dev, slave, ctx->port, IB_QPT_GSI, &wc, NULL, mad); in send_mad_to_slave()
254 struct ib_sa_mad mad; in send_join_to_wire() local
255 struct ib_sa_mcmember_data *sa_mad_data = (struct ib_sa_mcmember_data *)&mad.data; in send_join_to_wire()
259 memcpy(&mad, sa_mad, sizeof mad); in send_join_to_wire()
265 mad.mad_hdr.tid = mlx4_ib_get_new_demux_tid(group->demux); in send_join_to_wire()
266 group->last_req_tid = mad.mad_hdr.tid; /* keep it for later validation */ in send_join_to_wire()
268 ret = send_mad_to_wire(group->demux, (struct ib_mad *)&mad); in send_join_to_wire()
[all …]
Dmad.c82 struct ib_mad mad; member
88 struct ib_mad mad; member
221 const struct ib_mad *mad, u16 prev_lid) in smp_snoop() argument
231 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in smp_snoop()
232 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && in smp_snoop()
233 mad->mad_hdr.method == IB_MGMT_METHOD_SET) in smp_snoop()
234 switch (mad->mad_hdr.attr_id) { in smp_snoop()
238 pinfo = (struct ib_port_info *) ((struct ib_smp *) mad)->data; in smp_snoop()
264 bn = be32_to_cpu(((struct ib_smp *)mad)->attr_mod) & 0xFFFF; in smp_snoop()
265 base = (__be16 *) &(((struct ib_smp *)mad)->data[0]); in smp_snoop()
[all …]
DMakefile4 mlx4_ib-y := ah.o cq.o doorbell.o mad.o main.o mr.o qp.o srq.o mcg.o cm.o alias_GUID.o sysfs.o
Dmlx4_ib.h850 struct ib_sa_mad *mad);
862 struct ib_grh *grh, struct ib_mad *mad);
867 u16 vlan_id, struct ib_mad *mad);
872 struct ib_mad *mad);
875 struct ib_mad *mad);
/Linux-v6.6/drivers/iio/adc/
Dmt6360-adc.c66 static int mt6360_adc_read_channel(struct mt6360_adc_data *mad, int channel, int *val) in mt6360_adc_read_channel() argument
74 mutex_lock(&mad->adc_lock); in mt6360_adc_read_channel()
77 ret = regmap_update_bits(mad->regmap, MT6360_REG_PMUADCRPT1, MT6360_PREFERCH_MASK, in mt6360_adc_read_channel()
83 ret = regmap_raw_write(mad->regmap, MT6360_REG_PMUADCCFG, &adc_enable, sizeof(adc_enable)); in mt6360_adc_read_channel()
87 predict_end_t = ktime_add_ms(mad->last_off_timestamps[channel], 2 * ADC_WAIT_TIME_MS); in mt6360_adc_read_channel()
101 ret = regmap_raw_read(mad->regmap, MT6360_REG_PMUADCRPT1, rpt, sizeof(rpt)); in mt6360_adc_read_channel()
133 regmap_raw_write(mad->regmap, MT6360_REG_PMUADCCFG, &adc_enable, sizeof(adc_enable)); in mt6360_adc_read_channel()
134 mad->last_off_timestamps[channel] = ktime_get(); in mt6360_adc_read_channel()
136 regmap_update_bits(mad->regmap, MT6360_REG_PMUADCRPT1, MT6360_PREFERCH_MASK, in mt6360_adc_read_channel()
139 mutex_unlock(&mad->adc_lock); in mt6360_adc_read_channel()
[all …]
/Linux-v6.6/Documentation/infiniband/
Duser_mad.rst48 buffer needed is set in mad.length.
52 struct ib_user_mad *mad;
53 mad = malloc(sizeof *mad + 256);
54 ret = read(fd, mad, sizeof *mad + 256);
55 if (ret != sizeof mad + 256) {
57 free(mad);
62 struct ib_user_mad *mad;
63 mad = malloc(sizeof *mad + 256);
64 ret = read(fd, mad, sizeof *mad + 256);
66 length = mad.length;
[all …]
/Linux-v6.6/drivers/infiniband/hw/mthca/
Dmthca_mad.c109 const struct ib_mad *mad, in smp_snoop() argument
114 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in smp_snoop()
115 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && in smp_snoop()
116 mad->mad_hdr.method == IB_MGMT_METHOD_SET) { in smp_snoop()
117 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) { in smp_snoop()
119 (struct ib_port_info *) ((struct ib_smp *) mad)->data; in smp_snoop()
141 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PKEY_TABLE) { in smp_snoop()
151 struct ib_mad *mad) in node_desc_override() argument
153 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in node_desc_override()
154 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && in node_desc_override()
[all …]
/Linux-v6.6/drivers/infiniband/core/
Duser_mad.c131 struct ib_user_mad mad; member
191 for (packet->mad.hdr.id = 0; in queue_packet()
192 packet->mad.hdr.id < IB_UMAD_MAX_AGENTS; in queue_packet()
193 packet->mad.hdr.id++) in queue_packet()
194 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
226 packet->mad.hdr.status = ETIMEDOUT; in send_handler()
250 packet->mad.hdr.status = 0; in recv_handler()
251 packet->mad.hdr.length = hdr_size(file) + mad_recv_wc->mad_len; in recv_handler()
252 packet->mad.hdr.qpn = cpu_to_be32(mad_recv_wc->wc->src_qp); in recv_handler()
258 packet->mad.hdr.lid = ib_lid_be16(0xFFFF & in recv_handler()
[all …]
Dsa_query.c109 struct ib_sa_mad *mad);
703 struct ib_sa_mad *mad = query->mad_buf->mad; in ib_nl_set_path_rec_attrs() local
704 ib_sa_comp_mask comp_mask = mad->sa_hdr.comp_mask; in ib_nl_set_path_rec_attrs()
788 struct ib_sa_mad *mad; in ib_nl_make_request() local
798 mad = query->mad_buf->mad; in ib_nl_make_request()
799 len = ib_nl_get_path_rec_attrs_len(mad->sa_hdr.comp_mask); in ib_nl_make_request()
878 struct ib_sa_mad *mad = NULL; in ib_nl_process_good_resolve_rsp() local
887 mad = query->mad_buf->mad; in ib_nl_process_good_resolve_rsp()
917 mad->mad_hdr.method |= IB_MGMT_METHOD_RESP; in ib_nl_process_good_resolve_rsp()
918 memcpy(mad->data, rec_data->path_rec, in ib_nl_process_good_resolve_rsp()
[all …]
Dmad_rmpp.c114 struct ib_rmpp_mad *ack = msg->mad; in format_ack()
136 hdr_len = ib_get_mad_data_offset(recv_wc->recv_buf.mad->mad_hdr.mgmt_class); in ack_recv()
144 format_ack(msg, (struct ib_rmpp_mad *) recv_wc->recv_buf.mad, rmpp_recv); in ack_recv()
163 hdr_len = ib_get_mad_data_offset(recv_wc->recv_buf.mad->mad_hdr.mgmt_class); in alloc_response_msg()
189 rmpp_mad = msg->mad; in ack_ds_ack()
190 memcpy(rmpp_mad, recv_wc->recv_buf.mad, msg->hdr_len); in ack_ds_ack()
223 rmpp_mad = msg->mad; in nack_recv()
224 memcpy(rmpp_mad, recv_wc->recv_buf.mad, msg->hdr_len); in nack_recv()
308 mad_hdr = &mad_recv_wc->recv_buf.mad->mad_hdr; in create_rmpp_recv()
327 struct ib_mad_hdr *mad_hdr = &mad_recv_wc->recv_buf.mad->mad_hdr; in find_rmpp_recv()
[all …]
Dmad.c96 const struct ib_mad_hdr *mad);
98 struct ib_mad_private *mad);
597 struct ib_smp *smp = mad_send_wr->send_buf.mad; in handle_outgoing_dr_smp()
702 (struct ib_mad *)mad_priv->mad, &mad_size, in handle_outgoing_dr_smp()
706 if (ib_response_mad((const struct ib_mad_hdr *)mad_priv->mad) && in handle_outgoing_dr_smp()
726 memcpy(mad_priv->mad, smp, mad_priv->mad_size); in handle_outgoing_dr_smp()
728 (const struct ib_mad_hdr *)mad_priv->mad); in handle_outgoing_dr_smp()
792 struct ib_rmpp_mad *rmpp_mad = send_buf->mad; in alloc_send_rmpp_list()
873 mad_send_wr->send_buf.mad = buf; in ib_create_send_mad()
973 return mad_send_wr->send_buf.mad + in ib_get_payload()
[all …]
Dcm.c1545 req_msg = (struct cm_req_msg *)msg->mad; in ib_send_cm_req()
1585 rcv_msg = (struct cm_rej_msg *) mad_recv_wc->recv_buf.mad; in cm_issue_rej()
1586 rej_msg = (struct cm_rej_msg *) msg->mad; in cm_issue_rej()
1789 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_format_req_event()
1940 cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv, in cm_dup_req_handler()
1946 cm_format_rej((struct cm_rej_msg *)msg->mad, cm_id_priv, in cm_dup_req_handler()
1972 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_match_req()
2066 req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad; in cm_req_handler()
2282 rep_msg = (struct cm_rep_msg *) msg->mad; in ib_send_cm_rep()
2359 cm_format_rtu((struct cm_rtu_msg *) msg->mad, cm_id_priv, in ib_send_cm_rtu()
[all …]
DMakefile13 multicast.o mad.o smi.o agent.o mad_rmpp.o \
/Linux-v6.6/drivers/scsi/ibmvscsi/
Dibmvfc.c217 struct ibmvfc_mad_common *mad = &evt->iu.mad_common; in ibmvfc_trc_start() local
237 entry->op_code = be32_to_cpu(mad->opcode); in ibmvfc_trc_start()
253 struct ibmvfc_mad_common *mad = &evt->xfer_iu->mad_common; in ibmvfc_trc_end() local
278 entry->op_code = be32_to_cpu(mad->opcode); in ibmvfc_trc_end()
279 entry->u.end.status = be16_to_cpu(mad->status); in ibmvfc_trc_end()
2139 struct ibmvfc_passthru_mad *mad; in ibmvfc_bsg_request() local
2218 mad = &evt->iu.passthru; in ibmvfc_bsg_request()
2220 memset(mad, 0, sizeof(*mad)); in ibmvfc_bsg_request()
2221 mad->common.version = cpu_to_be32(1); in ibmvfc_bsg_request()
2222 mad->common.opcode = cpu_to_be32(IBMVFC_PASSTHRU); in ibmvfc_bsg_request()
[all …]
/Linux-v6.6/include/trace/events/
Dib_mad.h67 ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
69 ((struct ib_mad_hdr *)wr->send_buf.mad)->mgmt_class;
71 ((struct ib_mad_hdr *)wr->send_buf.mad)->class_version;
73 ((struct ib_mad_hdr *)wr->send_buf.mad)->method;
75 ((struct ib_mad_hdr *)wr->send_buf.mad)->status;
77 ((struct ib_mad_hdr *)wr->send_buf.mad)->class_specific;
78 __entry->tid = ((struct ib_mad_hdr *)wr->send_buf.mad)->tid;
80 ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_id;
82 ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_mod;
154 ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
[all …]
/Linux-v6.6/include/rdma/
Dib_smi.h151 static inline void ib_init_query_mad(struct ib_smp *mad) in ib_init_query_mad() argument
153 mad->base_version = IB_MGMT_BASE_VERSION; in ib_init_query_mad()
154 mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED; in ib_init_query_mad()
155 mad->class_version = 1; in ib_init_query_mad()
156 mad->method = IB_MGMT_METHOD_GET; in ib_init_query_mad()
/Linux-v6.6/drivers/scsi/ibmvscsi_tgt/
Dibmvscsi_tgt.c1504 struct viosrp_adapter_info *mad = &vio_iu(iue)->mad.adapter_info; in ibmvscsis_adapter_info() local
1510 mad->common.status = cpu_to_be16(VIOSRP_MAD_SUCCESS); in ibmvscsis_adapter_info()
1512 if (be16_to_cpu(mad->common.length) > sizeof(*info)) { in ibmvscsis_adapter_info()
1513 mad->common.status = cpu_to_be16(VIOSRP_MAD_FAILED); in ibmvscsis_adapter_info()
1522 mad->common.status = cpu_to_be16(VIOSRP_MAD_FAILED); in ibmvscsis_adapter_info()
1527 rc = h_copy_rdma(be16_to_cpu(mad->common.length), in ibmvscsis_adapter_info()
1529 be64_to_cpu(mad->buffer), in ibmvscsis_adapter_info()
1540 be64_to_cpu(mad->buffer), vscsi->flags, flag_bits); in ibmvscsis_adapter_info()
1575 be64_to_cpu(mad->buffer)); in ibmvscsis_adapter_info()
1615 struct viosrp_capabilities *mad = &vio_iu(iue)->mad.capabilities; in ibmvscsis_cap_mad() local
[all …]
/Linux-v6.6/drivers/infiniband/ulp/opa_vnic/
Dopa_vnic_vema.c630 if (!mad_wc || !mad_wc->recv_buf.mad) in vema_recv()
647 vema_mad = rsp->mad; in vema_recv()
648 memcpy(vema_mad, mad_wc->recv_buf.mad, IB_MGMT_VENDOR_HDR); in vema_recv()
655 switch (mad_wc->recv_buf.mad->mad_hdr.method) { in vema_recv()
657 vema_get(port, (struct opa_vnic_vema_mad *)mad_wc->recv_buf.mad, in vema_recv()
661 vema_set(port, (struct opa_vnic_vema_mad *)mad_wc->recv_buf.mad, in vema_recv()
807 trap_mad = send_buf->mad; in opa_vnic_vema_send_trap()
/Linux-v6.6/net/802/
Dmrp.c239 struct rb_node *parent = app->mad.rb_node; in mrp_attr_lookup()
259 struct rb_node *parent = NULL, **p = &app->mad.rb_node; in mrp_attr_create()
285 rb_insert_color(&attr->node, &app->mad); in mrp_attr_create()
291 rb_erase(&attr->node, &app->mad); in mrp_attr_destroy()
300 for (node = rb_first(&app->mad); in mrp_attr_destroy_all()
583 for (node = rb_first(&app->mad); in mrp_mad_event()
878 app->mad = RB_ROOT; in mrp_init_applicant()
/Linux-v6.6/drivers/infiniband/sw/rdmavt/
DMakefile11 rdmavt-y := vt.o ah.o cq.o mad.o mcast.o mmap.o mr.o pd.o qp.o \
/Linux-v6.6/drivers/infiniband/ulp/srpt/
Dib_srpt.c270 static void srpt_get_class_port_info(struct ib_dm_mad *mad) in srpt_get_class_port_info() argument
274 cif = (struct ib_class_port_info *)mad->data; in srpt_get_class_port_info()
280 mad->mad_hdr.status = 0; in srpt_get_class_port_info()
290 static void srpt_get_iou(struct ib_dm_mad *mad) in srpt_get_iou() argument
296 ioui = (struct ib_dm_iou_info *)mad->data; in srpt_get_iou()
305 mad->mad_hdr.status = 0; in srpt_get_iou()
319 struct ib_dm_mad *mad) in srpt_get_ioc() argument
325 iocp = (struct ib_dm_ioc_profile *)mad->data; in srpt_get_ioc()
328 mad->mad_hdr.status in srpt_get_ioc()
334 mad->mad_hdr.status in srpt_get_ioc()
[all …]
/Linux-v6.6/drivers/infiniband/hw/mlx5/
DMakefile13 mad.o \
/Linux-v6.6/drivers/infiniband/hw/hfi1/
DMakefile28 mad.o \

12