[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdb64b21-a590-8c4f-50b1-757302d7b528@pobox.com>
Date: Thu, 24 Nov 2016 10:24:51 -0500
From: Mark Lord <mlord@...ox.com>
To: Hayes Wang <hayeswang@...ltek.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: nic_swsd <nic_swsd@...ltek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable
On 16-11-24 08:26 AM, Hayes Wang wrote:
..
> Besides, it doesn't seem to occur for all platforms. I have
> tested the iperf more than 26 hours, and it still works fine.
> I think I would get the same result on x86 or x86_64 platform.
..
x86 has near fully-coherent memory, so it is the "easy" platform
to get things working on. But Linux supports a very diverse number
of platforms, with varying degrees of cache/memory coherency,
and it can be tricky for things to work correctly on all of them.
If you are testing with the driver as currently in 4.4.34,
then you won't even notice when things are screwing up,
because the driver just silently drops packets.
Or it passes them on without noticing that they have bad data.
Here (attached) is the instrumented driver I am using here now.
I suggest you use it or something similar when testing,
and not the stock driver.
This one has also been converted to use non-cacheable RAM for the
receive buffers -- something that is probably a Good Thing
for it to do regardless of this investigation.
It also never drops a packet without logging the event,
so we can see just how often there's an issue.
This version behaves almost perfectly here, but I am still experimenting
to see what is actually necessary, and what is not. In particular,
there are some mb() calls I had put in there that shouldn't be required,
so I have yet to try removing them again and see what changes.
It takes at least an overnight run to pop up one or two errors,
so do expect to hear back again until after the weekend at this point.
Also, unrelated, but inside r8152_submit_rx() there is this code:
/* The rx would be stopped, so skip submitting */
if (test_bit(RTL8152_UNPLUG, &tp->flags) ||
!test_bit(WORK_ENABLE, &tp->flags) || !netif_carrier_ok(tp->netdev))
return 0;
If that "return 0" statement is ever executed, doesn't it result
in the loss/leak of a buffer?
Thanks
View attachment "r8152.c" of type "text/x-csrc" (102578 bytes)
Powered by blists - more mailing lists