Re: [PATCH v2] ethernet:arc: Fix racing of TX ring buffer

Lino Sanfilippo
2016-05-30T21:41:22Z

Hi Shuyu,

On 28.05.2016 08:43, Shuyu Wei wrote:
>
> After some stress testing, it worked well most of the time.
> But there is a chance that it may get stuck when I use 2 nc process
> to send TCP packects at full speed. Only when a new rx packet
> arrive can trigger it to run again. This happens only once per several
> hours. No problem in UDP mode. I'm not sure if it's related to tx code in
> the driver.
>

This sounds strange. One reason I could imagine for such an issue is that
occassionally tx completion interrupts get lost:
In this case skbs may not be freed (or be freed too late) which may result in a TCP
stream getting stuck, because each skb belongs to a socket and there is a limit for
the allowed number of skbs per socket. TCP would only proceed if the number of pending
skbs falls under this limit again but since the tx completion irq is lost, the only thing
that could trigger the tx completion handler is another irq, e.g for a received packet.
At least this could explain what you observed.

Did you see the same issues with the patch before (the one that, as you wrote,
survived a whole night of stress testing)?

Lino