[PATCH 1/2] pcapng: revert use of reciprocal divide for timestamps
Stephen Hemminger
stephen at networkplumber.org
Tue Sep 29 17:36:08 CEST 2026
On Sun, 27 Sep 2026 12:50:14 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:
> The use of recprocal divide caused in calculating timestamps
> caused overflow wraparound. This bug was introduced by confusion
> about bits, shift, and the test was too short to catch the
> problem.
>
> Go back to just doing the divide which ends up faster on many
> than having to do 128 bit math on many CPU types.
>
> This is not a pure git revert because there were other
> good things in that commit like handling earlier packets,
> and catching if TSC hz was zero.
>
> Fixes: 4fc65615b274 ("pcapng: improve performance of timestamping")
> Cc: stable at dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
Both applied to next-net
More information about the stable
mailing list