Home
last modified time | relevance | path

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

123

/linux/drivers/infiniband/hw/mlx5/
H A 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/drivers/infiniband/hw/mlx4/
H A 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 …]
H A 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/drivers/infiniband/hw/hns/
H A Dhns_roce_ah.c40 static inline u16 get_ah_udp_sport(const struct rdma_ah_attr *ah_attr) in get_ah_udp_sport() argument
42 u32 fl = ah_attr->grh.flow_label; in get_ah_udp_sport()
57 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in hns_roce_create_ah() local
58 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in hns_roce_create_ah()
72 ah->av.port = rdma_ah_get_port_num(ah_attr); in hns_roce_create_ah()
75 if (rdma_ah_get_static_rate(ah_attr)) in hns_roce_create_ah()
80 ah->av.udp_sport = get_ah_udp_sport(ah_attr); in hns_roce_create_ah()
94 ah->av.sl = rdma_ah_get_sl(ah_attr); in hns_roce_create_ah()
102 memcpy(ah->av.mac, ah_attr->roce.dmac, ETH_ALEN); in hns_roce_create_ah()
106 ret = rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr, in hns_roce_create_ah()
[all …]
/linux/drivers/infiniband/core/
H A 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 …]
H A Dverbs.c59 struct rdma_ah_attr *ah_attr);
415 struct rdma_ah_attr *ah_attr) in rdma_check_ah_attr() argument
417 if (!rdma_is_port_valid(device, ah_attr->port_num)) in rdma_check_ah_attr()
420 if ((rdma_is_grh_required(device, ah_attr->port_num) || in rdma_check_ah_attr()
421 ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) && in rdma_check_ah_attr()
422 !(ah_attr->ah_flags & IB_AH_GRH)) in rdma_check_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()
431 ah_attr->grh.sgid_attr->port_num != ah_attr->port_num) in rdma_check_ah_attr()
442 struct rdma_ah_attr *ah_attr, in rdma_fill_sgid_attr() argument
[all …]
H A 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()
H A Dsa_query.c1194 struct rdma_ah_attr *ah_attr, in init_ah_attr_grh_fields() argument
1207 rdma_move_grh_sgid_attr(ah_attr, &rec->dgid, in init_ah_attr_grh_fields()
1232 struct rdma_ah_attr *ah_attr, in ib_init_ah_attr_from_path() argument
1237 memset(ah_attr, 0, sizeof(*ah_attr)); in ib_init_ah_attr_from_path()
1238 ah_attr->type = rdma_ah_find_type(device, port_num); in ib_init_ah_attr_from_path()
1239 rdma_ah_set_sl(ah_attr, rec->sl); in ib_init_ah_attr_from_path()
1240 rdma_ah_set_port_num(ah_attr, port_num); in ib_init_ah_attr_from_path()
1241 rdma_ah_set_static_rate(ah_attr, rec->rate); in ib_init_ah_attr_from_path()
1248 memcpy(ah_attr->roce.dmac, sa_path_get_dmac(rec), ETH_ALEN); in ib_init_ah_attr_from_path()
1250 rdma_ah_set_dlid(ah_attr, be32_to_cpu(sa_path_get_dlid(rec))); in ib_init_ah_attr_from_path()
[all …]
H A Duser_mad.c274 struct rdma_ah_attr ah_attr; in recv_handler() local
281 &ah_attr); in recv_handler()
285 grh = rdma_ah_read_grh(&ah_attr); in recv_handler()
291 rdma_destroy_ah_attr(&ah_attr); in recv_handler()
514 struct rdma_ah_attr ah_attr; in ib_umad_write() local
555 memset(&ah_attr, 0, sizeof ah_attr); in ib_umad_write()
556 ah_attr.type = rdma_ah_find_type(agent->device, in ib_umad_write()
558 rdma_ah_set_dlid(&ah_attr, be16_to_cpu(packet->mad.hdr.lid)); in ib_umad_write()
559 rdma_ah_set_sl(&ah_attr, packet->mad.hdr.sl); in ib_umad_write()
560 rdma_ah_set_path_bits(&ah_attr, packet->mad.hdr.path_bits); in ib_umad_write()
[all …]
H A 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()
/linux/drivers/infiniband/sw/rdmavt/
H A 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 …]
H A 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/drivers/infiniband/hw/qib/
H A 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/drivers/infiniband/hw/hfi1/
H A 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 …]
H A Dipoib_tx.c27 struct rdma_ah_attr *ah_attr; member
263 struct rdma_ah_attr *ah_attr = txp->ah_attr; in hfi1_ipoib_build_ib_tx_headers() local
285 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in hfi1_ipoib_build_ib_tx_headers()
290 rdma_ah_read_grh(ah_attr), in hfi1_ipoib_build_ib_tx_headers()
300 lrh0 |= (rdma_ah_get_sl(ah_attr) & 0xf) << 4; in hfi1_ipoib_build_ib_tx_headers()
303 dlid = opa_get_lid(rdma_ah_get_dlid(ah_attr), 9B); in hfi1_ipoib_build_ib_tx_headers()
310 lid |= rdma_ah_get_path_bits(ah_attr) & in hfi1_ipoib_build_ib_tx_headers()
591 txp.ah_attr = &ibah_to_rvtah(address)->attr; in hfi1_ipoib_send()
595 txp.flow.sc5 = txp.ibp->sl_to_sc[rdma_ah_get_sl(txp.ah_attr)]; in hfi1_ipoib_send()
/linux/drivers/infiniband/hw/mthca/
H A 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()
H A 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()
H A 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/drivers/infiniband/hw/mana/
H A Dqp.c548 copy_in_reverse(req.ah_attr.src_mac, mpc->mac_addr, ETH_ALEN); in mana_ib_gd_modify_qp()
549 copy_in_reverse(req.ah_attr.dest_mac, attr->ah_attr.roce.dmac, ETH_ALEN); in mana_ib_gd_modify_qp()
550 copy_in_reverse(req.ah_attr.src_addr, attr->ah_attr.grh.sgid_attr->gid.raw, in mana_ib_gd_modify_qp()
552 copy_in_reverse(req.ah_attr.dest_addr, attr->ah_attr.grh.dgid.raw, in mana_ib_gd_modify_qp()
554 if (rdma_gid_attr_network_type(attr->ah_attr.grh.sgid_attr) == RDMA_NETWORK_IPV4) { in mana_ib_gd_modify_qp()
555 req.ah_attr.src_addr_type = SGID_TYPE_IPV4; in mana_ib_gd_modify_qp()
556 req.ah_attr.dest_addr_type = SGID_TYPE_IPV4; in mana_ib_gd_modify_qp()
558 req.ah_attr.src_addr_type = SGID_TYPE_IPV6; in mana_ib_gd_modify_qp()
559 req.ah_attr.dest_addr_type = SGID_TYPE_IPV6; in mana_ib_gd_modify_qp()
561 req.ah_attr.dest_port = ROCE_V2_UDP_DPORT; in mana_ib_gd_modify_qp()
[all …]
/linux/drivers/infiniband/ulp/opa_vnic/
H A 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/drivers/infiniband/hw/vmw_pvrdma/
H A 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/include/rdma/
H A Dlag.h20 struct rdma_ah_attr *ah_attr,
/linux/drivers/infiniband/hw/ocrdma/
H A Docrdma_ah.h57 int ocrdma_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
H A 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/drivers/infiniband/hw/irdma/
H A Dverbs.c1253 attr->ah_attr.grh.sgid_attr; in irdma_modify_qp_roce()
1258 if (attr->ah_attr.ah_flags & IB_AH_GRH) { in irdma_modify_qp_roce()
1259 udp_info->ttl = attr->ah_attr.grh.hop_limit; in irdma_modify_qp_roce()
1260 udp_info->flow_label = attr->ah_attr.grh.flow_label; in irdma_modify_qp_roce()
1261 udp_info->tos = attr->ah_attr.grh.traffic_class; in irdma_modify_qp_roce()
1295 av->attrs = attr->ah_attr; in irdma_modify_qp_roce()
1297 rdma_gid2ip((struct sockaddr *)&av->dgid_addr, &attr->ah_attr.grh.dgid); in irdma_modify_qp_roce()
1330 attr->ah_attr.roce.dmac); in irdma_modify_qp_roce()
4436 struct rdma_ah_attr *ah_attr = attr->ah_attr; in irdma_setup_ah() local
4450 ah->sgid_index = ah_attr->grh.sgid_index; in irdma_setup_ah()
[all …]

123