aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2018-04-20 01:41:38 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-04-30 09:23:39 -0700
commit830e0dd9996c4644e42412aa6c46ed8f8eab0cca (patch)
tree3e767d60b62e1da2b10ed9812b1bf01c2e1d1141 /drivers/net/ethernet/intel/i40e/i40e_main.c
parenti40e: Fix multiple issues with UDP tunnel offload filter configuration (diff)
downloadlinux-dev-830e0dd9996c4644e42412aa6c46ed8f8eab0cca.tar.xz
linux-dev-830e0dd9996c4644e42412aa6c46ed8f8eab0cca.zip
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 'drivers/net/ethernet/intel/i40e/i40e_main.c')
0 files changed, 0 insertions, 0 deletions