Lines Matching refs:attr
200 rdma_gid_attr_network_type(const struct ib_gid_attr *attr) in rdma_gid_attr_network_type() argument
202 if (attr->gid_type == IB_GID_TYPE_IB) in rdma_gid_attr_network_type()
205 if (attr->gid_type == IB_GID_TYPE_ROCE) in rdma_gid_attr_network_type()
208 if (ipv6_addr_v4mapped((struct in6_addr *)&attr->gid)) in rdma_gid_attr_network_type()
1090 struct ib_srq_attr attr; member
2462 int (*add_gid)(const struct ib_gid_attr *attr, void **context);
2471 int (*del_gid)(const struct ib_gid_attr *attr, void **context);
2488 int (*create_ah)(struct ib_ah *ah, struct rdma_ah_init_attr *attr,
2490 int (*create_user_ah)(struct ib_ah *ah, struct rdma_ah_init_attr *attr,
2510 int (*create_cq)(struct ib_cq *cq, const struct ib_cq_init_attr *attr,
2513 const struct ib_cq_init_attr *attr,
2590 int (*modify_wq)(struct ib_wq *wq, struct ib_wq_attr *attr,
2598 struct ib_dm_alloc_attr *attr,
2605 struct ib_dm_mr_attr *attr,
3551 struct ib_port_attr *attr) in rdma_mtu_from_attr() argument
3554 return attr->phys_mtu; in rdma_mtu_from_attr()
3556 return ib_mtu_enum_to_int(attr->max_mtu); in rdma_mtu_from_attr()
3869 struct ib_qp_attr *attr,
4600 static inline u8 *rdma_ah_retrieve_dmac(struct rdma_ah_attr *attr) in rdma_ah_retrieve_dmac() argument
4602 if (attr->type == RDMA_AH_ATTR_TYPE_ROCE) in rdma_ah_retrieve_dmac()
4603 return attr->roce.dmac; in rdma_ah_retrieve_dmac()
4607 static inline void rdma_ah_set_dlid(struct rdma_ah_attr *attr, u32 dlid) in rdma_ah_set_dlid() argument
4609 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_set_dlid()
4610 attr->ib.dlid = (u16)dlid; in rdma_ah_set_dlid()
4611 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_dlid()
4612 attr->opa.dlid = dlid; in rdma_ah_set_dlid()
4615 static inline u32 rdma_ah_get_dlid(const struct rdma_ah_attr *attr) in rdma_ah_get_dlid() argument
4617 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_get_dlid()
4618 return attr->ib.dlid; in rdma_ah_get_dlid()
4619 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_dlid()
4620 return attr->opa.dlid; in rdma_ah_get_dlid()
4624 static inline void rdma_ah_set_sl(struct rdma_ah_attr *attr, u8 sl) in rdma_ah_set_sl() argument
4626 attr->sl = sl; in rdma_ah_set_sl()
4629 static inline u8 rdma_ah_get_sl(const struct rdma_ah_attr *attr) in rdma_ah_get_sl() argument
4631 return attr->sl; in rdma_ah_get_sl()
4634 static inline void rdma_ah_set_path_bits(struct rdma_ah_attr *attr, in rdma_ah_set_path_bits() argument
4637 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_set_path_bits()
4638 attr->ib.src_path_bits = src_path_bits; in rdma_ah_set_path_bits()
4639 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_path_bits()
4640 attr->opa.src_path_bits = src_path_bits; in rdma_ah_set_path_bits()
4643 static inline u8 rdma_ah_get_path_bits(const struct rdma_ah_attr *attr) in rdma_ah_get_path_bits() argument
4645 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_get_path_bits()
4646 return attr->ib.src_path_bits; in rdma_ah_get_path_bits()
4647 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_path_bits()
4648 return attr->opa.src_path_bits; in rdma_ah_get_path_bits()
4652 static inline void rdma_ah_set_make_grd(struct rdma_ah_attr *attr, in rdma_ah_set_make_grd() argument
4655 if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_make_grd()
4656 attr->opa.make_grd = make_grd; in rdma_ah_set_make_grd()
4659 static inline bool rdma_ah_get_make_grd(const struct rdma_ah_attr *attr) in rdma_ah_get_make_grd() argument
4661 if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_make_grd()
4662 return attr->opa.make_grd; in rdma_ah_get_make_grd()
4666 static inline void rdma_ah_set_port_num(struct rdma_ah_attr *attr, u32 port_num) in rdma_ah_set_port_num() argument
4668 attr->port_num = port_num; in rdma_ah_set_port_num()
4671 static inline u32 rdma_ah_get_port_num(const struct rdma_ah_attr *attr) in rdma_ah_get_port_num() argument
4673 return attr->port_num; in rdma_ah_get_port_num()
4676 static inline void rdma_ah_set_static_rate(struct rdma_ah_attr *attr, in rdma_ah_set_static_rate() argument
4679 attr->static_rate = static_rate; in rdma_ah_set_static_rate()
4682 static inline u8 rdma_ah_get_static_rate(const struct rdma_ah_attr *attr) in rdma_ah_get_static_rate() argument
4684 return attr->static_rate; in rdma_ah_get_static_rate()
4687 static inline void rdma_ah_set_ah_flags(struct rdma_ah_attr *attr, in rdma_ah_set_ah_flags() argument
4690 attr->ah_flags = flag; in rdma_ah_set_ah_flags()
4694 rdma_ah_get_ah_flags(const struct rdma_ah_attr *attr) in rdma_ah_get_ah_flags() argument
4696 return attr->ah_flags; in rdma_ah_get_ah_flags()
4700 *rdma_ah_read_grh(const struct rdma_ah_attr *attr) in rdma_ah_read_grh() argument
4702 return &attr->grh; in rdma_ah_read_grh()
4707 *rdma_ah_retrieve_grh(struct rdma_ah_attr *attr) in rdma_ah_retrieve_grh() argument
4709 return &attr->grh; in rdma_ah_retrieve_grh()
4712 static inline void rdma_ah_set_dgid_raw(struct rdma_ah_attr *attr, void *dgid) in rdma_ah_set_dgid_raw() argument
4714 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_dgid_raw()
4719 static inline void rdma_ah_set_subnet_prefix(struct rdma_ah_attr *attr, in rdma_ah_set_subnet_prefix() argument
4722 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_subnet_prefix()
4727 static inline void rdma_ah_set_interface_id(struct rdma_ah_attr *attr, in rdma_ah_set_interface_id() argument
4730 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_interface_id()
4735 static inline void rdma_ah_set_grh(struct rdma_ah_attr *attr, in rdma_ah_set_grh() argument
4740 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_grh()
4742 attr->ah_flags = IB_AH_GRH; in rdma_ah_set_grh()
4753 void rdma_move_grh_sgid_attr(struct rdma_ah_attr *attr, union ib_gid *dgid,