Lines Matching refs:attr
199 rdma_gid_attr_network_type(const struct ib_gid_attr *attr) in rdma_gid_attr_network_type() argument
201 if (attr->gid_type == IB_GID_TYPE_IB) in rdma_gid_attr_network_type()
204 if (attr->gid_type == IB_GID_TYPE_ROCE) in rdma_gid_attr_network_type()
207 if (ipv6_addr_v4mapped((struct in6_addr *)&attr->gid)) in rdma_gid_attr_network_type()
1047 struct ib_srq_attr attr; member
2376 int (*add_gid)(const struct ib_gid_attr *attr, void **context);
2385 int (*del_gid)(const struct ib_gid_attr *attr, void **context);
2402 int (*create_ah)(struct ib_ah *ah, struct rdma_ah_init_attr *attr,
2423 int (*create_cq)(struct ib_cq *cq, const struct ib_cq_init_attr *attr,
2461 const struct ib_flow_action_attrs_esp *attr,
2466 const struct ib_flow_action_attrs_esp *attr,
2483 int (*modify_wq)(struct ib_wq *wq, struct ib_wq_attr *attr,
2491 struct ib_dm_alloc_attr *attr,
2495 struct ib_dm_mr_attr *attr,
3380 struct ib_port_attr *attr) in rdma_mtu_from_attr() argument
3383 return attr->phys_mtu; in rdma_mtu_from_attr()
3385 return ib_mtu_enum_to_int(attr->max_mtu); in rdma_mtu_from_attr()
3673 struct ib_qp_attr *attr,
4324 int ib_modify_wq(struct ib_wq *wq, struct ib_wq_attr *attr,
4355 static inline u8 *rdma_ah_retrieve_dmac(struct rdma_ah_attr *attr) in rdma_ah_retrieve_dmac() argument
4357 if (attr->type == RDMA_AH_ATTR_TYPE_ROCE) in rdma_ah_retrieve_dmac()
4358 return attr->roce.dmac; in rdma_ah_retrieve_dmac()
4362 static inline void rdma_ah_set_dlid(struct rdma_ah_attr *attr, u32 dlid) in rdma_ah_set_dlid() argument
4364 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_set_dlid()
4365 attr->ib.dlid = (u16)dlid; in rdma_ah_set_dlid()
4366 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_dlid()
4367 attr->opa.dlid = dlid; in rdma_ah_set_dlid()
4370 static inline u32 rdma_ah_get_dlid(const struct rdma_ah_attr *attr) in rdma_ah_get_dlid() argument
4372 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_get_dlid()
4373 return attr->ib.dlid; in rdma_ah_get_dlid()
4374 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_dlid()
4375 return attr->opa.dlid; in rdma_ah_get_dlid()
4379 static inline void rdma_ah_set_sl(struct rdma_ah_attr *attr, u8 sl) in rdma_ah_set_sl() argument
4381 attr->sl = sl; in rdma_ah_set_sl()
4384 static inline u8 rdma_ah_get_sl(const struct rdma_ah_attr *attr) in rdma_ah_get_sl() argument
4386 return attr->sl; in rdma_ah_get_sl()
4389 static inline void rdma_ah_set_path_bits(struct rdma_ah_attr *attr, in rdma_ah_set_path_bits() argument
4392 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_set_path_bits()
4393 attr->ib.src_path_bits = src_path_bits; in rdma_ah_set_path_bits()
4394 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_path_bits()
4395 attr->opa.src_path_bits = src_path_bits; in rdma_ah_set_path_bits()
4398 static inline u8 rdma_ah_get_path_bits(const struct rdma_ah_attr *attr) in rdma_ah_get_path_bits() argument
4400 if (attr->type == RDMA_AH_ATTR_TYPE_IB) in rdma_ah_get_path_bits()
4401 return attr->ib.src_path_bits; in rdma_ah_get_path_bits()
4402 else if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_path_bits()
4403 return attr->opa.src_path_bits; in rdma_ah_get_path_bits()
4407 static inline void rdma_ah_set_make_grd(struct rdma_ah_attr *attr, in rdma_ah_set_make_grd() argument
4410 if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_set_make_grd()
4411 attr->opa.make_grd = make_grd; in rdma_ah_set_make_grd()
4414 static inline bool rdma_ah_get_make_grd(const struct rdma_ah_attr *attr) in rdma_ah_get_make_grd() argument
4416 if (attr->type == RDMA_AH_ATTR_TYPE_OPA) in rdma_ah_get_make_grd()
4417 return attr->opa.make_grd; in rdma_ah_get_make_grd()
4421 static inline void rdma_ah_set_port_num(struct rdma_ah_attr *attr, u8 port_num) in rdma_ah_set_port_num() argument
4423 attr->port_num = port_num; in rdma_ah_set_port_num()
4426 static inline u8 rdma_ah_get_port_num(const struct rdma_ah_attr *attr) in rdma_ah_get_port_num() argument
4428 return attr->port_num; in rdma_ah_get_port_num()
4431 static inline void rdma_ah_set_static_rate(struct rdma_ah_attr *attr, in rdma_ah_set_static_rate() argument
4434 attr->static_rate = static_rate; in rdma_ah_set_static_rate()
4437 static inline u8 rdma_ah_get_static_rate(const struct rdma_ah_attr *attr) in rdma_ah_get_static_rate() argument
4439 return attr->static_rate; in rdma_ah_get_static_rate()
4442 static inline void rdma_ah_set_ah_flags(struct rdma_ah_attr *attr, in rdma_ah_set_ah_flags() argument
4445 attr->ah_flags = flag; in rdma_ah_set_ah_flags()
4449 rdma_ah_get_ah_flags(const struct rdma_ah_attr *attr) in rdma_ah_get_ah_flags() argument
4451 return attr->ah_flags; in rdma_ah_get_ah_flags()
4455 *rdma_ah_read_grh(const struct rdma_ah_attr *attr) in rdma_ah_read_grh() argument
4457 return &attr->grh; in rdma_ah_read_grh()
4462 *rdma_ah_retrieve_grh(struct rdma_ah_attr *attr) in rdma_ah_retrieve_grh() argument
4464 return &attr->grh; in rdma_ah_retrieve_grh()
4467 static inline void rdma_ah_set_dgid_raw(struct rdma_ah_attr *attr, void *dgid) in rdma_ah_set_dgid_raw() argument
4469 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_dgid_raw()
4474 static inline void rdma_ah_set_subnet_prefix(struct rdma_ah_attr *attr, in rdma_ah_set_subnet_prefix() argument
4477 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_subnet_prefix()
4482 static inline void rdma_ah_set_interface_id(struct rdma_ah_attr *attr, in rdma_ah_set_interface_id() argument
4485 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_interface_id()
4490 static inline void rdma_ah_set_grh(struct rdma_ah_attr *attr, in rdma_ah_set_grh() argument
4495 struct ib_global_route *grh = rdma_ah_retrieve_grh(attr); in rdma_ah_set_grh()
4497 attr->ah_flags = IB_AH_GRH; in rdma_ah_set_grh()
4508 void rdma_move_grh_sgid_attr(struct rdma_ah_attr *attr, union ib_gid *dgid,