Home
last modified time | relevance | path

Searched refs:grh (Results 1 – 25 of 59) sorted by relevance

123

/Linux-v4.19/drivers/infiniband/sw/rxe/
Drxe_av.c58 const struct ib_global_route *grh = rdma_ah_read_grh(attr); in rxe_av_from_attr() local
61 memcpy(av->grh.dgid.raw, grh->dgid.raw, sizeof(grh->dgid.raw)); in rxe_av_from_attr()
62 av->grh.flow_label = grh->flow_label; in rxe_av_from_attr()
63 av->grh.sgid_index = grh->sgid_index; in rxe_av_from_attr()
64 av->grh.hop_limit = grh->hop_limit; in rxe_av_from_attr()
65 av->grh.traffic_class = grh->traffic_class; in rxe_av_from_attr()
71 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rxe_av_to_attr() local
75 memcpy(grh->dgid.raw, av->grh.dgid.raw, sizeof(av->grh.dgid.raw)); in rxe_av_to_attr()
76 grh->flow_label = av->grh.flow_label; in rxe_av_to_attr()
77 grh->sgid_index = av->grh.sgid_index; in rxe_av_to_attr()
[all …]
Drxe_net.c194 av->grh.sgid_index); in rxe_find_route()
403 av->grh.traffic_class, av->grh.hop_limit, df, xnet); in prepare4()
430 av->grh.traffic_class, in prepare6()
431 av->grh.hop_limit); in prepare6()
506 return rxe->port.port_guid == av->grh.dgid.global.interface_id; in addr_same()
518 attr = rdma_get_gid_attr(&rxe->ib_dev, port_num, av->grh.sgid_index); in rxe_init_packet()
/Linux-v4.19/drivers/infiniband/hw/ocrdma/
Docrdma_ah.c79 struct ocrdma_grh grh; in set_av_attr() local
92 memset(&grh, 0, sizeof(grh)); in set_av_attr()
142 memcpy(&grh.sgid[0], sgid->raw, sizeof(union ib_gid)); in set_av_attr()
143 grh.tclass_flow = cpu_to_be32((6 << 28) | in set_av_attr()
146 memcpy(&grh.dgid[0], ib_grh->dgid.raw, in set_av_attr()
148 grh.pdid_hoplimit = cpu_to_be32((pdid << 16) | in set_av_attr()
151 memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh)); in set_av_attr()
186 sgid_attr = attr->grh.sgid_attr; in ocrdma_create_ah()
236 struct ocrdma_grh *grh; in ocrdma_query_ah() local
240 grh = (struct ocrdma_grh *)((u8 *)ah->av + in ocrdma_query_ah()
[all …]
/Linux-v4.19/drivers/infiniband/hw/mlx4/
Dah.c55 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah() local
58 ah->av.ib.gid_index = grh->sgid_index; in create_ib_ah()
59 ah->av.ib.hop_limit = grh->hop_limit; in create_ib_ah()
61 cpu_to_be32((grh->traffic_class << 20) | in create_ib_ah()
62 grh->flow_label); in create_ib_ah()
63 memcpy(ah->av.ib.dgid, grh->dgid.raw, 16); in create_ib_ah()
90 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_iboe_ah() local
93 memcpy(&in6, grh->dgid.raw, sizeof(in6)); in create_iboe_ah()
104 gid_attr = ah_attr->grh.sgid_attr; in create_iboe_ah()
115 ah->av.eth.gid_index = ah_attr->grh.sgid_index; in create_iboe_ah()
[all …]
Dmad.c71 struct ib_grh grh; member
80 struct ib_grh grh; member
87 struct ib_grh grh; member
154 u8 grh[40]; in mlx4_MAD_IFC() member
168 memcpy(ext_info->grh, in_grh, 40); in mlx4_MAD_IFC()
486 static int get_gids_from_l3_hdr(struct ib_grh *grh, union ib_gid *sgid, in get_gids_from_l3_hdr() argument
489 int version = ib_get_rdma_header_version((const union rdma_network_hdr *)grh); in get_gids_from_l3_hdr()
499 return ib_get_gids_from_rdma_hdr((union rdma_network_hdr *)grh, net_type, in get_gids_from_l3_hdr()
505 struct ib_grh *grh, struct ib_mad *mad) in mlx4_ib_send_to_slave() argument
566 if (get_gids_from_l3_hdr(grh, &sgid, &dgid)) in mlx4_ib_send_to_slave()
[all …]
/Linux-v4.19/drivers/infiniband/core/
Duverbs_marshall.c69 memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); in ib_copy_ah_attr_to_user()
83 const struct ib_global_route *grh = rdma_ah_read_grh(src); in ib_copy_ah_attr_to_user() local
85 memcpy(dst->grh.dgid, grh->dgid.raw, sizeof(grh->dgid)); in ib_copy_ah_attr_to_user()
86 dst->grh.flow_label = grh->flow_label; in ib_copy_ah_attr_to_user()
87 dst->grh.sgid_index = grh->sgid_index; in ib_copy_ah_attr_to_user()
88 dst->grh.hop_limit = grh->hop_limit; in ib_copy_ah_attr_to_user()
89 dst->grh.traffic_class = grh->traffic_class; in ib_copy_ah_attr_to_user()
Dud_header.c187 { STRUCT_FIELD(grh, ip_version),
191 { STRUCT_FIELD(grh, traffic_class),
195 { STRUCT_FIELD(grh, flow_label),
199 { STRUCT_FIELD(grh, payload_length),
203 { STRUCT_FIELD(grh, next_header),
207 { STRUCT_FIELD(grh, hop_limit),
211 { STRUCT_FIELD(grh, source_gid),
215 { STRUCT_FIELD(grh, destination_gid),
356 header->grh.ip_version = 6; in ib_ud_header_init()
357 header->grh.payload_length = in ib_ud_header_init()
[all …]
Dverbs.c339 if (dest->grh.sgid_attr) in rdma_copy_ah_attr()
340 rdma_hold_gid_attr(dest->grh.sgid_attr); in rdma_copy_ah_attr()
359 if (old->grh.sgid_attr) in rdma_replace_ah_attr()
360 rdma_hold_gid_attr(old->grh.sgid_attr); in rdma_replace_ah_attr()
379 src->grh.sgid_attr = NULL; in rdma_move_ah_attr()
398 if (ah_attr->grh.sgid_attr) { in rdma_check_ah_attr()
403 if (ah_attr->grh.sgid_attr->index != ah_attr->grh.sgid_index || in rdma_check_ah_attr()
404 ah_attr->grh.sgid_attr->port_num != ah_attr->port_num) in rdma_check_ah_attr()
419 struct ib_global_route *grh; in rdma_fill_sgid_attr() local
422 *old_sgid_attr = ah_attr->grh.sgid_attr; in rdma_fill_sgid_attr()
[all …]
Dagent.h47 extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,
Dagent.c81 void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh, in agent_send_response() argument
102 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); in agent_send_response()
Dmad.c1914 const struct ib_global_route *grh = in rcv_has_same_gid() local
1918 grh->sgid_index, &sgid)) in rcv_has_same_gid()
1920 return !memcmp(sgid.raw, rwc->recv_buf.grh->dgid.raw, in rcv_has_same_gid()
1929 rwc->recv_buf.grh->sgid.raw, in rcv_has_same_gid()
2098 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_ib_smi()
2101 &response->grh, wc, in handle_ib_smi()
2125 response->header.recv_wc.recv_buf.grh = &response->grh; in generate_unmatched_resp()
2186 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_opa_smi()
2189 &response->grh, wc, in handle_opa_smi()
2274 recv->header.recv_wc.recv_buf.grh = &recv->grh; in ib_mad_recv_done()
[all …]
Duser_mad.c255 const struct ib_global_route *grh; in recv_handler() local
260 mad_recv_wc->recv_buf.grh, in recv_handler()
265 grh = rdma_ah_read_grh(&ah_attr); in recv_handler()
266 packet->mad.hdr.gid_index = grh->sgid_index; in recv_handler()
267 packet->mad.hdr.hop_limit = grh->hop_limit; in recv_handler()
268 packet->mad.hdr.traffic_class = grh->traffic_class; in recv_handler()
269 memcpy(packet->mad.hdr.gid, &grh->dgid, 16); in recv_handler()
270 packet->mad.hdr.flow_label = cpu_to_be32(grh->flow_label); in recv_handler()
/Linux-v4.19/drivers/infiniband/hw/mlx5/
Dah.c42 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah() local
44 memcpy(ah->av.rgid, &grh->dgid, 16); in create_ib_ah()
45 ah->av.grh_gid_fl = cpu_to_be32(grh->flow_label | in create_ib_ah()
47 grh->sgid_index << 20); in create_ib_ah()
48 ah->av.hop_limit = grh->hop_limit; in create_ib_ah()
49 ah->av.tclass = grh->traffic_class; in create_ib_ah()
55 gid_type = ah_attr->grh.sgid_attr->gid_type; in create_ib_ah()
60 mlx5_get_roce_udp_sport(dev, ah_attr->grh.sgid_attr); in create_ib_ah()
/Linux-v4.19/drivers/infiniband/hw/hfi1/
Druc.c82 if (!packet->grh) { in hfi1_ruc_check_hdr()
88 const struct ib_global_route *grh; in hfi1_ruc_check_hdr() local
93 grh = rdma_ah_read_grh(&qp->alt_ah_attr); in hfi1_ruc_check_hdr()
94 guid = get_sguid(ibp, grh->sgid_index); in hfi1_ruc_check_hdr()
95 if (!gid_ok(&packet->grh->dgid, ibp->rvp.gid_prefix, in hfi1_ruc_check_hdr()
99 &packet->grh->sgid, in hfi1_ruc_check_hdr()
100 grh->dgid.global.subnet_prefix, in hfi1_ruc_check_hdr()
101 grh->dgid.global.interface_id)) in hfi1_ruc_check_hdr()
119 if (!packet->grh) { in hfi1_ruc_check_hdr()
125 const struct ib_global_route *grh; in hfi1_ruc_check_hdr() local
[all …]
Dud.c185 struct ib_grh grh; in ud_loopback() local
212 hfi1_make_grh(ibp, &grh, &grd, 0, 0); in ud_loopback()
213 hfi1_copy_sge(&qp->r_sge, &grh, in ud_loopback()
214 sizeof(grh), true, false); in ud_loopback()
334 struct ib_grh *grh; in hfi1_make_ud_req_9B() local
348 grh = &ps->s_txreq->phdr.hdr.ibh.u.l.grh; in hfi1_make_ud_req_9B()
350 hfi1_make_grh(ibp, grh, rdma_ah_read_grh(ah_attr), in hfi1_make_ud_req_9B()
434 struct ib_grh *grh; in hfi1_make_ud_req_16B() local
445 grh = &ps->s_txreq->phdr.hdr.opah.u.l.grh; in hfi1_make_ud_req_16B()
447 ibp, grh, grd, in hfi1_make_ud_req_16B()
[all …]
Ddriver.c280 packet->grh = &rhdr->u.l.grh; in rcv_hdrerr()
297 if (packet->grh) { in rcv_hdrerr()
299 struct ib_grh *grh = packet->grh; in rcv_hdrerr() local
301 if (grh->next_hdr != IB_GRH_NEXT_HDR) in rcv_hdrerr()
303 vtf = be32_to_cpu(grh->version_tclass_flow); in rcv_hdrerr()
439 struct ib_grh *grh = pkt->grh; in hfi1_process_ecn_slowpath() local
495 dlid, rlid, sc, grh); in hfi1_process_ecn_slowpath()
620 packet->grh = NULL; in __prescan_rxq()
623 packet->grh = &hdr->u.l.grh; in __prescan_rxq()
789 packet->grh = NULL; in process_rcv_update()
[all …]
Dhfi.h350 struct ib_grh *grh; member
2329 const struct ib_global_route *grh = rdma_ah_read_grh(attr); in hfi1_make_opa_lid() local
2340 if (ib_is_opa_gid(&grh->dgid)) in hfi1_make_opa_lid()
2341 dlid = opa_get_lid_from_gid(&grh->dgid); in hfi1_make_opa_lid()
2390 struct ib_grh *grh, u32 slid, in hfi1_make_ext_grh() argument
2399 grh->hop_limit = 1; in hfi1_make_ext_grh()
2400 grh->sgid.global.subnet_prefix = ibp->rvp.gid_prefix; in hfi1_make_ext_grh()
2402 grh->sgid.global.interface_id = in hfi1_make_ext_grh()
2405 grh->sgid.global.interface_id = OPA_MAKE_ID(slid); in hfi1_make_ext_grh()
2414 grh->dgid.global.subnet_prefix = ibp->rvp.gid_prefix; in hfi1_make_ext_grh()
[all …]
/Linux-v4.19/drivers/infiniband/hw/qib/
Dqib_ruc.c94 const struct ib_global_route *grh; in qib_ruc_check_hdr() local
99 grh = rdma_ah_read_grh(&qp->alt_ah_attr); in qib_ruc_check_hdr()
100 guid = get_sguid(ibp, grh->sgid_index); in qib_ruc_check_hdr()
101 if (!gid_ok(&hdr->u.l.grh.dgid, in qib_ruc_check_hdr()
104 if (!gid_ok(&hdr->u.l.grh.sgid, in qib_ruc_check_hdr()
105 grh->dgid.global.subnet_prefix, in qib_ruc_check_hdr()
106 grh->dgid.global.interface_id)) in qib_ruc_check_hdr()
133 const struct ib_global_route *grh; in qib_ruc_check_hdr() local
138 grh = rdma_ah_read_grh(&qp->remote_ah_attr); in qib_ruc_check_hdr()
139 guid = get_sguid(ibp, grh->sgid_index); in qib_ruc_check_hdr()
[all …]
Dqib_ud.c161 struct ib_grh grh; in qib_ud_loopback() local
164 qib_make_grh(ibp, &grh, grd, 0, 0); in qib_ud_loopback()
165 qib_copy_sge(&qp->r_sge, &grh, in qib_ud_loopback()
166 sizeof(grh), 1); in qib_ud_loopback()
329 qp->s_hdrwords += qib_make_grh(ibp, &priv->s_hdr->u.l.grh, in qib_make_ud_req()
554 qib_copy_sge(&qp->r_sge, &hdr->u.l.grh, in qib_ud_rcv()
/Linux-v4.19/drivers/infiniband/hw/mthca/
Dmthca_av.c208 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in mthca_create_ah() local
213 grh->sgid_index; in mthca_create_ah()
214 av->hop_limit = grh->hop_limit; in mthca_create_ah()
216 cpu_to_be32((grh->traffic_class << 20) | in mthca_create_ah()
217 grh->flow_label); in mthca_create_ah()
218 memcpy(av->dgid, grh->dgid.raw, 16); in mthca_create_ah()
279 header->grh.traffic_class = in mthca_read_ah()
281 header->grh.flow_label = in mthca_read_ah()
283 header->grh.hop_limit = ah->av->hop_limit; in mthca_read_ah()
284 header->grh.source_gid = ah->ibah.sgid_attr->gid; in mthca_read_ah()
[all …]
/Linux-v4.19/drivers/infiniband/hw/hns/
Dhns_roce_ah.c51 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in hns_roce_create_ah() local
60 gid_attr = ah_attr->grh.sgid_attr; in hns_roce_create_ah()
72 ah->av.gid_index = grh->sgid_index; in hns_roce_create_ah()
80 memcpy(ah->av.dgid, grh->dgid.raw, HNS_ROCE_GID_SIZE); in hns_roce_create_ah()
/Linux-v4.19/drivers/infiniband/hw/qedr/
Dqedr_roce_cm.c389 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in qedr_gsi_build_header() local
390 const struct ib_gid_attr *sgid_attr = grh->sgid_attr; in qedr_gsi_build_header()
457 udh->grh.traffic_class = grh->traffic_class; in qedr_gsi_build_header()
458 udh->grh.flow_label = grh->flow_label; in qedr_gsi_build_header()
459 udh->grh.hop_limit = grh->hop_limit; in qedr_gsi_build_header()
460 udh->grh.destination_gid = grh->dgid; in qedr_gsi_build_header()
461 memcpy(&udh->grh.source_gid.raw, sgid_attr->gid.raw, in qedr_gsi_build_header()
462 sizeof(udh->grh.source_gid.raw)); in qedr_gsi_build_header()
468 udh->ip4.tos = htonl(grh->flow_label); in qedr_gsi_build_header()
470 udh->ip4.ttl = grh->hop_limit; in qedr_gsi_build_header()
[all …]
Dqedr.h507 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in qedr_get_dmac() local
510 if (!memcmp(&grh->dgid, &zero_sgid, sizeof(union ib_gid))) { in qedr_get_dmac()
516 memcpy(&in6, grh->dgid.raw, sizeof(in6)); in qedr_get_dmac()
/Linux-v4.19/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_verbs.c544 const struct ib_global_route *grh; in pvrdma_create_ah() local
550 grh = rdma_ah_read_grh(ah_attr); in pvrdma_create_ah()
552 rdma_is_multicast_addr((struct in6_addr *)grh->dgid.raw)) in pvrdma_create_ah()
567 ah->av.gid_index = grh->sgid_index; in pvrdma_create_ah()
568 ah->av.hop_limit = grh->hop_limit; in pvrdma_create_ah()
569 ah->av.sl_tclass_flowlabel = (grh->traffic_class << 20) | in pvrdma_create_ah()
570 grh->flow_label; in pvrdma_create_ah()
571 memcpy(ah->av.dgid, grh->dgid.raw, 16); in pvrdma_create_ah()
/Linux-v4.19/include/rdma/
Dib_verbs.h916 struct ib_global_route grh; member
3191 const struct ib_wc *wc, const struct ib_grh *grh,
3207 const struct ib_grh *grh, u8 port_num);
4029 return &attr->grh; in rdma_ah_read_grh()
4036 return &attr->grh; in rdma_ah_retrieve_grh()
4041 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_dgid_raw() local
4043 memcpy(grh->dgid.raw, dgid, sizeof(grh->dgid)); in rdma_ah_set_dgid_raw()
4049 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_subnet_prefix() local
4051 grh->dgid.global.subnet_prefix = prefix; in rdma_ah_set_subnet_prefix()
4057 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_interface_id() local
[all …]

123