aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorLogan Gunthorpe <[email protected]>2017-06-05 14:00:53 -0600
committerJon Mason <[email protected]>2017-06-19 14:24:41 -0400
commit8e8496e0e9564b66165f5219a4e8ed20b0d3fc6b (patch)
tree13e3ec29ae0b69a45fca5021525024b2b7c5da9b /tools/perf/scripts/python/export-to-postgresql.py
parentcb827ee6ccc3e480f0d9c0e8e53eef55be5b0414 (diff)
ntb_transport: fix bug calculating num_qps_mw
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 <[email protected]> Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Acked-by: Allen Hubbe <[email protected]> Signed-off-by: Jon Mason <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions