/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_ah.c | 37 memcpy(ah->av.rgid, &ah_attr->grh.dgid, 16); in create_ib_ah() 38 ah->av.grh_gid_fl = cpu_to_be32(ah_attr->grh.flow_label | in create_ib_ah() 40 ah_attr->grh.sgid_index << 20); in create_ib_ah() 41 ah->av.hop_limit = ah_attr->grh.hop_limit; in create_ib_ah() 42 ah->av.tclass = ah_attr->grh.traffic_class; in create_ib_ah() 52 ah_attr->grh.sgid_index); in create_ib_ah() 109 ah_attr->grh.sgid_index = (tmp >> 20) & 0xff; in mlx5_ib_query_ah() 110 ah_attr->grh.flow_label = tmp & 0xfffff; in mlx5_ib_query_ah() 111 memcpy(&ah_attr->grh.dgid, ah->av.rgid, 16); in mlx5_ib_query_ah() 112 ah_attr->grh.hop_limit = ah->av.hop_limit; in mlx5_ib_query_ah() [all …]
|
/freebsd/sys/dev/mlx4/mlx4_ib/ |
H A D | mlx4_ib_ah.c | 56 ah->av.ib.gid_index = ah_attr->grh.sgid_index; in create_ib_ah() 57 ah->av.ib.hop_limit = ah_attr->grh.hop_limit; in create_ib_ah() 59 cpu_to_be32((ah_attr->grh.traffic_class << 20) | in create_ib_ah() 60 ah_attr->grh.flow_label); in create_ib_ah() 61 memcpy(ah->av.ib.dgid, ah_attr->grh.dgid.raw, 16); in create_ib_ah() 87 memcpy(&in6, ah_attr->grh.dgid.raw, sizeof(in6)); in create_iboe_ah() 95 ah_attr->grh.sgid_index, &sgid, &gid_attr); in create_iboe_ah() 107 ret = mlx4_ib_gid_index_to_real_index(ibdev, ah_attr->port_num, ah_attr->grh.sgid_index); in create_iboe_ah() 112 ah->av.eth.hop_limit = ah_attr->grh.hop_limit; in create_iboe_ah() 126 memcpy(ah->av.eth.dgid, ah_attr->grh.dgid.raw, 16); in create_iboe_ah() [all …]
|
H A D | mlx4_ib_mad.c | 69 struct ib_grh grh; member 78 struct ib_grh grh; member 85 struct ib_grh grh; member 152 u8 grh[40]; in mlx4_MAD_IFC() member 166 memcpy(ext_info->grh, in_grh, 40); in mlx4_MAD_IFC() 484 struct ib_grh *grh, struct ib_mad *mad) in mlx4_ib_send_to_slave() argument 540 memcpy(&attr.grh.dgid.raw[0], &grh->dgid.raw[0], 16); in mlx4_ib_send_to_slave() 568 if (grh) in mlx4_ib_send_to_slave() 569 memcpy(&tun_mad->grh, grh, sizeof *grh); in mlx4_ib_send_to_slave() 575 tun_mad->hdr.g_ml_path = (grh && (wc->wc_flags & IB_WC_GRH)) ? 0x80 : 0; in mlx4_ib_send_to_slave() [all …]
|
H A D | mlx4_ib_qp.c | 1418 ah->grh.sgid_index); in _mlx4_set_path() 1428 path->hop_limit = ah->grh.hop_limit; in _mlx4_set_path() 1430 cpu_to_be32((ah->grh.traffic_class << 20) | in _mlx4_set_path() 1431 (ah->grh.flow_label)); in _mlx4_set_path() 1432 memcpy(path->rgid, ah->grh.dgid.raw, 16); in _mlx4_set_path() 1785 int index = attr->ah_attr.grh.sgid_index; in __mlx4_ib_modify_qp() 2509 sqp->ud_header.grh.traffic_class = in build_mlx_header() 2511 sqp->ud_header.grh.flow_label = in build_mlx_header() 2513 sqp->ud_header.grh.hop_limit = ah->av.ib.hop_limit; in build_mlx_header() 2515 memcpy(sqp->ud_header.grh.source_gid.raw, sgid.raw, 16); in build_mlx_header() [all …]
|
/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_uverbs_marshall.c | 41 memcpy(dst->grh.dgid, src->grh.dgid.raw, sizeof src->grh.dgid); in ib_copy_ah_attr_to_user() 42 dst->grh.flow_label = src->grh.flow_label; in ib_copy_ah_attr_to_user() 43 dst->grh.sgid_index = src->grh.sgid_index; in ib_copy_ah_attr_to_user() 44 dst->grh.hop_limit = src->grh.hop_limit; in ib_copy_ah_attr_to_user() 45 dst->grh.traffic_class = src->grh.traffic_class; in ib_copy_ah_attr_to_user() 46 memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); in ib_copy_ah_attr_to_user()
|
H A D | ib_ud_header.c | 190 { STRUCT_FIELD(grh, ip_version), 194 { STRUCT_FIELD(grh, traffic_class), 198 { STRUCT_FIELD(grh, flow_label), 202 { STRUCT_FIELD(grh, payload_length), 206 { STRUCT_FIELD(grh, next_header), 210 { STRUCT_FIELD(grh, hop_limit), 214 { STRUCT_FIELD(grh, source_gid), 218 { STRUCT_FIELD(grh, destination_gid), 363 header->grh.ip_version = 6; in ib_ud_header_init() 364 header->grh.payload_length = in ib_ud_header_init() [all …]
|
H A D | ib_verbs.c | 476 const struct ib_grh *grh) in ib_get_net_type_by_grh() argument 483 grh_version = ib_get_header_version((const union rdma_network_hdr *)grh); in ib_get_net_type_by_grh() 488 if (grh->next_hdr == IPPROTO_UDP) in ib_get_net_type_by_grh() 573 const struct ib_wc *wc, const struct ib_grh *grh, in ib_init_ah_from_wc() argument 590 net_type = ib_get_net_type_by_grh(device, port_num, grh); in ib_init_ah_from_wc() 593 ret = get_gids_from_rdma_hdr((const union rdma_network_hdr *)grh, net_type, in ib_init_ah_from_wc() 633 ah_attr->grh.dgid = sgid; in ib_init_ah_from_wc() 646 ah_attr->grh.sgid_index = (u8) gid_index; in ib_init_ah_from_wc() 647 flow_class = be32_to_cpu(grh->version_tclass_flow); in ib_init_ah_from_wc() 648 ah_attr->grh.flow_label = flow_class & 0xFFFFF; in ib_init_ah_from_wc() [all …]
|
H A D | ib_user_mad.c | 244 mad_recv_wc->wc, mad_recv_wc->recv_buf.grh, in recv_handler() 249 packet->mad.hdr.gid_index = ah_attr.grh.sgid_index; in recv_handler() 250 packet->mad.hdr.hop_limit = ah_attr.grh.hop_limit; in recv_handler() 251 packet->mad.hdr.traffic_class = ah_attr.grh.traffic_class; in recv_handler() 252 memcpy(packet->mad.hdr.gid, &ah_attr.grh.dgid, 16); in recv_handler() 253 packet->mad.hdr.flow_label = cpu_to_be32(ah_attr.grh.flow_label); in recv_handler() 503 memcpy(ah_attr.grh.dgid.raw, packet->mad.hdr.gid, 16); in ib_umad_write() 504 ah_attr.grh.sgid_index = packet->mad.hdr.gid_index; in ib_umad_write() 505 ah_attr.grh.flow_label = be32_to_cpu(packet->mad.hdr.flow_label); in ib_umad_write() 506 ah_attr.grh.hop_limit = packet->mad.hdr.hop_limit; in ib_umad_write() [all …]
|
H A D | ib_agent.c | 83 void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh, in agent_send_response() argument 104 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); in agent_send_response()
|
H A D | ib_uverbs_cmd.c | 1635 const struct ib_global_route *grh = &rdma_attr->grh; in copy_ah_attr_to_uverbs() local 1637 memcpy(uverb_attr->dgid, grh->dgid.raw, 16); in copy_ah_attr_to_uverbs() 1638 uverb_attr->flow_label = grh->flow_label; in copy_ah_attr_to_uverbs() 1639 uverb_attr->sgid_index = grh->sgid_index; in copy_ah_attr_to_uverbs() 1640 uverb_attr->hop_limit = grh->hop_limit; in copy_ah_attr_to_uverbs() 1641 uverb_attr->traffic_class = grh->traffic_class; in copy_ah_attr_to_uverbs() 1742 struct ib_global_route *grh = &rdma_attr->grh; in copy_ah_attr_from_uverbs() local 1744 grh->flow_label = uverb_attr->flow_label; in copy_ah_attr_from_uverbs() 1745 grh->sgid_index = uverb_attr->sgid_index; in copy_ah_attr_from_uverbs() 1746 grh->hop_limit = uverb_attr->hop_limit; in copy_ah_attr_from_uverbs() [all …]
|
H A D | agent.h | 49 extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,
|
H A D | ib_mad.c | 1880 attr.grh.sgid_index, &sgid, NULL)) in rcv_has_same_gid() 1882 return !memcmp(sgid.raw, rwc->recv_buf.grh->dgid.raw, in rcv_has_same_gid() 1890 return !memcmp(attr.grh.dgid.raw, rwc->recv_buf.grh->sgid.raw, in rcv_has_same_gid() 2048 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_ib_smi() 2051 &response->grh, wc, in handle_ib_smi() 2075 response->header.recv_wc.recv_buf.grh = &response->grh; in generate_unmatched_resp() 2136 response->header.recv_wc.recv_buf.grh = &response->grh; in handle_opa_smi() 2139 &response->grh, wc, in handle_opa_smi() 2224 recv->header.recv_wc.recv_buf.grh = &recv->grh; in ib_mad_recv_done() 2255 wc, &recv->grh, in ib_mad_recv_done() [all …]
|
H A D | ib_multicast.c | 753 ah_attr->grh.dgid = rec->mgid; in ib_init_ah_from_mcmember() 755 ah_attr->grh.sgid_index = (u8) gid_index; in ib_init_ah_from_mcmember() 756 ah_attr->grh.flow_label = be32_to_cpu(rec->flow_label); in ib_init_ah_from_mcmember() 757 ah_attr->grh.hop_limit = rec->hop_limit; in ib_init_ah_from_mcmember() 758 ah_attr->grh.traffic_class = rec->traffic_class; in ib_init_ah_from_mcmember()
|
H A D | ib_sa_query.c | 532 ah_attr.grh.dgid.global.subnet_prefix = cpu_to_be64(port_attr.subnet_prefix); in update_sm_ah() 533 ah_attr.grh.dgid.global.interface_id = cpu_to_be64(IB_SA_WELL_KNOWN_GUID); in update_sm_ah() 716 ah_attr->grh.dgid = rec->dgid; in ib_init_ah_from_path() 727 ah_attr->grh.sgid_index = gid_index; in ib_init_ah_from_path() 728 ah_attr->grh.flow_label = be32_to_cpu(rec->flow_label); in ib_init_ah_from_path() 729 ah_attr->grh.hop_limit = rec->hop_limit; in ib_init_ah_from_path() 730 ah_attr->grh.traffic_class = rec->traffic_class; in ib_init_ah_from_path()
|
/freebsd/contrib/ofed/libibverbs/ |
H A D | marshall.c | 42 memcpy(dst->grh.dgid.raw, src->grh.dgid, sizeof dst->grh.dgid); in ibv_copy_ah_attr_from_kern() 43 dst->grh.flow_label = src->grh.flow_label; in ibv_copy_ah_attr_from_kern() 44 dst->grh.sgid_index = src->grh.sgid_index; in ibv_copy_ah_attr_from_kern() 45 dst->grh.hop_limit = src->grh.hop_limit; in ibv_copy_ah_attr_from_kern() 46 dst->grh.traffic_class = src->grh.traffic_class; in ibv_copy_ah_attr_from_kern()
|
H A D | verbs.c | 767 static inline int get_grh_header_version(struct ibv_grh *grh) in get_grh_header_version() argument 769 int ip6h_version = (be32toh(grh->version_tclass_flow) >> 28) & 0xf; in get_grh_header_version() 770 struct ip *ip4h = (struct ip *)((void *)grh + 20); in get_grh_header_version() 801 struct ibv_grh *grh, in set_ah_attr_generic_fields() argument 806 flow_class = be32toh(grh->version_tclass_flow); in set_ah_attr_generic_fields() 807 ah_attr->grh.flow_label = flow_class & 0xFFFFF; in set_ah_attr_generic_fields() 834 (struct in6_addr *)&ah_attr->grh.dgid); in set_ah_attr_by_ipv4() 835 ah_attr->grh.sgid_index = (uint8_t) ret; in set_ah_attr_by_ipv4() 836 ah_attr->grh.hop_limit = ip4h->ip_ttl; in set_ah_attr_by_ipv4() 837 ah_attr->grh.traffic_class = ip4h->ip_tos; in set_ah_attr_by_ipv4() [all …]
|
H A D | cmd.c | 1274 memcpy(attr->ah_attr.grh.dgid.raw, resp.dest.dgid, 16); in ibv_cmd_query_qp() 1275 attr->ah_attr.grh.flow_label = resp.dest.flow_label; in ibv_cmd_query_qp() 1277 attr->ah_attr.grh.sgid_index = resp.dest.sgid_index; in ibv_cmd_query_qp() 1278 attr->ah_attr.grh.hop_limit = resp.dest.hop_limit; in ibv_cmd_query_qp() 1279 attr->ah_attr.grh.traffic_class = resp.dest.traffic_class; in ibv_cmd_query_qp() 1286 memcpy(attr->alt_ah_attr.grh.dgid.raw, resp.alt_dest.dgid, 16); in ibv_cmd_query_qp() 1287 attr->alt_ah_attr.grh.flow_label = resp.alt_dest.flow_label; in ibv_cmd_query_qp() 1289 attr->alt_ah_attr.grh.sgid_index = resp.alt_dest.sgid_index; in ibv_cmd_query_qp() 1290 attr->alt_ah_attr.grh.hop_limit = resp.alt_dest.hop_limit; in ibv_cmd_query_qp() 1291 attr->alt_ah_attr.grh.traffic_class = resp.alt_dest.traffic_class; in ibv_cmd_query_qp() [all …]
|
/freebsd/sys/dev/mthca/ |
H A D | mthca_av.c | 210 ah_attr->grh.sgid_index; in mthca_create_ah() 211 av->hop_limit = ah_attr->grh.hop_limit; in mthca_create_ah() 213 cpu_to_be32((ah_attr->grh.traffic_class << 20) | in mthca_create_ah() 214 ah_attr->grh.flow_label); in mthca_create_ah() 215 memcpy(av->dgid, ah_attr->grh.dgid.raw, 16); in mthca_create_ah() 276 header->grh.traffic_class = in mthca_read_ah() 278 header->grh.flow_label = in mthca_read_ah() 280 header->grh.hop_limit = ah->av->hop_limit; in mthca_read_ah() 284 &header->grh.source_gid, NULL); in mthca_read_ah() 285 memcpy(header->grh.destination_gid.raw, in mthca_read_ah() [all …]
|
H A D | mthca_qp.c | 414 ib_ah_attr->grh.sgid_index = path->mgid_index & (dev->limits.gid_table_len - 1); in to_ib_ah_attr() 415 ib_ah_attr->grh.hop_limit = path->hop_limit; in to_ib_ah_attr() 416 ib_ah_attr->grh.traffic_class = in to_ib_ah_attr() 418 ib_ah_attr->grh.flow_label = in to_ib_ah_attr() 420 memcpy(ib_ah_attr->grh.dgid.raw, in to_ib_ah_attr() 421 path->rgid, sizeof ib_ah_attr->grh.dgid.raw); in to_ib_ah_attr() 524 if (ah->grh.sgid_index >= dev->limits.gid_table_len) { in mthca_path_set() 526 ah->grh.sgid_index, dev->limits.gid_table_len-1); in mthca_path_set() 531 path->mgid_index = ah->grh.sgid_index; in mthca_path_set() 532 path->hop_limit = ah->grh.hop_limit; in mthca_path_set() [all …]
|
/freebsd/sys/dev/qlnx/qlnxr/ |
H A D | qlnxr_cm.c | 466 union ib_gid *dgid = &ah_attr->grh.dgid; in qlnxr_get_vlan_id_gsi() 489 struct ib_global_route *grh = &ah_attr->grh; in qlnxr_gsi_build_header() local 508 if (grh->sgid_index < QLNXR_MAX_SGID) in qlnxr_gsi_build_header() 509 sgid = dev->sgid_tbl[grh->sgid_index]; in qlnxr_gsi_build_header() 544 qp, swr->opcode, swr->wr_id, *roce_mode, grh->hop_limit, in qlnxr_gsi_build_header() 549 udh->grh.traffic_class = grh->traffic_class; in qlnxr_gsi_build_header() 550 udh->grh.flow_label = grh->flow_label; in qlnxr_gsi_build_header() 551 udh->grh.hop_limit = grh->hop_limit; in qlnxr_gsi_build_header() 552 udh->grh.destination_gid = grh->dgid; in qlnxr_gsi_build_header() 553 memcpy(&udh->grh.source_gid.raw, &sgid.raw, in qlnxr_gsi_build_header() [all …]
|
H A D | qlnxr_def.h | 835 u8 *guid = &ah_attr->grh.dgid.raw[8]; /* GID's 64 MSBs are the GUID */ in qlnxr_get_dmac() 840 if (!memcmp(&ah_attr->grh.dgid, &zero_sgid, sizeof(union ib_gid))) { in qlnxr_get_dmac() 845 memcpy(&in6, ah_attr->grh.dgid.raw, sizeof(in6)); in qlnxr_get_dmac()
|
/freebsd/contrib/ofed/libmlx4/ |
H A D | verbs.c | 1170 if (link_local_gid(&attr->grh.dgid)) { in mlx4_resolve_grh_to_l2() 1171 memcpy(ah->mac, &attr->grh.dgid.raw[8], 3); in mlx4_resolve_grh_to_l2() 1172 memcpy(ah->mac + 3, &attr->grh.dgid.raw[13], 3); in mlx4_resolve_grh_to_l2() 1175 vid = get_vlan_id(&attr->grh.dgid); in mlx4_resolve_grh_to_l2() 1176 } else if (is_multicast_gid(&attr->grh.dgid)) { in mlx4_resolve_grh_to_l2() 1180 ah->mac[i] = attr->grh.dgid.raw[i + 10]; in mlx4_resolve_grh_to_l2() 1183 attr->grh.sgid_index, &sgid); in mlx4_resolve_grh_to_l2() 1231 ah->av.gid_index = attr->grh.sgid_index; in mlx4_create_ah() 1232 ah->av.hop_limit = attr->grh.hop_limit; in mlx4_create_ah() 1234 htobe32((attr->grh.traffic_class << 20) | in mlx4_create_ah() [all …]
|
/freebsd/contrib/ofed/opensm/libvendor/ |
H A D | osm_vendor_mlx_ibmgt.c | 730 ib_grh_set_ver_class_flow(p_rcv_desc->grh. in __osmv_IBMGT_rcv_desc_to_osm_addr() 732 p_rcv_desc->grh. in __osmv_IBMGT_rcv_desc_to_osm_addr() 734 p_rcv_desc->grh. in __osmv_IBMGT_rcv_desc_to_osm_addr() 737 p_rcv_desc->grh.hop_limit; in __osmv_IBMGT_rcv_desc_to_osm_addr() 739 &p_rcv_desc->grh.sgid, sizeof(ib_net64_t)); in __osmv_IBMGT_rcv_desc_to_osm_addr() 741 p_rcv_desc->grh.dgid, sizeof(ib_net64_t)); in __osmv_IBMGT_rcv_desc_to_osm_addr()
|
H A D | osm_vendor_mtl.c | 121 ib_grh_set_ver_class_flow(p_rcv_desc->grh. in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr() 123 p_rcv_desc->grh. in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr() 125 p_rcv_desc->grh. in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr() 128 p_rcv_desc->grh.hop_limit; in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr() 130 &p_rcv_desc->grh.sgid, sizeof(ib_net64_t)); in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr() 132 p_rcv_desc->grh.dgid, sizeof(ib_net64_t)); in __osm_mtl_conv_ibmgt_rcv_desc_to_osm_addr()
|
/freebsd/sys/dev/bnxt/bnxt_re/ |
H A D | ib_verbs.c | 891 struct ib_global_route *grh, struct ib_ah *ah) in bnxt_re_get_cached_gid() argument 919 rc = bnxt_re_get_cached_gid(&rdev->ibdev, 1, ah_attr->grh.sgid_index, in bnxt_re_get_ah_info() 920 gid, &gattr, &ah_attr->grh, NULL); in bnxt_re_get_ah_info() 954 ah_attr->grh.dgid.raw) && in bnxt_re_init_dmac() 955 !rdma_link_local_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) { in bnxt_re_init_dmac() 1016 memcpy(ah->qplib_ah.dgid.data, ah_attr->grh.dgid.raw, in bnxt_re_create_ah() 1018 ah->qplib_ah.sgid_index = _get_sgid_index(rdev, ah_attr->grh.sgid_index); in bnxt_re_create_ah() 1024 ah->qplib_ah.host_sgid_index = ah_attr->grh.sgid_index; in bnxt_re_create_ah() 1025 ah->qplib_ah.traffic_class = ah_attr->grh.traffic_class; in bnxt_re_create_ah() 1026 ah->qplib_ah.flow_label = ah_attr->grh.flow_label; in bnxt_re_create_ah() [all …]
|