lkml.org 
[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] netpoll: Fix carrier_timeout for msleep()
On Mon, 11 Oct 2021 16:57:53 +0800 Yajun Deng wrote:
> It should be sleep carrier_timeout seconds rather than 4 seconds if
> carrier_timeout has been modified.

carrier_timeout is for changing the upper bound of the wait,
not for controlling how long to wait if carrier is untrustworthy.

> Add start variable, hence atleast and atmost use the same jiffies, and
> use msecs_to_jiffies() and MSEC_PER_SEC match with jiffies.
> At the same time, msleep() is not for 1ms - 20ms, use usleep_range()
> instead, see Documentation/timers/timers-howto.rst.
>
> Fixes: bff38771e106 ("netpoll: Introduce netpoll_carrier_timeout kernel option")
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>

\
 
 \ /
  Last update: 2021-10-12 02:12    [W:0.037 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site