summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Zhang <markzhang@nvidia.com>2022-11-28 14:52:46 +0300
committerLeon Romanovsky <leon@kernel.org>2022-11-30 11:33:19 +0300
commitfc8f93ad3e5485d45c992233c96acd902992dfc4 (patch)
tree53837589a3a50d07237a4e1dae3f795e38fdf1c9 /drivers
parent67e6272d53386f9708f91c4d0015c4a1c470eef5 (diff)
downloadlinux-fc8f93ad3e5485d45c992233c96acd902992dfc4.tar.xz
RDMA/nldev: Fix failure to send large messages
Return "-EMSGSIZE" instead of "-EINVAL" when filling a QP entry, so that new SKBs will be allocated if there's not enough room in current SKB. Fixes: 65959522f806 ("RDMA: Add support to dump resource tracker in RAW format") Signed-off-by: Mark Zhang <markzhang@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Link: https://lore.kernel.org/r/b5e9c62f6b8369acab5648b661bf539cbceeffdc.1669636336.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/nldev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index b4716cda65d8..a981ac2f0975 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -513,7 +513,7 @@ static int fill_res_qp_entry(struct sk_buff *msg, bool has_cap_net_admin,
/* In create_qp() port is not set yet */
if (qp->port && nla_put_u32(msg, RDMA_NLDEV_ATTR_PORT_INDEX, qp->port))
- return -EINVAL;
+ return -EMSGSIZE;
ret = nla_put_u32(msg, RDMA_NLDEV_ATTR_RES_LQPN, qp->qp_num);
if (ret)