Logan Gunthorpe
471954c313
ntb_transport: fix bug calculating num_qps_mw
...
commit 8e8496e0e9 upstream.
A divide by zero error occurs if qp_count is less than mw_count because
num_qps_mw is calculated to be zero. The calculation appears to be
incorrect.
The requirement is for num_qps_mw to be set to qp_count / mw_count
with any remainder divided among the earlier mws.
For example, if mw_count is 5 and qp_count is 12 then mws 0 and 1
will have 3 qps per window and mws 2 through 4 will have 2 qps per window.
Thus, when mw_num < qp_count % mw_count, num_qps_mw is 1 higher
than when mw_num >= qp_count.
Signed-off-by: Logan Gunthorpe <logang@deltatee.com >
Fixes: e26a5843f7 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com >
Signed-off-by: Jon Mason <jdmason@kudzu.us >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-08-30 10:21:54 +02:00
..
2017-08-06 18:59:47 -07:00
2017-08-30 10:21:53 +02:00
2017-08-11 08:49:28 -07:00
2016-12-05 14:53:46 -05:00
2017-03-30 09:41:27 +02:00
2017-08-11 08:49:29 -07:00
2017-03-12 06:41:52 +01:00
2017-08-24 17:12:20 -07:00
2017-05-20 14:28:41 +02:00
2017-01-19 20:18:07 +01:00
2017-08-06 18:59:43 -07:00
2017-08-11 08:49:35 -07:00
2017-04-12 12:41:16 +02:00
2017-07-05 14:40:30 +02:00
2016-10-15 09:26:12 -07:00
2017-08-24 17:12:18 -07:00
2017-08-06 18:59:43 -07:00
2017-03-12 06:41:44 +01:00
2017-08-06 18:59:46 -07:00
2017-04-18 07:11:50 +02:00
2016-10-04 12:06:26 -07:00
2017-01-19 20:18:03 +01:00
2016-11-03 14:46:39 +01:00
2017-04-21 09:31:20 +02:00
2017-08-11 08:49:30 -07:00
2017-08-30 10:21:48 +02:00
2017-08-06 18:59:49 -07:00
2017-03-30 09:41:27 +02:00
2017-05-14 14:00:13 +02:00
2017-03-30 09:41:27 +02:00
2017-08-30 10:21:46 +02:00
2017-04-12 12:41:17 +02:00
2017-08-30 10:21:53 +02:00
2017-08-11 08:49:36 -07:00
2017-08-30 10:21:44 +02:00
2017-08-11 08:49:30 -07:00
2016-10-27 18:43:43 -07:00
2017-08-24 17:12:20 -07:00
2017-08-06 18:59:42 -07:00
2017-08-30 10:21:51 +02:00
2016-10-07 14:42:05 -07:00
2016-09-20 20:57:12 +10:00
2017-08-06 18:59:42 -07:00
2016-09-27 12:33:47 +02:00
2017-08-06 18:59:40 -07:00
2017-08-11 08:49:31 -07:00
2017-03-15 10:02:45 +08:00
2016-10-17 15:43:05 +02:00
2017-06-24 07:11:14 +02:00
2017-07-27 15:07:59 -07:00
2017-08-16 13:43:17 -07:00
2017-08-16 13:43:17 -07:00
2017-08-30 10:21:42 +02:00
2017-08-06 18:59:42 -07:00
2017-08-30 10:21:54 +02:00
2017-07-27 15:08:02 -07:00
2017-07-27 15:08:03 -07:00
2017-08-06 18:59:48 -07:00
2017-07-27 15:08:08 -07:00
2016-10-10 20:16:43 -07:00
2017-08-24 17:12:18 -07:00
2017-06-17 06:41:54 +02:00
2017-07-27 15:08:00 -07:00
2016-11-11 08:45:08 -08:00
2016-10-17 15:50:07 +01:00
2017-05-14 14:00:19 +02:00
2017-08-16 13:43:24 -07:00
2017-07-05 14:40:23 +02:00
2017-05-14 14:00:15 +02:00
2017-01-19 20:18:07 +01:00
2016-10-11 15:06:32 -07:00
2016-09-20 20:57:12 +10:00
2016-10-13 10:20:06 -04:00
2017-04-21 09:31:22 +02:00
2016-10-19 08:11:43 -07:00
2017-07-05 14:40:29 +02:00
2017-03-12 06:41:50 +01:00
2016-10-22 18:31:42 +09:00
2017-01-26 08:24:44 +01:00
2017-04-21 09:31:24 +02:00
2017-06-07 12:07:43 +02:00
2017-08-11 08:49:35 -07:00
2017-01-26 08:24:45 +01:00
2017-08-11 08:49:35 -07:00
2017-07-27 15:08:08 -07:00
2017-01-09 08:32:16 +01:00
2017-08-30 10:21:54 +02:00
2017-08-16 13:43:17 -07:00
2017-07-27 15:07:55 -07:00
2017-07-21 07:42:22 +02:00
2017-08-24 17:12:21 -07:00
2017-05-25 15:44:46 +02:00
2017-08-06 18:59:48 -07:00
2017-06-17 06:41:57 +02:00
2017-08-06 18:59:48 -07:00
2016-10-19 08:11:43 -07:00
2017-03-31 10:31:45 +02:00
2017-03-12 06:41:50 +01:00
2017-03-12 06:41:48 +01:00
2017-07-05 14:40:28 +02:00
2017-08-24 17:12:20 -07:00
2017-05-20 14:28:35 +02:00