From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
Eugenia Emantayev <eugenia@mellanox.com>,
Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [PATCH net] net/mlx4_en: fix overflow in mlx4_en_init_timestamp()
Date: Sun, 26 Feb 2017 19:28:03 +0200 [thread overview]
Message-ID: <1102e4a7-fb39-4adc-8655-7fb873c43181@gmail.com> (raw)
In-Reply-To: <1487892163.9415.111.camel@edumazet-glaptop3.roam.corp.google.com>
On 24/02/2017 1:22 AM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> The cited commit makes a great job of finding optimal shift/multiplier
> values assuming a 10 seconds wrap around, but forgot to change the
> overflow_period computation.
>
> It overflows in cyclecounter_cyc2ns(), and the final result is 804 ms,
> which is silly.
>
> Lets simply use 5 seconds, no need to recompute this, given how it is
> supposed to work.
>
> Later, we will use a timer instead of a work queue, since the new RX
> allocation schem will no longer need mlx4_en_recover_from_oom() and the
> service_task firing every 250 ms.
>
> Fixes: 31c128b66e5b ("net/mlx4_en: Choose time-stamping shift value according to HW frequency")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Tariq Toukan <tariqt@mellanox.com>
> Cc: Eugenia Emantayev <eugenia@mellanox.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/en_clock.c | 18 +++++++---------
> drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1
> 2 files changed, 8 insertions(+), 11 deletions(-)
>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Thanks for your patch.
next prev parent reply other threads:[~2017-02-26 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 23:22 [PATCH net] net/mlx4_en: fix overflow in mlx4_en_init_timestamp() Eric Dumazet
2017-02-24 16:21 ` David Miller
2017-02-25 16:11 ` Or Gerlitz
2017-02-26 17:28 ` Tariq Toukan [this message]
2017-02-26 20:45 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1102e4a7-fb39-4adc-8655-7fb873c43181@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=eugenia@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox