RDMA v5.16 first rc pull request
There are a few big regressions items from the merge window suggesting that people are testing rc1's but not testing the for-next branches: - Warnings fixes - Crash in hf1 when creating QPs and setting counters - Some old mlx4 cards fail to probe due to missing counters - Syzkaller crash in the new counters code -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfB7FMLh+8QxL+6i3OG33FX4gmxoFAmGX2I8ACgkQOG33FX4g mxrAcw/+MDgpEMXpY/NhuXvSOIXTYRPMjJA3XI9vKsk8p3Lvrmlxms3w17Qk+Y7Z Xjt6NIhxAvHZ+wiQw6m3zuDgmtq9SQcPQ8Jgbp7MiYbXYX7B8ueAqEZOyIcGBuij Dq2cnxST4kDpF58XIB30jXZqmAPrZOOOd2Cl40ipmmHAdahdew9nojfW7cXups3t A2SH84hk9p9p8141p9srJpdFo1EtvrCa5ddV/Agkq6m1XYULmUiqiItxsDQ6dvpy vUipmvoRGjokY0xb1L76wmTTxqR6k+0bbSLvZTZfu827mpp0fTNbAEcYFaKZGa9T Dbrcun3qNnpRmm9CSFdHzs+tKUDrCWu47ZEqSeFzLcTlZgDfdhrIZ545fnQSx9xJ YsI1VhO957OlD/3lBdsvPxg/ZG+N7BOJLKxSvYuzUZHAxBGoPORoC2qKsq5EO7wR YCDzs5APgT5A45NxLZhrW7cr8C/Y/TxQ7rclGwcNn9lUkwkvA3NSQ4lZsBSid57o WLWZlLAVFk3MnGwEp2WSdUju1wMTfmXT7TaCU4pNSSATfMhHtTXXFD987M71HTen 7ojZpAHTfJVk7Pcv4iXP/Z5Q8MZT/ujiVaeafOqOCwRxDdsGi3IRc9dY0RsXwIVk j7Lgfzg6HIRK6OTHXF7FPhnzy79y4CiOxI1VA0+IEflP+8AsIm8= =akCH -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "There are a few big regression items from the merge window suggesting that people are testing rc1's but not testing the for-next branches: - Warnings fixes - Crash in hf1 when creating QPs and setting counters - Some old mlx4 cards fail to probe due to missing counters - Syzkaller crash in the new counters code" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: MAINTAINERS: Update for VMware PVRDMA driver RDMA/nldev: Check stat attribute before accessing it RDMA/mlx4: Do not fail the registration on port stats IB/hfi1: Properly allocate rdma counter desc memory RDMA/core: Set send and receive CQ before forwarding to the driver RDMA/netlink: Add __maybe_unused to static inline in C file
This commit is contained in:
Коммит
a8b5f8f26d
|
@ -20317,7 +20317,8 @@ F: arch/x86/include/asm/vmware.h
|
|||
F: arch/x86/kernel/cpu/vmware.c
|
||||
|
||||
VMWARE PVRDMA DRIVER
|
||||
M: Adit Ranadive <aditr@vmware.com>
|
||||
M: Bryan Tan <bryantan@vmware.com>
|
||||
M: Vishnu Dasa <vdasa@vmware.com>
|
||||
M: VMware PV-Drivers <pv-drivers@vmware.com>
|
||||
L: linux-rdma@vger.kernel.org
|
||||
S: Maintained
|
||||
|
|
|
@ -1906,7 +1906,8 @@ static int nldev_stat_set_mode_doit(struct sk_buff *msg,
|
|||
int ret;
|
||||
|
||||
/* Currently only counter for QP is supported */
|
||||
if (nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_RES]) != RDMA_NLDEV_ATTR_RES_QP)
|
||||
if (!tb[RDMA_NLDEV_ATTR_STAT_RES] ||
|
||||
nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_RES]) != RDMA_NLDEV_ATTR_RES_QP)
|
||||
return -EINVAL;
|
||||
|
||||
mode = nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_MODE]);
|
||||
|
|
|
@ -1232,6 +1232,9 @@ static struct ib_qp *create_qp(struct ib_device *dev, struct ib_pd *pd,
|
|||
INIT_LIST_HEAD(&qp->rdma_mrs);
|
||||
INIT_LIST_HEAD(&qp->sig_mrs);
|
||||
|
||||
qp->send_cq = attr->send_cq;
|
||||
qp->recv_cq = attr->recv_cq;
|
||||
|
||||
rdma_restrack_new(&qp->res, RDMA_RESTRACK_QP);
|
||||
WARN_ONCE(!udata && !caller, "Missing kernel QP owner");
|
||||
rdma_restrack_set_name(&qp->res, udata ? NULL : caller);
|
||||
|
|
|
@ -1628,8 +1628,7 @@ static int init_cntr_names(const char *names_in, const size_t names_len,
|
|||
n++;
|
||||
|
||||
names_out =
|
||||
kmalloc((n + num_extra_names) * sizeof(struct rdma_stat_desc) +
|
||||
names_len,
|
||||
kzalloc((n + num_extra_names) * sizeof(*q) + names_len,
|
||||
GFP_KERNEL);
|
||||
if (!names_out) {
|
||||
*num_cntrs = 0;
|
||||
|
@ -1637,7 +1636,7 @@ static int init_cntr_names(const char *names_in, const size_t names_len,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
p = names_out + (n + num_extra_names) * sizeof(struct rdma_stat_desc);
|
||||
p = names_out + (n + num_extra_names) * sizeof(*q);
|
||||
memcpy(p, names_in, names_len);
|
||||
|
||||
q = (struct rdma_stat_desc *)names_out;
|
||||
|
|
|
@ -2215,6 +2215,11 @@ static const struct ib_device_ops mlx4_ib_hw_stats_ops = {
|
|||
.get_hw_stats = mlx4_ib_get_hw_stats,
|
||||
};
|
||||
|
||||
static const struct ib_device_ops mlx4_ib_hw_stats_ops1 = {
|
||||
.alloc_hw_device_stats = mlx4_ib_alloc_hw_device_stats,
|
||||
.get_hw_stats = mlx4_ib_get_hw_stats,
|
||||
};
|
||||
|
||||
static int mlx4_ib_alloc_diag_counters(struct mlx4_ib_dev *ibdev)
|
||||
{
|
||||
struct mlx4_ib_diag_counters *diag = ibdev->diag_counters;
|
||||
|
@ -2227,9 +2232,16 @@ static int mlx4_ib_alloc_diag_counters(struct mlx4_ib_dev *ibdev)
|
|||
return 0;
|
||||
|
||||
for (i = 0; i < MLX4_DIAG_COUNTERS_TYPES; i++) {
|
||||
/* i == 1 means we are building port counters */
|
||||
if (i && !per_port)
|
||||
continue;
|
||||
/*
|
||||
* i == 1 means we are building port counters, set a different
|
||||
* stats ops without port stats callback.
|
||||
*/
|
||||
if (i && !per_port) {
|
||||
ib_set_device_ops(&ibdev->ib_dev,
|
||||
&mlx4_ib_hw_stats_ops1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = __mlx4_ib_alloc_diag_counters(ibdev, &diag[i].descs,
|
||||
&diag[i].offset,
|
||||
|
|
|
@ -30,7 +30,7 @@ enum rdma_nl_flags {
|
|||
* constant as well and the compiler checks they are the same.
|
||||
*/
|
||||
#define MODULE_ALIAS_RDMA_NETLINK(_index, _val) \
|
||||
static inline void __chk_##_index(void) \
|
||||
static inline void __maybe_unused __chk_##_index(void) \
|
||||
{ \
|
||||
BUILD_BUG_ON(_index != _val); \
|
||||
} \
|
||||
|
|
Загрузка…
Ссылка в новой задаче