Pull rdma updates from Jason Gunthorpe: "Another small cycle. Mostly cleanups and bug fixes, quite a bit assisted from bots. There are a few new syzkaller splats that haven't been solved yet but they should get into the rcs in a few weeks, I think. Summary: - Update drivers to use common helpers for GUIDs, pkeys, bitmaps, memset_startat, and others - General code cleanups from bots - Simplify some of the rxe pool code in preparation for a larger rework - Clean out old stuff from hns, including all support for hip06 devices - Fix a bug where GID table entries could be missed if the table had holes in it - Rename paths and sessions in rtrs for better understandability - Consolidate the roce source port selection code - NDR speed support in mlx5" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (83 commits) RDMA/irdma: Remove the redundant return RDMA/rxe: Use the standard method to produce udp source port RDMA/irdma: Make the source udp port vary RDMA/hns: Replace get_udp_sport with rdma_get_udp_sport RDMA/core: Calculate UDP source port based on flow label or lqpn/rqpn IB/qib: Fix typos RDMA/rtrs-clt: Rename rtrs_clt to rtrs_clt_sess RDMA/rtrs-srv: Rename rtrs_srv to rtrs_srv_sess RDMA/rtrs-clt: Rename rtrs_clt_sess to rtrs_clt_path RDMA/rtrs-srv: Rename rtrs_srv_sess to rtrs_srv_path RDMA/rtrs: Rename rtrs_sess to rtrs_path RDMA/hns: Modify the hop num of HIP09 EQ to 1 IB/iser: Align coding style across driver IB/iser: Remove un-needed casting to/from void pointer IB/iser: Don't suppress send completions IB/iser: Rename ib_ret local variable IB/iser: Fix RNR errors IB/iser: Remove deprecated pi_guard module param IB/mlx5: Expose NDR speed through MAD RDMA/cxgb4: Set queue pair state when being queried ...
Showing the changes to include (4 of 105 files). Show all
Unified · Split
| @@ -276,6 +276,7 @@ enum ib_port_capability_mask2_bits { · 275 unmodified lines | ||
| 276 | 276 | IB_PORT_SWITCH_PORT_STATE_TABLE_SUP = 1 << 3, |
| 277 | 277 | IB_PORT_LINK_WIDTH_2X_SUP = 1 << 4, |
| 278 | 278 | IB_PORT_LINK_SPEED_HDR_SUP = 1 << 5, |
| 279 | + IB_PORT_LINK_SPEED_NDR_SUP = 1 << 10, | |
| 279 | 280 | }; |
| 280 | 281 | |
| 281 | 282 | #define OPA_CLASS_PORT_INFO_PR_SUPPORT BIT(26) |
| @@ -144,5 +144,15 @@ ib_get_smp_direction(struct ib_smp *smp) · 143 unmodified lines | ||
| 144 | 144 | #define IB_NOTICE_TRAP_DR_NOTICE 0x80 |
| 145 | 145 | #define IB_NOTICE_TRAP_DR_TRUNC 0x40 |
| 146 | 146 | |
| 147 | − | |
| 147 | +/** | |
| 148 | + * ib_init_query_mad - Initialize query MAD. | |
| 149 | + * @mad: MAD to initialize. | |
| 150 | + */ | |
| 151 | +static inline void ib_init_query_mad(struct ib_smp *mad) | |
| 152 | +{ | |
| 153 | + mad->base_version = IB_MGMT_BASE_VERSION; | |
| 154 | + mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED; | |
| 155 | + mad->class_version = 1; | |
| 156 | + mad->method = IB_MGMT_METHOD_GET; | |
| 157 | +} | |
| 148 | 158 | #endif /* IB_SMI_H */ |
| @@ -4749,6 +4749,23 @@ static inline u32 rdma_calc_flow_label(u32 lqpn, u32 rqpn) · 4748 unmodified lines | ||
| 4749 | 4749 | return (u32)(v & IB_GRH_FLOWLABEL_MASK); |
| 4750 | 4750 | } |
| 4751 | 4751 | |
| 4752 | +/** | |
| 4753 | + * rdma_get_udp_sport - Calculate and set UDP source port based on the flow | |
| 4754 | + * label. If flow label is not defined in GRH then | |
| 4755 | + * calculate it based on lqpn/rqpn. | |
| 4756 | + * | |
| 4757 | + * @fl: flow label from GRH | |
| 4758 | + * @lqpn: local qp number | |
| 4759 | + * @rqpn: remote qp number | |
| 4760 | + */ | |
| 4761 | +static inline u16 rdma_get_udp_sport(u32 fl, u32 lqpn, u32 rqpn) | |
| 4762 | +{ | |
| 4763 | + if (!fl) | |
| 4764 | + fl = rdma_calc_flow_label(lqpn, rqpn); | |
| 4765 | + | |
| 4766 | + return rdma_flow_label_to_udp_sport(fl); | |
| 4767 | +} | |
| 4768 | + | |
| 4752 | 4769 | const struct ib_port_immutable* |
| 4753 | 4770 | ib_port_immutable_read(struct ib_device *dev, unsigned int port); |
| 4754 | 4771 | #endif /* IB_VERBS_H */ |
| @@ -77,10 +77,12 @@ enum hns_roce_qp_cap_flags { · 76 unmodified lines | ||
| 77 | 77 | HNS_ROCE_QP_CAP_RQ_RECORD_DB = 1 << 0, |
| 78 | 78 | HNS_ROCE_QP_CAP_SQ_RECORD_DB = 1 << 1, |
| 79 | 79 | HNS_ROCE_QP_CAP_OWNER_DB = 1 << 2, |
| 80 | + HNS_ROCE_QP_CAP_DIRECT_WQE = 1 << 5, | |
| 80 | 81 | }; |
| 81 | 82 | |
| 82 | 83 | struct hns_roce_ib_create_qp_resp { |
| 83 | 84 | __aligned_u64 cap_flags; |
| 85 | + __aligned_u64 dwqe_mmap_key; | |
| 84 | 86 | }; |
| 85 | 87 | |
| 86 | 88 | struct hns_roce_ib_alloc_ucontext_resp { |