History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe: "This is an unusually large bunch of bug fixes for the later rc cycle, rxe and mlx5 both dumped a lot of things at once. rxe continues to fix itself, and mlx5 is fixing a bunch of "queue counters" related bugs. There is one highly notable bug fix regarding the qkey. This small security check was missed in the original 2005 implementation and it allows some significant issues. Summary: - Two rtrs bug fixes for error unwind bugs - Several rxe bug fixes: * Incorrect Rx packet validation * Using memory without a refcount * Syzkaller found use before initialization * Regression fix for missing locking with the tasklet conversion from this merge window - Have bnxt report the correct link properties to userspace, this was a regression in v6.3 - Several mlx5 bug fixes: * Kernel crash triggerable by userspace for the RAW ethernet profile * Defend against steering refcounting issues created by userspace * Incorrect change of QP port affinity parameters in some LAG configurations - Fix mlx5 Q counters: * Do not over allocate Q counters to allow userspace to use the full port capacity * Kernel crash triggered by eswitch due to mis-use of Q counters * Incorrect mlx5_device for Q counters in some LAG configurations - Properly implement the IBA spec restricting privileged qkeys to root - Always an error when reading from a disassociated device's event queue - isert bug fixes: * Avoid a deadlock with the CM handler and CM ID destruction * Correct list corruption due to incorrect locking * Fix a use after free around connection tear down" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/rxe: Fix rxe_cq_post IB/isert: Fix incorrect release of isert connection IB/isert: Fix possible list corruption in CMA handler IB/isert: Fix dead lock in ib_isert RDMA/mlx5: Fix affinity assignment IB/uverbs: Fix to consider event queue closing also upon non-blocking mode RDMA/uverbs: Restrict usage of privileged QKEYs RDMA/cma: Always set static rate to 0 for RoCE RDMA/mlx5: Fix Q-counters query in LAG mode RDMA/mlx5: Remove vport Q-counters dependency on normal Q-counters RDMA/mlx5: Fix Q-counters per vport allocation RDMA/mlx5: Create an indirect flow table for steering anchor RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions RDMA/rxe: Fix the use-before-initialization error of resp_pkts RDMA/bnxt_re: Fix reporting active_{speed,width} attributes RDMA/rxe: Fix ref count error in check_rkey() RDMA/rxe: Fix packet length checks RDMA/rtrs: Fix rxe_dealloc_pd warning RDMA/rtrs: Fix the last iu->buf leak in err path

Linus Torvalds committed 3 years ago

Commit 93fd8eb2 parents b7feaa4 0c7e31422 files · +447 −130Browse files

Showing the changes to include (2 of 22 files). Show all

Unified · Split

2 files
  1. include/linux/mlx5/driver.h +12 −0
  2. include/rdma/ib_addr.h +0 −23
include/linux/mlx5/driver.h+12−0
@@ -1238,6 +1238,18 @@ static inline u16 mlx5_core_max_vfs(const struct mlx5_core_dev *dev) · 1237 unmodified lines
1238 return dev->priv.sriov.max_vfs;1238 return dev->priv.sriov.max_vfs;
1239}1239}
1240 1240
1241static inline int mlx5_lag_is_lacp_owner(struct mlx5_core_dev *dev)
1242{
1243 /* LACP owner conditions:
1244 * 1) Function is physical.
1245 * 2) LAG is supported by FW.
1246 * 3) LAG is managed by driver (currently the only option).
1247 */
1248 return MLX5_CAP_GEN(dev, vport_group_manager) &&
1249 (MLX5_CAP_GEN(dev, num_lag_ports) > 1) &&
1250 MLX5_CAP_GEN(dev, lag_master);
1251}
1252
1241static inline int mlx5_get_gid_table_len(u16 param)1253static inline int mlx5_get_gid_table_len(u16 param)
1242{1254{
1243 if (param > 4) {1255 if (param > 4) {
include/rdma/ib_addr.h+0−23
@@ -194,29 +194,6 @@ static inline enum ib_mtu iboe_get_mtu(int mtu) · 193 unmodified lines
194 return 0;194 return 0;
195}195}
196 196
197static inline int iboe_get_rate(struct net_device *dev)
198{
199 struct ethtool_link_ksettings cmd;
200 int err;
201
202 rtnl_lock();
203 err = __ethtool_get_link_ksettings(dev, &cmd);
204 rtnl_unlock();
205 if (err)
206 return IB_RATE_PORT_CURRENT;
207
208 if (cmd.base.speed >= 40000)
209 return IB_RATE_40_GBPS;
210 else if (cmd.base.speed >= 30000)
211 return IB_RATE_30_GBPS;
212 else if (cmd.base.speed >= 20000)
213 return IB_RATE_20_GBPS;
214 else if (cmd.base.speed >= 10000)
215 return IB_RATE_10_GBPS;
216 else
217 return IB_RATE_PORT_CURRENT;
218}
219
220static inline int rdma_link_local_addr(struct in6_addr *addr)197static inline int rdma_link_local_addr(struct in6_addr *addr)
221{198{
222 if (addr->s6_addr32[0] == htonl(0xfe800000) &&199 if (addr->s6_addr32[0] == htonl(0xfe800000) &&