Home
last modified time | relevance | path

Searched refs:ah_attr (Results 1 – 25 of 64) sorted by relevance

123

/linux-6.1.9/drivers/infiniband/hw/mlx5/
Dah.c36 const struct rdma_ah_attr *ah_attr) in mlx5_ah_get_udp_sport() argument
38 enum ib_gid_type gid_type = ah_attr->grh.sgid_attr->gid_type; in mlx5_ah_get_udp_sport()
42 (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) && 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()
56 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in create_ib_ah() local
59 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in create_ib_ah()
60 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah()
70 ah->av.stat_rate_sl = (rdma_ah_get_static_rate(ah_attr) << 4); in create_ib_ah()
[all …]
/linux-6.1.9/drivers/infiniband/hw/mlx4/
Dah.c43 static void create_ib_ah(struct ib_ah *ib_ah, struct rdma_ah_attr *ah_attr) in create_ib_ah() argument
49 (rdma_ah_get_port_num(ah_attr) << 24)); in create_ib_ah()
50 ah->av.ib.g_slid = rdma_ah_get_path_bits(ah_attr); in create_ib_ah()
52 cpu_to_be32(rdma_ah_get_sl(ah_attr) << 28); in create_ib_ah()
53 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in create_ib_ah()
54 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah()
65 ah->av.ib.dlid = cpu_to_be16(rdma_ah_get_dlid(ah_attr)); in create_ib_ah()
66 if (rdma_ah_get_static_rate(ah_attr)) { in create_ib_ah()
67 u8 static_rate = rdma_ah_get_static_rate(ah_attr) + in create_ib_ah()
77 static int create_iboe_ah(struct ib_ah *ib_ah, struct rdma_ah_attr *ah_attr) in create_iboe_ah() argument
[all …]
Dmad.c192 struct rdma_ah_attr ah_attr; in update_sm_ah() local
198 memset(&ah_attr, 0, sizeof ah_attr); in update_sm_ah()
199 ah_attr.type = rdma_ah_find_type(&dev->ib_dev, port_num); in update_sm_ah()
200 rdma_ah_set_dlid(&ah_attr, lid); in update_sm_ah()
201 rdma_ah_set_sl(&ah_attr, sl); in update_sm_ah()
202 rdma_ah_set_port_num(&ah_attr, port_num); in update_sm_ah()
205 &ah_attr, 0); in update_sm_ah()
1468 struct rdma_ah_attr *ah_attr) in fill_in_real_sgid_index() argument
1470 struct ib_global_route *grh = rdma_ah_retrieve_grh(ah_attr); in fill_in_real_sgid_index()
1484 struct rdma_ah_attr ah_attr; in mlx4_ib_multiplex_mad() local
[all …]
/linux-6.1.9/drivers/infiniband/hw/hns/
Dhns_roce_ah.c38 static inline u16 get_ah_udp_sport(const struct rdma_ah_attr *ah_attr) in get_ah_udp_sport() argument
40 u32 fl = ah_attr->grh.flow_label; in get_ah_udp_sport()
56 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in hns_roce_create_ah() local
57 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in hns_roce_create_ah()
65 ah->av.port = rdma_ah_get_port_num(ah_attr); in hns_roce_create_ah()
68 if (rdma_ah_get_static_rate(ah_attr)) in hns_roce_create_ah()
73 ah->av.udp_sport = get_ah_udp_sport(ah_attr); in hns_roce_create_ah()
74 ah->av.sl = rdma_ah_get_sl(ah_attr); in hns_roce_create_ah()
78 memcpy(ah->av.mac, ah_attr->roce.dmac, ETH_ALEN); in hns_roce_create_ah()
82 ret = rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr, in hns_roce_create_ah()
[all …]
/linux-6.1.9/drivers/infiniband/sw/rdmavt/
Dah.c21 struct rdma_ah_attr *ah_attr) in rvt_check_ah() argument
24 int port_num = rdma_ah_get_port_num(ah_attr); in rvt_check_ah()
27 u8 ah_flags = rdma_ah_get_ah_flags(ah_attr); in rvt_check_ah()
28 u8 static_rate = rdma_ah_get_static_rate(ah_attr); in rvt_check_ah()
40 rdma_ah_read_grh(ah_attr)->sgid_index >= port_attr.gid_tbl_len) in rvt_check_ah()
43 return rdi->driver_f.check_ah(ibdev, ah_attr); in rvt_check_ah()
65 if (rvt_check_ah(ibah->device, init_attr->ah_attr)) in rvt_create_ah()
77 rdma_copy_ah_attr(&ah->attr, init_attr->ah_attr); in rvt_create_ah()
81 init_attr->ah_attr, ah); in rvt_create_ah()
113 int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr) in rvt_modify_ah() argument
[all …]
Dah.h14 int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
15 int rvt_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
/linux-6.1.9/drivers/infiniband/core/
Dlag.c11 struct rdma_ah_attr *ah_attr, in rdma_build_skb() argument
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()
75 memcpy(eth->h_dest, ah_attr->roce.dmac, ETH_ALEN); in rdma_build_skb()
[all …]
Dverbs.c59 struct rdma_ah_attr *ah_attr);
412 struct rdma_ah_attr *ah_attr) in rdma_check_ah_attr() argument
414 if (!rdma_is_port_valid(device, ah_attr->port_num)) in rdma_check_ah_attr()
417 if ((rdma_is_grh_required(device, ah_attr->port_num) || in rdma_check_ah_attr()
418 ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) && in rdma_check_ah_attr()
419 !(ah_attr->ah_flags & IB_AH_GRH)) in rdma_check_ah_attr()
422 if (ah_attr->grh.sgid_attr) { in rdma_check_ah_attr()
427 if (ah_attr->grh.sgid_attr->index != ah_attr->grh.sgid_index || in rdma_check_ah_attr()
428 ah_attr->grh.sgid_attr->port_num != ah_attr->port_num) in rdma_check_ah_attr()
439 struct rdma_ah_attr *ah_attr, in rdma_fill_sgid_attr() argument
[all …]
Duverbs_marshall.c64 struct rdma_ah_attr *ah_attr) in ib_copy_ah_attr_to_user() argument
66 struct rdma_ah_attr *src = ah_attr; in ib_copy_ah_attr_to_user()
71 if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && in ib_copy_ah_attr_to_user()
72 (rdma_ah_get_dlid(ah_attr) > be16_to_cpu(IB_LID_PERMISSIVE)) && in ib_copy_ah_attr_to_user()
73 (!rdma_ah_conv_opa_to_ib(device, &conv_ah, ah_attr))) in ib_copy_ah_attr_to_user()
116 ib_copy_ah_attr_to_user(device, &dst->ah_attr, &src->ah_attr); in ib_copy_qp_attr_to_user()
Dsa_query.c1202 struct rdma_ah_attr *ah_attr, in init_ah_attr_grh_fields() argument
1215 rdma_move_grh_sgid_attr(ah_attr, &rec->dgid, in init_ah_attr_grh_fields()
1240 struct rdma_ah_attr *ah_attr, in ib_init_ah_attr_from_path() argument
1245 memset(ah_attr, 0, sizeof(*ah_attr)); in ib_init_ah_attr_from_path()
1246 ah_attr->type = rdma_ah_find_type(device, port_num); in ib_init_ah_attr_from_path()
1247 rdma_ah_set_sl(ah_attr, rec->sl); in ib_init_ah_attr_from_path()
1248 rdma_ah_set_port_num(ah_attr, port_num); in ib_init_ah_attr_from_path()
1249 rdma_ah_set_static_rate(ah_attr, rec->rate); in ib_init_ah_attr_from_path()
1256 memcpy(ah_attr->roce.dmac, sa_path_get_dmac(rec), ETH_ALEN); in ib_init_ah_attr_from_path()
1258 rdma_ah_set_dlid(ah_attr, be32_to_cpu(sa_path_get_dlid(rec))); in ib_init_ah_attr_from_path()
[all …]
Duser_mad.c262 struct rdma_ah_attr ah_attr; in recv_handler() local
269 &ah_attr); in recv_handler()
273 grh = rdma_ah_read_grh(&ah_attr); in recv_handler()
279 rdma_destroy_ah_attr(&ah_attr); in recv_handler()
499 struct rdma_ah_attr ah_attr; in ib_umad_write() local
541 memset(&ah_attr, 0, sizeof ah_attr); in ib_umad_write()
542 ah_attr.type = rdma_ah_find_type(agent->device, in ib_umad_write()
544 rdma_ah_set_dlid(&ah_attr, be16_to_cpu(packet->mad.hdr.lid)); in ib_umad_write()
545 rdma_ah_set_sl(&ah_attr, packet->mad.hdr.sl); in ib_umad_write()
546 rdma_ah_set_path_bits(&ah_attr, packet->mad.hdr.path_bits); in ib_umad_write()
[all …]
Dmulticast.c739 struct rdma_ah_attr *ah_attr) in ib_init_ah_from_mcmember() argument
756 memset(ah_attr, 0, sizeof(*ah_attr)); in ib_init_ah_from_mcmember()
757 ah_attr->type = rdma_ah_find_type(device, port_num); in ib_init_ah_from_mcmember()
759 rdma_ah_set_dlid(ah_attr, be16_to_cpu(rec->mlid)); in ib_init_ah_from_mcmember()
760 rdma_ah_set_sl(ah_attr, rec->sl); in ib_init_ah_from_mcmember()
761 rdma_ah_set_port_num(ah_attr, port_num); in ib_init_ah_from_mcmember()
762 rdma_ah_set_static_rate(ah_attr, rec->rate); in ib_init_ah_from_mcmember()
763 rdma_move_grh_sgid_attr(ah_attr, &rec->mgid, in ib_init_ah_from_mcmember()
Dcm.c177 struct rdma_ah_attr ah_attr; member
293 ah = rdma_create_ah(mad_agent->qp->pd, &cm_id_priv->av.ah_attr, 0); in cm_alloc_msg()
451 struct rdma_ah_attr *ah_attr, struct cm_av *av) in cm_init_av_for_lap() argument
455 rdma_move_ah_attr(&av->ah_attr, ah_attr); in cm_init_av_for_lap()
465 grh, &av->ah_attr); in cm_init_av_for_response()
545 rdma_move_ah_attr(&av->ah_attr, &new_ah_attr); in cm_init_av_by_path()
555 rdma_move_ah_attr(&dest->ah_attr, &src->ah_attr); in cm_move_av_from_path()
561 rdma_destroy_ah_attr(&av->ah_attr); in cm_destroy_av()
1818 param->ppath_sgid_attr = cm_id_priv->av.ah_attr.grh.sgid_attr; in cm_format_req_event()
2128 grh = rdma_ah_read_grh(&cm_id_priv->av.ah_attr); in cm_req_handler()
[all …]
/linux-6.1.9/drivers/infiniband/hw/qib/
Dqib_ud.c58 struct rdma_ah_attr *ah_attr; in qib_ud_loopback() local
84 ah_attr = rvt_get_swqe_ah_attr(swqe); in qib_ud_loopback()
95 lid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in qib_ud_loopback()
98 rdma_ah_get_sl(ah_attr), in qib_ud_loopback()
101 cpu_to_be16(rdma_ah_get_dlid(ah_attr))); in qib_ud_loopback()
161 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in qib_ud_loopback()
163 const struct ib_global_route *grd = rdma_ah_read_grh(ah_attr); in qib_ud_loopback()
208 wc.slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in qib_ud_loopback()
210 wc.sl = rdma_ah_get_sl(ah_attr); in qib_ud_loopback()
211 wc.dlid_path_bits = rdma_ah_get_dlid(ah_attr) & ((1 << ppd->lmc) - 1); in qib_ud_loopback()
[all …]
/linux-6.1.9/drivers/infiniband/hw/hfi1/
Dud.c37 struct rdma_ah_attr *ah_attr; in ud_loopback() local
66 ah_attr = rvt_get_swqe_ah_attr(swqe); in ud_loopback()
72 u8 sc5 = ibp->sl_to_sc[rdma_ah_get_sl(ah_attr)]; in ud_loopback()
75 slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in ud_loopback()
81 rdma_ah_get_sl(ah_attr), in ud_loopback()
83 slid, rdma_ah_get_dlid(ah_attr)); in ud_loopback()
143 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in ud_loopback()
145 struct ib_global_route grd = *(rdma_ah_read_grh(ah_attr)); in ud_loopback()
207 wc.slid = (ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in ud_loopback()
212 wc.sl = rdma_ah_get_sl(ah_attr); in ud_loopback()
[all …]
Dipoib_tx.c27 struct rdma_ah_attr *ah_attr; member
262 struct rdma_ah_attr *ah_attr = txp->ah_attr; in hfi1_ipoib_build_ib_tx_headers() local
284 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in hfi1_ipoib_build_ib_tx_headers()
289 rdma_ah_read_grh(ah_attr), in hfi1_ipoib_build_ib_tx_headers()
299 lrh0 |= (rdma_ah_get_sl(ah_attr) & 0xf) << 4; in hfi1_ipoib_build_ib_tx_headers()
302 dlid = opa_get_lid(rdma_ah_get_dlid(ah_attr), 9B); in hfi1_ipoib_build_ib_tx_headers()
309 lid |= rdma_ah_get_path_bits(ah_attr) & in hfi1_ipoib_build_ib_tx_headers()
590 txp.ah_attr = &ibah_to_rvtah(address)->attr; in hfi1_ipoib_send()
594 txp.flow.sc5 = txp.ibp->sl_to_sc[rdma_ah_get_sl(txp.ah_attr)]; in hfi1_ipoib_send()
/linux-6.1.9/drivers/infiniband/hw/mthca/
Dmthca_av.c155 struct rdma_ah_attr *ah_attr, in mthca_create_ah() argument
200 (rdma_ah_get_port_num(ah_attr) << 24)); in mthca_create_ah()
201 av->g_slid = rdma_ah_get_path_bits(ah_attr); in mthca_create_ah()
202 av->dlid = cpu_to_be16(rdma_ah_get_dlid(ah_attr)); in mthca_create_ah()
204 mthca_get_rate(dev, rdma_ah_get_static_rate(ah_attr), in mthca_create_ah()
205 rdma_ah_get_port_num(ah_attr)); in mthca_create_ah()
206 av->sl_tclass_flowlabel = cpu_to_be32(rdma_ah_get_sl(ah_attr) << 28); in mthca_create_ah()
207 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in mthca_create_ah()
208 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in mthca_create_ah()
211 av->gid_index = (rdma_ah_get_port_num(ah_attr) - 1) * in mthca_create_ah()
Dmthca_mad.c79 struct rdma_ah_attr ah_attr; in update_sm_ah() local
85 memset(&ah_attr, 0, sizeof ah_attr); in update_sm_ah()
86 ah_attr.type = rdma_ah_find_type(&dev->ib_dev, port_num); in update_sm_ah()
87 rdma_ah_set_dlid(&ah_attr, lid); in update_sm_ah()
88 rdma_ah_set_sl(&ah_attr, sl); in update_sm_ah()
89 rdma_ah_set_port_num(&ah_attr, port_num); in update_sm_ah()
92 &ah_attr, 0); in update_sm_ah()
Dmthca_qp.c398 struct rdma_ah_attr *ah_attr, in to_rdma_ah_attr() argument
403 memset(ah_attr, 0, sizeof(*ah_attr)); in to_rdma_ah_attr()
407 ah_attr->type = rdma_ah_find_type(&dev->ib_dev, port_num); in to_rdma_ah_attr()
408 rdma_ah_set_port_num(ah_attr, port_num); in to_rdma_ah_attr()
410 rdma_ah_set_dlid(ah_attr, be16_to_cpu(path->rlid)); in to_rdma_ah_attr()
411 rdma_ah_set_sl(ah_attr, be32_to_cpu(path->sl_tclass_flowlabel) >> 28); in to_rdma_ah_attr()
412 rdma_ah_set_path_bits(ah_attr, path->g_mylmc & 0x7f); in to_rdma_ah_attr()
413 rdma_ah_set_static_rate(ah_attr, in to_rdma_ah_attr()
420 rdma_ah_set_grh(ah_attr, NULL, in to_rdma_ah_attr()
426 rdma_ah_set_dgid_raw(ah_attr, path->rgid); in to_rdma_ah_attr()
[all …]
/linux-6.1.9/drivers/infiniband/ulp/opa_vnic/
Dopa_vnic_vema.c734 struct rdma_ah_attr ah_attr; in opa_vnic_vema_send_trap() local
760 memset(&ah_attr, 0, sizeof(ah_attr)); in opa_vnic_vema_send_trap()
761 ah_attr.type = rdma_ah_find_type(ibp, port->port_num); in opa_vnic_vema_send_trap()
762 rdma_ah_set_sl(&ah_attr, in opa_vnic_vema_send_trap()
764 rdma_ah_set_port_num(&ah_attr, port->port_num); in opa_vnic_vema_send_trap()
777 rdma_ah_set_dlid(&ah_attr, trap_lid); in opa_vnic_vema_send_trap()
778 ah = rdma_create_ah(port->mad_agent->qp->pd, &ah_attr, 0); in opa_vnic_vema_send_trap()
782 rdma_ah_get_dlid(&ah_attr), rdma_ah_get_sl(&ah_attr), in opa_vnic_vema_send_trap()
783 rdma_ah_get_port_num(&ah_attr)); in opa_vnic_vema_send_trap()
/linux-6.1.9/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_verbs.c515 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in pvrdma_create_ah() local
519 u32 port_num = rdma_ah_get_port_num(ah_attr); in pvrdma_create_ah()
521 if (!(rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH)) in pvrdma_create_ah()
524 grh = rdma_ah_read_grh(ah_attr); in pvrdma_create_ah()
525 if ((ah_attr->type != RDMA_AH_ATTR_TYPE_ROCE) || in pvrdma_create_ah()
533 ah->av.src_path_bits = rdma_ah_get_path_bits(ah_attr); in pvrdma_create_ah()
540 memcpy(ah->av.dmac, ah_attr->roce.dmac, ETH_ALEN); in pvrdma_create_ah()
/linux-6.1.9/include/rdma/
Dlag.h20 struct rdma_ah_attr *ah_attr,
/linux-6.1.9/drivers/infiniband/hw/ocrdma/
Docrdma_ah.h57 int ocrdma_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
Docrdma.h528 struct rdma_ah_attr *ah_attr, u8 *mac_addr) in ocrdma_resolve_dmac() argument
532 memcpy(&in6, rdma_ah_read_grh(ah_attr)->dgid.raw, sizeof(in6)); in ocrdma_resolve_dmac()
538 memcpy(mac_addr, ah_attr->roce.dmac, ETH_ALEN); in ocrdma_resolve_dmac()
/linux-6.1.9/drivers/infiniband/hw/irdma/
Dverbs.c1181 if (attr->ah_attr.ah_flags & IB_AH_GRH) { in irdma_modify_qp_roce()
1182 udp_info->ttl = attr->ah_attr.grh.hop_limit; in irdma_modify_qp_roce()
1183 udp_info->flow_label = attr->ah_attr.grh.flow_label; in irdma_modify_qp_roce()
1184 udp_info->tos = attr->ah_attr.grh.traffic_class; in irdma_modify_qp_roce()
1197 sgid_attr = attr->ah_attr.grh.sgid_attr; in irdma_modify_qp_roce()
1213 av->attrs = attr->ah_attr; in irdma_modify_qp_roce()
1215 rdma_gid2ip((struct sockaddr *)&av->dgid_addr, &attr->ah_attr.grh.dgid); in irdma_modify_qp_roce()
1252 attr->ah_attr.roce.dmac); in irdma_modify_qp_roce()
4122 struct rdma_ah_attr *ah_attr = attr->ah_attr; in irdma_setup_ah() local
4136 ah->sgid_index = ah_attr->grh.sgid_index; in irdma_setup_ah()
[all …]

123