summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2018-04-20 11:41:38 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-04-30 19:23:39 +0300
commit830e0dd9996c4644e42412aa6c46ed8f8eab0cca (patch)
tree3e767d60b62e1da2b10ed9812b1bf01c2e1d1141 /tools/perf/scripts/python/export-to-sqlite.py
parent5305d0fe2f22ec42b19f5ed205faad9b26955e5c (diff)
downloadlinux-830e0dd9996c4644e42412aa6c46ed8f8eab0cca.tar.xz
i40e: avoid overflow in i40e_ptp_adjfreq()
When operating at 1GbE, the base incval for the PTP clock is so large that multiplying it by numbers close to the max_adj can overflow the u64. Rather than attempting to limit the max_adj to a value small enough to avoid overflow, instead calculate the incvalue adjustment based on the 40GbE incvalue, and then multiply that by the scaling factor for the link speed. This sacrifices a small amount of precision in the adjustment but we avoid erratic behavior of the clock due to the overflow caused if ppb is very near the maximum adjustment. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions