[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190629.122022.1773703044487782799.davem@davemloft.net>
Date: Sat, 29 Jun 2019 12:20:22 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: gpiccoli@...onical.com
Cc: GR-everest-linux-l2@...vell.com, netdev@...r.kernel.org,
skalluru@...vell.com, aelior@...vell.com,
jay.vosburgh@...onical.com
Subject: Re: [PATCH V4] bnx2x: Prevent ptp_task to be rescheduled
indefinitely
From: "Guilherme G. Piccoli" <gpiccoli@...onical.com>
Date: Thu, 27 Jun 2019 13:31:33 -0300
> Currently bnx2x ptp worker tries to read a register with timestamp
> information in case of TX packet timestamping and in case it fails,
> the routine reschedules itself indefinitely. This was reported as a
> kworker always at 100% of CPU usage, which was narrowed down to be
> bnx2x ptp_task.
>
> By following the ioctl handler, we could narrow down the problem to
> an NTP tool (chrony) requesting HW timestamping from bnx2x NIC with
> RX filter zeroed; this isn't reproducible for example with ptp4l
> (from linuxptp) since this tool requests a supported RX filter.
> It seems NIC FW timestamp mechanism cannot work well with
> RX_FILTER_NONE - driver's PTP filter init routine skips a register
> write to the adapter if there's not a supported filter request.
>
> This patch addresses the problem of bnx2x ptp thread's everlasting
> reschedule by retrying the register read 10 times; between the read
> attempts the thread sleeps for an increasing amount of time starting
> in 1ms to give FW some time to perform the timestamping. If it still
> fails after all retries, we bail out in order to prevent an unbound
> resource consumption from bnx2x.
>
> The patch also adds an ethtool statistic for accounting the skipped
> TX timestamp packets and it reduces the priority of timestamping
> error messages to prevent log flooding. The code was tested using
> both linuxptp and chrony.
>
> Reported-and-tested-by: Przemyslaw Hausman <przemyslaw.hausman@...onical.com>
> Suggested-by: Sudarsana Reddy Kalluru <skalluru@...vell.com>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@...onical.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists