public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [rdma-rc 04/11] IB/ipoib: Prevent setting negative values to max_nonsrq_conn_qp
Date: Wed, 26 Jul 2017 21:12:25 +0300	[thread overview]
Message-ID: <20170726181232.7363-5-leon@kernel.org> (raw)
In-Reply-To: <20170726181232.7363-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Don't allow negative values to max_nonsrq_conn_qp. There is no functional
impact on a negative value but it is logicically incorrect.

Fixes: 68e995a29572 ("IPoIB/cm: Add connected mode support for devices without SRQs")
Signed-off-by: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 144187b407bd..8b7ec15a9d6e 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -2366,6 +2366,7 @@ static int __init ipoib_init_module(void)
 	ipoib_sendq_size = max3(ipoib_sendq_size, 2 * MAX_SEND_CQE, IPOIB_MIN_QUEUE_SIZE);
 #ifdef CONFIG_INFINIBAND_IPOIB_CM
 	ipoib_max_conn_qp = min(ipoib_max_conn_qp, IPOIB_CM_MAX_CONN_QP);
+	ipoib_max_conn_qp = max(ipoib_max_conn_qp, 0);
 #endif
 
 	/*
-- 
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-07-26 18:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 18:12 [pull request][rdma-rc 00/11] IPoIB fixes for 4.13 Leon Romanovsky
     [not found] ` <20170726181232.7363-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-26 18:12   ` [rdma-rc 01/11] IB/ipoib: Fix race between light events and interface restart Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 02/11] IB/ipoib: Use cancel_delayed_work_sync when needed Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 03/11] IB/ipoib: Make sure no in-flight joins while leaving that mcast Leon Romanovsky
2017-07-26 18:12   ` Leon Romanovsky [this message]
2017-07-26 18:12   ` [rdma-rc 05/11] IB/ipoib: Set IPOIB_NEIGH_TBL_FLUSH after flushed completion initialization Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 06/11] IB/ipoib: Add multicast packets statistics Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 07/11] IB/ipoib: Add get statistics support to SRIOV VF Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 08/11] IB/ipoib: Clean error paths in add port Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 09/11] IB/ipoib: Remove double pointer assigning Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 10/11] Revert "IB/core: Allow QP state transition from reset to error" Leon Romanovsky
     [not found]     ` <20170726181232.7363-11-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-27 14:52       ` Dennis Dalessandro
     [not found]         ` <49fe625b-cd44-137e-c001-1d85297f4e62-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-27 14:57           ` Dennis Dalessandro
     [not found]             ` <fcacf34e-d16f-3d66-2877-be5b5993f296-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-30  5:17               ` Leon Romanovsky
2017-07-26 18:12   ` [rdma-rc 11/11] IB/ipoib: Notify on modify QP failure only when relevant Leon Romanovsky
     [not found]     ` <20170726181232.7363-12-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-27 14:59       ` Dennis Dalessandro
2017-07-27 15:05   ` [pull request][rdma-rc 00/11] IPoIB fixes for 4.13 Dennis Dalessandro
     [not found]     ` <2679977c-6258-ed15-a234-3682b8be65f3-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-27 15:06       ` Dennis Dalessandro
     [not found]         ` <3eb7d0e3-b1ef-533e-56ae-9cc6b65ddfc5-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-30  5:23           ` Leon Romanovsky
2017-08-07 17:35           ` Doug Ledford
2017-08-06  8:20   ` Leon Romanovsky
     [not found]     ` <20170806082018.GD3636-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-07 15:58       ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170726181232.7363-5-leon@kernel.org \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox