| /drivers/infiniband/sw/rxe/ |
| A D | rxe_av.c | 40 grh->sgid_index); in chk_attr() 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() 83 av->grh.traffic_class = grh->traffic_class; in rxe_av_from_attr() 93 memcpy(grh->dgid.raw, av->grh.dgid.raw, sizeof(av->grh.dgid.raw)); in rxe_av_to_attr() 94 grh->flow_label = av->grh.flow_label; in rxe_av_to_attr() 95 grh->sgid_index = av->grh.sgid_index; in rxe_av_to_attr() 96 grh->hop_limit = av->grh.hop_limit; in rxe_av_to_attr() [all …]
|
| A D | rxe_net.c | 299 av->grh.traffic_class, av->grh.hop_limit, df, xnet); in prepare4() 323 av->grh.traffic_class, in prepare6() 324 av->grh.hop_limit); in prepare6() 475 attr = rdma_get_gid_attr(&rxe->ib_dev, port_num, av->grh.sgid_index); in rxe_init_packet()
|
| /drivers/infiniband/hw/hfi1/ |
| A D | ruc.c | 40 if (!packet->grh) { 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() 77 if (!packet->grh) { in hfi1_ruc_check_hdr() 94 &packet->grh->sgid, in hfi1_ruc_check_hdr() 143 hdr->dgid = grh->dgid; in hfi1_make_grh() 252 struct ib_grh *grh; in hfi1_make_ruc_header_16B() local 261 grh = &ps->s_txreq->phdr.hdr.opah.u.l.grh; in hfi1_make_ruc_header_16B() 264 hfi1_make_grh(ibp, grh, grd, in hfi1_make_ruc_header_16B() 335 struct ib_grh *grh = &ps->s_txreq->phdr.hdr.ibh.u.l.grh; in hfi1_make_ruc_header_9B() local [all …]
|
| A D | ud.c | 144 struct ib_grh grh; in ud_loopback() local 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() 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() 611 struct ib_grh *grh = &hdr.opah.u.l.grh; in return_cnp_16B() local 616 grh->hop_limit = 0xff; in return_cnp_16B() 669 struct ib_grh *grh = &hdr.ibh.u.l.grh; in return_cnp() local 961 if (packet->grh) { in hfi1_ud_rcv() [all …]
|
| 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 407 struct ib_grh *grh = pkt->grh; in hfi1_process_ecn_slowpath() local 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() 1486 packet->grh = NULL; in hfi1_setup_9B_packet() 1491 packet->grh = &hdr->u.l.grh; in hfi1_setup_9B_packet() 1546 packet->grh = NULL; in hfi1_setup_bypass_packet() [all …]
|
| A D | hfi.h | 341 struct ib_grh *grh; member 2497 const struct ib_global_route *grh = rdma_ah_read_grh(attr); in hfi1_make_opa_lid() local 2508 if (ib_is_opa_gid(&grh->dgid)) in hfi1_make_opa_lid() 2509 dlid = opa_get_lid_from_gid(&grh->dgid); in hfi1_make_opa_lid() 2558 struct ib_grh *grh, u32 slid, in hfi1_make_ext_grh() argument 2567 grh->hop_limit = 1; in hfi1_make_ext_grh() 2568 grh->sgid.global.subnet_prefix = ibp->rvp.gid_prefix; in hfi1_make_ext_grh() 2570 grh->sgid.global.interface_id = in hfi1_make_ext_grh() 2573 grh->sgid.global.interface_id = OPA_MAKE_ID(slid); in hfi1_make_ext_grh() 2582 grh->dgid.global.subnet_prefix = ibp->rvp.gid_prefix; in hfi1_make_ext_grh() [all …]
|
| /drivers/infiniband/hw/mana/ |
| A D | ah.c | 14 const struct ib_global_route *grh; in mana_ib_create_ah() local 28 grh = rdma_ah_read_grh(ah_attr); in mana_ib_create_ah() 29 ntype = rdma_gid_attr_network_type(grh->sgid_attr); in mana_ib_create_ah() 32 ah->av->udp_src_port = rdma_flow_label_to_udp_sport(grh->flow_label); in mana_ib_create_ah() 33 ah->av->hop_limit = grh->hop_limit; in mana_ib_create_ah() 34 ah->av->dscp = (grh->traffic_class >> 2) & 0x3f; in mana_ib_create_ah() 38 copy_in_reverse(ah->av->dest_ip, grh->dgid.raw, 16); in mana_ib_create_ah() 39 copy_in_reverse(ah->av->src_ip, grh->sgid_attr->gid.raw, 16); in mana_ib_create_ah() 43 copy_in_reverse(&ah->av->dest_ip[12], &grh->dgid.raw[12], 4); in mana_ib_create_ah() 44 copy_in_reverse(&ah->av->src_ip[12], &grh->sgid_attr->gid.raw[12], 4); in mana_ib_create_ah()
|
| A D | qp.c | 761 copy_in_reverse(req.ah_attr.src_addr, attr->ah_attr.grh.sgid_attr->gid.raw, in mana_ib_gd_modify_qp() 763 copy_in_reverse(req.ah_attr.dest_addr, attr->ah_attr.grh.dgid.raw, in mana_ib_gd_modify_qp() 765 if (rdma_gid_attr_network_type(attr->ah_attr.grh.sgid_attr) == RDMA_NETWORK_IPV4) { in mana_ib_gd_modify_qp() 773 req.ah_attr.src_port = rdma_get_udp_sport(attr->ah_attr.grh.flow_label, in mana_ib_gd_modify_qp() 775 req.ah_attr.traffic_class = attr->ah_attr.grh.traffic_class >> 2; in mana_ib_gd_modify_qp() 776 req.ah_attr.hop_limit = attr->ah_attr.grh.hop_limit; in mana_ib_gd_modify_qp()
|
| /drivers/infiniband/hw/mlx4/ |
| A D | ah.c | 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() 89 memcpy(&in6, grh->dgid.raw, sizeof(in6)); in create_iboe_ah() 100 gid_attr = ah_attr->grh.sgid_attr; in create_iboe_ah() 121 ah->av.eth.hop_limit = grh->hop_limit; in create_iboe_ah() 130 cpu_to_be32((grh->traffic_class << 20) | in create_iboe_ah() 131 grh->flow_label); in create_iboe_ah() [all …]
|
| 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() 613 if (grh) in mlx4_ib_send_to_slave() 614 memcpy(&tun_mad->grh, grh, sizeof *grh); in mlx4_ib_send_to_slave() 683 struct ib_wc *wc, struct ib_grh *grh, in mlx4_ib_demux_mad() argument 755 if (grh->dgid.global.interface_id == in mlx4_ib_demux_mad() 1472 grh->sgid_index = slave; in fill_in_real_sgid_index() [all …]
|
| /drivers/infiniband/hw/ocrdma/ |
| 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() 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() 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() 239 grh = (struct ocrdma_grh *)((u8 *)ah->av + in ocrdma_query_ah() 246 be32_to_cpu(grh->pdid_hoplimit) & 0xff, in ocrdma_query_ah() 247 be32_to_cpu(grh->tclass_flow) >> 24); in ocrdma_query_ah() [all …]
|
| /drivers/infiniband/core/ |
| A D | uverbs_marshall.c | 69 memset(&dst->grh, 0, sizeof(dst->grh)); 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()
|
| 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 …]
|
| A D | ud_header.c | 187 { 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 …]
|
| A D | verbs.c | 366 if (dest->grh.sgid_attr) in rdma_copy_ah_attr() 386 if (old->grh.sgid_attr) in rdma_replace_ah_attr() 406 src->grh.sgid_attr = NULL; in rdma_move_ah_attr() 425 if (ah_attr->grh.sgid_attr) { in rdma_check_ah_attr() 430 if (ah_attr->grh.sgid_attr->index != ah_attr->grh.sgid_index || in rdma_check_ah_attr() 446 struct ib_global_route *grh; in rdma_fill_sgid_attr() local 459 if (grh->sgid_attr) in rdma_fill_sgid_attr() 468 grh->sgid_attr = sgid_attr; in rdma_fill_sgid_attr() 774 grh->hop_limit = hop_limit; in ib_resolve_unicast_gid_dmac() 913 if (ah_attr->grh.sgid_attr) { in rdma_destroy_ah_attr() [all …]
|
| 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()
|
| 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() 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() 2371 &recv->grh, wc, in ib_mad_recv_done() [all …]
|
| A D | agent.h | 47 extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,
|
| 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()
|
| /drivers/infiniband/hw/mlx5/ |
| 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 …]
|
| /drivers/infiniband/hw/hns/ |
| A D | hns_roce_ah.c | 41 u32 fl = ah_attr->grh.flow_label; in get_ah_udp_sport() 57 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in hns_roce_create_ah() local 61 u8 tclass = get_tclass(grh); in hns_roce_create_ah() 72 ah->av.gid_index = grh->sgid_index; in hns_roce_create_ah() 77 ah->av.hop_limit = grh->hop_limit; in hns_roce_create_ah() 78 ah->av.flowlabel = grh->flow_label; in hns_roce_create_ah() 86 if (ret && grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) in hns_roce_create_ah() 90 grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) in hns_roce_create_ah() 100 memcpy(ah->av.dgid, grh->dgid.raw, HNS_ROCE_GID_SIZE); in hns_roce_create_ah() 105 ret = rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr, in hns_roce_create_ah()
|
| /drivers/infiniband/hw/mthca/ |
| 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 …]
|
| /drivers/infiniband/hw/qedr/ |
| A D | qedr_roce_cm.c | 387 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in qedr_gsi_build_header() local 388 const struct ib_gid_attr *sgid_attr = grh->sgid_attr; in qedr_gsi_build_header() 458 udh->grh.traffic_class = grh->traffic_class; in qedr_gsi_build_header() 459 udh->grh.flow_label = grh->flow_label; in qedr_gsi_build_header() 460 udh->grh.hop_limit = grh->hop_limit; in qedr_gsi_build_header() 461 udh->grh.destination_gid = grh->dgid; in qedr_gsi_build_header() 462 memcpy(&udh->grh.source_gid.raw, sgid_attr->gid.raw, in qedr_gsi_build_header() 463 sizeof(udh->grh.source_gid.raw)); in qedr_gsi_build_header() 469 udh->ip4.tos = htonl(grh->flow_label); in qedr_gsi_build_header() 471 udh->ip4.ttl = grh->hop_limit; in qedr_gsi_build_header() [all …]
|
| A D | qedr.h | 535 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in qedr_get_dmac() local 538 if (!memcmp(&grh->dgid, &zero_sgid, sizeof(union ib_gid))) { in qedr_get_dmac() 544 memcpy(&in6, grh->dgid.raw, sizeof(in6)); in qedr_get_dmac()
|
| /drivers/infiniband/hw/vmw_pvrdma/ |
| A D | pvrdma_verbs.c | 490 const struct ib_global_route *grh; in pvrdma_create_ah() local 496 grh = rdma_ah_read_grh(ah_attr); in pvrdma_create_ah() 498 rdma_is_multicast_addr((struct in6_addr *)grh->dgid.raw)) in pvrdma_create_ah() 507 ah->av.gid_index = grh->sgid_index; in pvrdma_create_ah() 508 ah->av.hop_limit = grh->hop_limit; in pvrdma_create_ah() 509 ah->av.sl_tclass_flowlabel = (grh->traffic_class << 20) | in pvrdma_create_ah() 510 grh->flow_label; in pvrdma_create_ah() 511 memcpy(ah->av.dgid, grh->dgid.raw, 16); in pvrdma_create_ah()
|