Home
last modified time | relevance | path

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

123

/Linux-v5.10/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-v5.10/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()
1466 struct rdma_ah_attr *ah_attr) in fill_in_real_sgid_index() argument
1468 struct ib_global_route *grh = rdma_ah_retrieve_grh(ah_attr); in fill_in_real_sgid_index()
1482 struct rdma_ah_attr ah_attr; in mlx4_ib_multiplex_mad() local
[all …]
/Linux-v5.10/drivers/infiniband/hw/hns/
Dhns_roce_ah.c42 static inline u16 get_ah_udp_sport(const struct rdma_ah_attr *ah_attr) in get_ah_udp_sport() argument
44 u32 fl = ah_attr->grh.flow_label; in get_ah_udp_sport()
65 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in hns_roce_create_ah() local
66 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in hns_roce_create_ah()
71 gid_attr = ah_attr->grh.sgid_attr; in hns_roce_create_ah()
77 memcpy(ah->av.mac, ah_attr->roce.dmac, ETH_ALEN); in hns_roce_create_ah()
81 vlan_id |= (rdma_ah_get_sl(ah_attr) & in hns_roce_create_ah()
86 ah->av.port = rdma_ah_get_port_num(ah_attr); in hns_roce_create_ah()
93 if (rdma_ah_get_static_rate(ah_attr)) in hns_roce_create_ah()
97 ah->av.sl = rdma_ah_get_sl(ah_attr); in hns_roce_create_ah()
[all …]
/Linux-v5.10/drivers/infiniband/sw/rdmavt/
Dah.c63 struct rdma_ah_attr *ah_attr) in rvt_check_ah() argument
66 int port_num = rdma_ah_get_port_num(ah_attr); in rvt_check_ah()
69 u8 ah_flags = rdma_ah_get_ah_flags(ah_attr); in rvt_check_ah()
70 u8 static_rate = rdma_ah_get_static_rate(ah_attr); in rvt_check_ah()
82 rdma_ah_read_grh(ah_attr)->sgid_index >= port_attr.gid_tbl_len) in rvt_check_ah()
85 return rdi->driver_f.check_ah(ibdev, ah_attr); in rvt_check_ah()
107 if (rvt_check_ah(ibah->device, init_attr->ah_attr)) in rvt_create_ah()
119 rdma_copy_ah_attr(&ah->attr, init_attr->ah_attr); in rvt_create_ah()
123 init_attr->ah_attr, ah); in rvt_create_ah()
156 int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr) in rvt_modify_ah() argument
[all …]
Dah.h56 int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
57 int rvt_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);
/Linux-v5.10/drivers/infiniband/core/
Dlag.c12 struct rdma_ah_attr *ah_attr, in rdma_build_skb() argument
24 is_ipv4 = ipv6_addr_v4mapped((struct in6_addr *)ah_attr->grh.dgid.raw); in rdma_build_skb()
38 htons(rdma_flow_label_to_udp_sport(ah_attr->grh.flow_label)); in rdma_build_skb()
52 memcpy(&iph->saddr, ah_attr->grh.sgid_attr->gid.raw + 12, in rdma_build_skb()
54 memcpy(&iph->daddr, ah_attr->grh.dgid.raw + 12, in rdma_build_skb()
62 memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label, in rdma_build_skb()
64 memcpy(&ip6h->saddr, ah_attr->grh.sgid_attr->gid.raw, in rdma_build_skb()
66 memcpy(&ip6h->daddr, ah_attr->grh.dgid.raw, in rdma_build_skb()
74 rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr, NULL, smac); in rdma_build_skb()
76 memcpy(eth->h_dest, ah_attr->roce.dmac, ETH_ALEN); in rdma_build_skb()
[all …]
Dverbs.c59 struct rdma_ah_attr *ah_attr);
418 struct rdma_ah_attr *ah_attr) in rdma_check_ah_attr() argument
420 if (!rdma_is_port_valid(device, ah_attr->port_num)) in rdma_check_ah_attr()
423 if ((rdma_is_grh_required(device, ah_attr->port_num) || in rdma_check_ah_attr()
424 ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) && in rdma_check_ah_attr()
425 !(ah_attr->ah_flags & IB_AH_GRH)) in rdma_check_ah_attr()
428 if (ah_attr->grh.sgid_attr) { in rdma_check_ah_attr()
433 if (ah_attr->grh.sgid_attr->index != ah_attr->grh.sgid_index || in rdma_check_ah_attr()
434 ah_attr->grh.sgid_attr->port_num != ah_attr->port_num) in rdma_check_ah_attr()
445 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.c1218 struct rdma_ah_attr *ah_attr, in init_ah_attr_grh_fields() argument
1231 rdma_move_grh_sgid_attr(ah_attr, &rec->dgid, in init_ah_attr_grh_fields()
1256 struct rdma_ah_attr *ah_attr, in ib_init_ah_attr_from_path() argument
1261 memset(ah_attr, 0, sizeof(*ah_attr)); in ib_init_ah_attr_from_path()
1262 ah_attr->type = rdma_ah_find_type(device, port_num); in ib_init_ah_attr_from_path()
1263 rdma_ah_set_sl(ah_attr, rec->sl); in ib_init_ah_attr_from_path()
1264 rdma_ah_set_port_num(ah_attr, port_num); in ib_init_ah_attr_from_path()
1265 rdma_ah_set_static_rate(ah_attr, rec->rate); in ib_init_ah_attr_from_path()
1272 memcpy(ah_attr->roce.dmac, sa_path_get_dmac(rec), ETH_ALEN); in ib_init_ah_attr_from_path()
1274 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()
489 struct rdma_ah_attr ah_attr; in ib_umad_write() local
531 memset(&ah_attr, 0, sizeof ah_attr); in ib_umad_write()
532 ah_attr.type = rdma_ah_find_type(agent->device, in ib_umad_write()
534 rdma_ah_set_dlid(&ah_attr, be16_to_cpu(packet->mad.hdr.lid)); in ib_umad_write()
535 rdma_ah_set_sl(&ah_attr, packet->mad.hdr.sl); in ib_umad_write()
536 rdma_ah_set_path_bits(&ah_attr, packet->mad.hdr.path_bits); in ib_umad_write()
[all …]
Dmulticast.c738 struct rdma_ah_attr *ah_attr) in ib_init_ah_from_mcmember() argument
755 memset(ah_attr, 0, sizeof(*ah_attr)); in ib_init_ah_from_mcmember()
756 ah_attr->type = rdma_ah_find_type(device, port_num); in ib_init_ah_from_mcmember()
758 rdma_ah_set_dlid(ah_attr, be16_to_cpu(rec->mlid)); in ib_init_ah_from_mcmember()
759 rdma_ah_set_sl(ah_attr, rec->sl); in ib_init_ah_from_mcmember()
760 rdma_ah_set_port_num(ah_attr, port_num); in ib_init_ah_from_mcmember()
761 rdma_ah_set_static_rate(ah_attr, rec->rate); in ib_init_ah_from_mcmember()
762 rdma_move_grh_sgid_attr(ah_attr, &rec->mgid, in ib_init_ah_from_mcmember()
/Linux-v5.10/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-v5.10/drivers/infiniband/hw/hfi1/
Dud.c79 struct rdma_ah_attr *ah_attr; in ud_loopback() local
108 ah_attr = rvt_get_swqe_ah_attr(swqe); in ud_loopback()
114 u8 sc5 = ibp->sl_to_sc[rdma_ah_get_sl(ah_attr)]; in ud_loopback()
117 slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in ud_loopback()
123 rdma_ah_get_sl(ah_attr), in ud_loopback()
125 slid, rdma_ah_get_dlid(ah_attr)); in ud_loopback()
185 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in ud_loopback()
187 struct ib_global_route grd = *(rdma_ah_read_grh(ah_attr)); in ud_loopback()
249 wc.slid = (ppd->lid | (rdma_ah_get_path_bits(ah_attr) & in ud_loopback()
254 wc.sl = rdma_ah_get_sl(ah_attr); in ud_loopback()
[all …]
Dipoib_tx.c44 struct rdma_ah_attr *ah_attr; member
291 struct rdma_ah_attr *ah_attr = txp->ah_attr; in hfi1_ipoib_build_ib_tx_headers() local
313 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in hfi1_ipoib_build_ib_tx_headers()
318 rdma_ah_read_grh(ah_attr), in hfi1_ipoib_build_ib_tx_headers()
328 lrh0 |= (rdma_ah_get_sl(ah_attr) & 0xf) << 4; in hfi1_ipoib_build_ib_tx_headers()
331 dlid = opa_get_lid(rdma_ah_get_dlid(ah_attr), 9B); in hfi1_ipoib_build_ib_tx_headers()
338 lid |= rdma_ah_get_path_bits(ah_attr) & in hfi1_ipoib_build_ib_tx_headers()
595 txp.ah_attr = &ibah_to_rvtah(address)->attr; in hfi1_ipoib_send_dma()
599 txp.flow.sc5 = txp.ibp->sl_to_sc[rdma_ah_get_sl(txp.ah_attr)]; in hfi1_ipoib_send_dma()
/Linux-v5.10/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-v5.10/drivers/infiniband/ulp/opa_vnic/
Dopa_vnic_vema.c733 struct rdma_ah_attr ah_attr; in opa_vnic_vema_send_trap() local
759 memset(&ah_attr, 0, sizeof(ah_attr)); in opa_vnic_vema_send_trap()
760 ah_attr.type = rdma_ah_find_type(ibp, port->port_num); in opa_vnic_vema_send_trap()
761 rdma_ah_set_sl(&ah_attr, in opa_vnic_vema_send_trap()
763 rdma_ah_set_port_num(&ah_attr, port->port_num); in opa_vnic_vema_send_trap()
776 rdma_ah_set_dlid(&ah_attr, trap_lid); in opa_vnic_vema_send_trap()
777 ah = rdma_create_ah(port->mad_agent->qp->pd, &ah_attr, 0); in opa_vnic_vema_send_trap()
781 rdma_ah_get_dlid(&ah_attr), rdma_ah_get_sl(&ah_attr), in opa_vnic_vema_send_trap()
782 rdma_ah_get_port_num(&ah_attr)); in opa_vnic_vema_send_trap()
/Linux-v5.10/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_verbs.c515 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in pvrdma_create_ah() local
519 u8 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-v5.10/include/rdma/
Dlag.h20 struct rdma_ah_attr *ah_attr,
/Linux-v5.10/net/smc/
Dsmc_ib.c68 qp_attr.ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE; in smc_ib_modify_qp_rtr()
69 rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport); in smc_ib_modify_qp_rtr()
70 rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, lnk->sgid_index, 1, 0); in smc_ib_modify_qp_rtr()
71 rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid); in smc_ib_modify_qp_rtr()
72 memcpy(&qp_attr.ah_attr.roce.dmac, lnk->peer_mac, in smc_ib_modify_qp_rtr()
/Linux-v5.10/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-v5.10/drivers/infiniband/hw/bnxt_re/
Dib_verbs.h169 int bnxt_re_modify_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
170 int bnxt_re_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);

123