Subject: Re: [PATCH net-next] net: fix psock_fanout selftest hash collision

From: Daniel Borkmann <[email-masked]>
Date: Thu, 21 Mar 2013 07:31:34 +0100

On 03/21/2013 01:07 AM, Willem de Bruijn wrote:
> On Wed, Mar 20, 2013 at 1:59 PM, David Miller <[email-masked]> wrote:
>> From: David Miller <[email-masked]>
>> Date: Wed, 20 Mar 2013 12:33:44 -0400 (EDT)
>>
>>> From: Willem de Bruijn <[email-masked]>
>>> Date: Wed, 20 Mar 2013 02:42:44 -0400
>>>
>>>> Fix flaky results with PACKET_FANOUT_HASH depending on whether the
>>>> two flows hash into the same packet socket or not.
>>>>
>>>> Also adds tests for PACKET_FANOUT_LB and PACKET_FANOUT_CPU and
>>>> replaces the counting method with a packet ring.
>>>>
>>>> Signed-off-by: Willem de Bruijn <[email-masked]>
>>>
>>> Applied, thanks.  I'll retest on my sparc64 box later today.
>>
>> Unfortunately, it's still broken there:
>
> This looks like a new problem. Now the counters all stay zero.
>
> I am looking into it. I have not been able to reproduce this on my
> x86_64 so far, so just brought a sparc32 up in qemu. Had less luck
> with sparc64, but impressive that it works at all. Come to think of
> it, is this a 64-bit kernel with 32-bit userland? Perhaps that
> affects packet ring memory layout.

That can affect the ring buffer in case of TPACKET_V1, which is default
if not specified otherwise. See Documentation/networking/packet_mmap.txt +514