| /linux/drivers/infiniband/sw/rxe/ |
| H A D | rxe_av.c | 19 const struct ib_global_route *grh = rdma_ah_read_grh(attr); in chk_attr() local 37 if (grh->sgid_index > port->attr.gid_tbl_len) { in chk_attr() 40 grh->sgid_index); in chk_attr() 43 grh->sgid_index); in chk_attr() 47 type = rdma_gid_attr_network_type(grh->sgid_attr); in chk_attr() 76 const struct ib_global_route *grh = rdma_ah_read_grh(attr); in rxe_av_from_attr() local 79 memcpy(av->grh.dgid.raw, grh->dgid.raw, sizeof(grh->dgid.raw)); in rxe_av_from_attr() 80 av->grh.flow_label = grh->flow_label; in rxe_av_from_attr() 81 av->grh.sgid_index = grh->sgid_index; in rxe_av_from_attr() 82 av->grh.hop_limit = grh->hop_limit; in rxe_av_from_attr() [all …]
|
| H A D | rxe_net.c | 380 av->grh.traffic_class, av->grh.hop_limit, df, xnet); in prepare4() 404 av->grh.traffic_class, in prepare6() 405 av->grh.hop_limit); in prepare6() 540 attr = rdma_get_gid_attr(&rxe->ib_dev, port_num, av->grh.sgid_index); in rxe_init_packet()
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | ruc.c | 40 if (!packet->grh) { in hfi1_ruc_check_hdr() 46 const struct ib_global_route *grh; in hfi1_ruc_check_hdr() local 51 grh = rdma_ah_read_grh(&qp->alt_ah_attr); in hfi1_ruc_check_hdr() 52 guid = get_sguid(ibp, grh->sgid_index); in hfi1_ruc_check_hdr() 53 if (!gid_ok(&packet->grh->dgid, ibp->rvp.gid_prefix, in hfi1_ruc_check_hdr() 57 &packet->grh->sgid, in hfi1_ruc_check_hdr() 58 grh->dgid.global.subnet_prefix, in hfi1_ruc_check_hdr() 59 grh->dgid.global.interface_id)) in hfi1_ruc_check_hdr() 77 if (!packet->grh) { in hfi1_ruc_check_hdr() 83 const struct ib_global_route *grh; in hfi1_ruc_check_hdr() local [all …]
|
| H A D | ud.c | 144 struct ib_grh grh; in ud_loopback() local 171 hfi1_make_grh(ibp, &grh, &grd, 0, 0); in ud_loopback() 172 rvt_copy_sge(qp, &qp->r_sge, &grh, in ud_loopback() 173 sizeof(grh), true, false); in ud_loopback() 273 struct ib_grh *grh; in hfi1_make_ud_req_9B() local 287 grh = &ps->s_txreq->phdr.hdr.ibh.u.l.grh; in hfi1_make_ud_req_9B() 289 hfi1_make_grh(ibp, grh, rdma_ah_read_grh(ah_attr), in hfi1_make_ud_req_9B() 373 struct ib_grh *grh; in hfi1_make_ud_req_16B() local 384 grh = &ps->s_txreq->phdr.hdr.opah.u.l.grh; in hfi1_make_ud_req_16B() 386 ibp, grh, grd, in hfi1_make_ud_req_16B() [all …]
|
| H A D | driver.c | 235 packet->grh = &rhdr->u.l.grh; in rcv_hdrerr() 252 if (packet->grh) { in rcv_hdrerr() 254 struct ib_grh *grh = packet->grh; in rcv_hdrerr() local 256 if (grh->next_hdr != IB_GRH_NEXT_HDR) in rcv_hdrerr() 258 vtf = be32_to_cpu(grh->version_tclass_flow); in rcv_hdrerr() 407 struct ib_grh *grh = pkt->grh; in hfi1_process_ecn_slowpath() local 481 dlid, rlid, sc, grh); in hfi1_process_ecn_slowpath() 603 packet->grh = NULL; in __prescan_rxq() 606 packet->grh = &hdr->u.l.grh; in __prescan_rxq() 804 packet->grh = NULL; in process_rcv_update() [all …]
|
| H A D | verbs.h | 83 struct ib_grh grh; member 397 const struct ib_global_route *grh, u32 hwords, u32 nwords);
|
| /linux/drivers/infiniband/hw/mlx4/ |
| H A D | ah.c | 54 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah() local 57 ah->av.ib.gid_index = grh->sgid_index; in create_ib_ah() 58 ah->av.ib.hop_limit = grh->hop_limit; in create_ib_ah() 60 cpu_to_be32((grh->traffic_class << 20) | in create_ib_ah() 61 grh->flow_label); in create_ib_ah() 62 memcpy(ah->av.ib.dgid, grh->dgid.raw, 16); in create_ib_ah() 86 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_iboe_ah() local 89 memcpy(&in6, grh->dgid.raw, sizeof(in6)); in create_iboe_ah() 100 gid_attr = ah_attr->grh.sgid_attr; in create_iboe_ah() 113 ah->av.eth.gid_index = ah_attr->grh.sgid_index; in create_iboe_ah() [all …]
|
| H A D | mad.c | 71 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() 487 static int get_gids_from_l3_hdr(struct ib_grh *grh, union ib_gid *sgid, in get_gids_from_l3_hdr() argument 490 int version = ib_get_rdma_header_version((const union rdma_network_hdr *)grh); in get_gids_from_l3_hdr() 500 return ib_get_gids_from_rdma_hdr((union rdma_network_hdr *)grh, net_type, in get_gids_from_l3_hdr() 513 struct ib_grh *grh, struct ib_mad *mad) in mlx4_ib_send_to_slave() argument 584 if (get_gids_from_l3_hdr(grh, &sgid, &dgid)) in mlx4_ib_send_to_slave() [all …]
|
| /linux/drivers/infiniband/hw/ocrdma/ |
| H A D | ocrdma_ah.c | 79 struct ocrdma_grh grh; in set_av_attr() local 91 memset(&grh, 0, sizeof(grh)); in set_av_attr() 141 memcpy(&grh.sgid[0], sgid->raw, sizeof(union ib_gid)); in set_av_attr() 142 grh.tclass_flow = cpu_to_be32((6 << 28) | in set_av_attr() 145 memcpy(&grh.dgid[0], ib_grh->dgid.raw, in set_av_attr() 147 grh.pdid_hoplimit = cpu_to_be32((pdid << 16) | in set_av_attr() 150 memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh)); in set_av_attr() 178 sgid_attr = attr->grh.sgid_attr; in ocrdma_create_ah() 231 struct ocrdma_grh *grh; in ocrdma_query_ah() local 235 grh = (struct ocrdma_grh *)((u8 *)ah->av + in ocrdma_query_ah() [all …]
|
| /linux/drivers/infiniband/core/ |
| H A D | lag.c | 23 is_ipv4 = ipv6_addr_v4mapped((struct in6_addr *)ah_attr->grh.dgid.raw); in rdma_build_skb() 37 htons(rdma_flow_label_to_udp_sport(ah_attr->grh.flow_label)); in rdma_build_skb() 51 memcpy(&iph->saddr, ah_attr->grh.sgid_attr->gid.raw + 12, in rdma_build_skb() 53 memcpy(&iph->daddr, ah_attr->grh.dgid.raw + 12, in rdma_build_skb() 61 memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label, in rdma_build_skb() 63 memcpy(&ip6h->saddr, ah_attr->grh.sgid_attr->gid.raw, in rdma_build_skb() 65 memcpy(&ip6h->daddr, ah_attr->grh.dgid.raw, in rdma_build_skb() 73 rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr, NULL, smac); in rdma_build_skb() 115 ah_attr->grh.sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP && in rdma_lag_get_ah_roce_slave() 116 ah_attr->grh.flow_label)) in rdma_lag_get_ah_roce_slave() [all …]
|
| H A D | verbs.c | 421 if (dest->grh.sgid_attr) in rdma_copy_ah_attr() 422 rdma_hold_gid_attr(dest->grh.sgid_attr); in rdma_copy_ah_attr() 441 if (old->grh.sgid_attr) in rdma_replace_ah_attr() 442 rdma_hold_gid_attr(old->grh.sgid_attr); in rdma_replace_ah_attr() 461 src->grh.sgid_attr = NULL; in rdma_move_ah_attr() 480 if (ah_attr->grh.sgid_attr) { in rdma_check_ah_attr() 485 if (ah_attr->grh.sgid_attr->index != ah_attr->grh.sgid_index || in rdma_check_ah_attr() 486 ah_attr->grh.sgid_attr->port_num != ah_attr->port_num) in rdma_check_ah_attr() 501 struct ib_global_route *grh; in rdma_fill_sgid_attr() local 504 *old_sgid_attr = ah_attr->grh.sgid_attr; in rdma_fill_sgid_attr() [all …]
|
| H A D | agent.c | 90 void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh, in agent_send_response() argument 111 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); in agent_send_response()
|
| H A D | agent.h | 47 extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,
|
| H A D | mad.c | 1910 const struct ib_global_route *grh = in rcv_has_same_gid() local 1914 grh->sgid_index, &sgid)) in rcv_has_same_gid() 1916 return !memcmp(sgid.raw, rwc->recv_buf.grh->dgid.raw, in rcv_has_same_gid() 1925 rwc->recv_buf.grh->sgid.raw, in rcv_has_same_gid() 2150 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_ib_smi() 2153 &response->grh, wc, in handle_ib_smi() 2177 response->header.recv_wc.recv_buf.grh = &response->grh; in generate_unmatched_resp() 2240 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_opa_smi() 2243 &response->grh, wc, in handle_opa_smi() 2328 recv->header.recv_wc.recv_buf.grh = &recv->grh; in ib_mad_recv_done() [all …]
|
| H A D | user_mad.c | 275 const struct ib_global_route *grh; in recv_handler() local 280 mad_recv_wc->recv_buf.grh, in recv_handler() 285 grh = rdma_ah_read_grh(&ah_attr); in recv_handler() 286 packet->mad.hdr.gid_index = grh->sgid_index; in recv_handler() 287 packet->mad.hdr.hop_limit = grh->hop_limit; in recv_handler() 288 packet->mad.hdr.traffic_class = grh->traffic_class; in recv_handler() 289 memcpy(packet->mad.hdr.gid, &grh->dgid, 16); in recv_handler() 290 packet->mad.hdr.flow_label = cpu_to_be32(grh->flow_label); in recv_handler()
|
| /linux/drivers/infiniband/hw/mlx5/ |
| H A D | ah.c | 38 enum ib_gid_type gid_type = ah_attr->grh.sgid_attr->gid_type; in mlx5_ah_get_udp_sport() 43 (ah_attr->grh.flow_label & IB_GRH_FLOWLABEL_MASK)) in mlx5_ah_get_udp_sport() 45 rdma_flow_label_to_udp_sport(ah_attr->grh.flow_label)); in mlx5_ah_get_udp_sport() 48 ah_attr->grh.sgid_attr); in mlx5_ah_get_udp_sport() 61 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah() local 63 memcpy(ah->av.rgid, &grh->dgid, 16); in create_ib_ah() 64 ah->av.grh_gid_fl = cpu_to_be32(grh->flow_label | in create_ib_ah() 66 grh->sgid_index << 20); in create_ib_ah() 67 ah->av.hop_limit = grh->hop_limit; in create_ib_ah() 68 ah->av.tclass = grh->traffic_class; in create_ib_ah() [all …]
|
| /linux/drivers/infiniband/hw/mthca/ |
| H A D | mthca_av.c | 208 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/drivers/infiniband/hw/qedr/ |
| H A D | qedr_roce_cm.c | 385 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in qedr_gsi_build_header() local 386 const struct ib_gid_attr *sgid_attr = grh->sgid_attr; in qedr_gsi_build_header() 456 udh->grh.traffic_class = grh->traffic_class; in qedr_gsi_build_header() 457 udh->grh.flow_label = grh->flow_label; in qedr_gsi_build_header() 458 udh->grh.hop_limit = grh->hop_limit; in qedr_gsi_build_header() 459 udh->grh.destination_gid = grh->dgid; in qedr_gsi_build_header() 460 memcpy(&udh->grh.source_gid.raw, sgid_attr->gid.raw, in qedr_gsi_build_header() 461 sizeof(udh->grh.source_gid.raw)); in qedr_gsi_build_header() 467 udh->ip4.tos = htonl(grh->flow_label); in qedr_gsi_build_header() 469 udh->ip4.ttl = grh->hop_limit; in qedr_gsi_build_header() [all …]
|
| /linux/drivers/infiniband/hw/ionic/ |
| H A D | ionic_controlpath.c | 509 const struct ib_global_route *grh; in ionic_build_hdr() local 519 grh = rdma_ah_read_grh(attr); in ionic_build_hdr() 521 rc = rdma_read_gid_l2_fields(grh->sgid_attr, &vlan, &hdr->eth.smac_h[0]); in ionic_build_hdr() 525 net = rdma_gid_attr_network_type(grh->sgid_attr); in ionic_build_hdr() 544 hdr->ip4.ttl = grh->hop_limit; in ionic_build_hdr() 547 *(const __be32 *)(grh->sgid_attr->gid.raw + 12); in ionic_build_hdr() 548 hdr->ip4.daddr = *(const __be32 *)(grh->dgid.raw + 12); in ionic_build_hdr() 551 hdr->ip4.tos = ionic_set_ecn(grh->traffic_class); in ionic_build_hdr() 553 hdr->ip4.tos = ionic_clear_ecn(grh->traffic_class); in ionic_build_hdr() 556 hdr->grh.flow_label = cpu_to_be32(grh->flow_label); in ionic_build_hdr() [all …]
|
| /linux/include/rdma/ |
| H A D | ib_verbs.h | 977 struct ib_global_route grh; 3717 * @grh: References the received global route header. This parameter is 3730 const struct ib_wc *wc, const struct ib_grh *grh, 3738 * @grh: References the received global route header. This parameter is 3746 const struct ib_grh *grh, u32 port_num); 4769 return &attr->grh; in rdma_ah_find_type() 4772 /*To retrieve and modify the grh */ in rdma_ah_find_type() 4776 return &attr->grh; in rdma_ah_find_type() 4781 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_find_type() 4783 memcpy(grh in rdma_ah_find_type() 960 struct ib_global_route grh; global() member 4715 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); rdma_ah_set_dgid_raw() local 4723 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); rdma_ah_set_subnet_prefix() local 4731 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); rdma_ah_set_interface_id() local 4741 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); rdma_ah_set_grh() local [all...] |
| /linux/drivers/infiniband/hw/mana/ |
| H A D | qp.c | 768 copy_in_reverse(req.ah_attr.src_addr, attr->ah_attr.grh.sgid_attr->gid.raw, in mana_ib_gd_modify_qp() 770 copy_in_reverse(req.ah_attr.dest_addr, attr->ah_attr.grh.dgid.raw, in mana_ib_gd_modify_qp() 772 if (rdma_gid_attr_network_type(attr->ah_attr.grh.sgid_attr) == RDMA_NETWORK_IPV4) { in mana_ib_gd_modify_qp() 780 req.ah_attr.src_port = rdma_get_udp_sport(attr->ah_attr.grh.flow_label, in mana_ib_gd_modify_qp() 782 req.ah_attr.traffic_class = attr->ah_attr.grh.traffic_class >> 2; in mana_ib_gd_modify_qp() 783 req.ah_attr.hop_limit = attr->ah_attr.grh.hop_limit; in mana_ib_gd_modify_qp() 784 req.ah_attr.flow_label = attr->ah_attr.grh.flow_label; in mana_ib_gd_modify_qp()
|
| /linux/drivers/infiniband/hw/vmw_pvrdma/ |
| H A D | pvrdma_misc.c | 277 pvrdma_global_route_to_ib(rdma_ah_retrieve_grh(dst), &src->grh); in pvrdma_ah_attr_to_rdma() 290 ib_global_route_to_pvrdma(&dst->grh, rdma_ah_read_grh(src)); in rdma_ah_attr_to_pvrdma()
|
| /linux/drivers/infiniband/hw/erdma/ |
| H A D | erdma_verbs.c | 1605 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in erdma_attr_to_av() local 1608 av->sgid_index = grh->sgid_index; in erdma_attr_to_av() 1609 av->hop_limit = grh->hop_limit; in erdma_attr_to_av() 1610 av->traffic_class = grh->traffic_class; in erdma_attr_to_av() 1613 av->flow_label = grh->flow_label; in erdma_attr_to_av() 1617 memcpy(av->dgid, grh->dgid.raw, ERDMA_ROCEV2_GID_SIZE); in erdma_attr_to_av() 1619 if (ipv6_addr_v4mapped((struct in6_addr *)&grh->dgid)) in erdma_attr_to_av() 1786 udp_sport = rdma_get_udp_sport(attr->ah_attr.grh.flow_label, in erdma_init_mod_qp_params_rocev2() 2223 const struct ib_global_route *grh = in erdma_create_ah() local 2232 ret = erdma_check_gid_attr(grh->sgid_attr); in erdma_create_ah() [all …]
|
| /linux/include/uapi/rdma/ |
| H A D | rdma_user_rxe.h | 68 struct rxe_global_route grh; member
|
| /linux/drivers/infiniband/hw/hns/ |
| H A D | hns_roce_hw_v2.c | 5038 const struct ib_global_route *grh = rdma_ah_read_grh(&attr->ah_attr); in get_dip_ctx_idx() local 5054 !memcmp(grh->dgid.raw, hr_dip->dgid, GID_LEN_V2)) { in get_dip_ctx_idx() 5070 memcpy(hr_dip->dgid, grh->dgid.raw, sizeof(grh->dgid.raw)); in get_dip_ctx_idx() 5158 const struct ib_global_route *grh = rdma_ah_read_grh(&attr->ah_attr); in fill_cong_field() local 5167 grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE) in fill_cong_field() 5237 const struct ib_global_route *grh = rdma_ah_read_grh(&attr->ah_attr); in hns_roce_set_sl() local 5245 if (grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) { in hns_roce_set_sl() 5247 get_tclass(&attr->ah_attr.grh), in hns_roce_set_sl() 5275 const struct ib_global_route *grh = rdma_ah_read_grh(&attr->ah_attr); in hns_roce_v2_set_path() local 5308 gid_attr = attr->ah_attr.grh.sgid_attr; in hns_roce_v2_set_path() [all …]
|