summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@mellanox.com>2019-03-27 13:39:21 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-04-23 12:09:21 -0700
commitb1b187e1029a374e83942e6c591ee5bf8b60f070 (patch)
tree93c95eef33aeeb91957d179fb28f62cf935ed9b4 /tools/perf/scripts/python/exported-sql-viewer.py
parent9a22d5d8393fb71a6cc1820c8fb1ef20e26ab149 (diff)
net/mlx5e: Add an underflow warning comment
mlx5e_mpwqe_get_log_rq_size calculates the number of WQEs (N) based on the requested number of frames in the RQ (F) and the number of packets per WQE (P). It ensures that N is not less than the minimum number of WQEs in an RQ (N_min). Arithmetically, it means that F / P >= N_min should be true. This function deals with logarithms, so it should check that log(F) - log(P) >= log(N_min). However, if F < P, this expression will cause an unsigned underflow. Check log(F) >= log(P) + log(N_min) instead. Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions