lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Feb 2018 14:28:21 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     linux-kernel@...r.kernel.org,
        John Fastabend <john.fastabend@...il.com>,
        netdev@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [RFC PATCH v2] ptr_ring: linked list fallback



On 2018年02月28日 12:09, Michael S. Tsirkin wrote:
>>> Or we can add plist to a union:
>>>
>>>
>>> struct sk_buff {
>>>           union {
>>>                   struct {
>>>                           /* These two members must be first. */
>>>                           struct sk_buff          *next;
>>>                           struct sk_buff          *prev;
>>>                           union {
>>>                                   struct net_device       *dev;
>>>                                   /* Some protocols might use this space to store information,
>>>                                    * while device pointer would be NULL.
>>>                                    * UDP receive path is one user.
>>>                                    */
>>>                                   unsigned long           dev_scratch;
>>>                           };
>>>                   };
>>>                   struct rb_node  rbnode; /* used in netem & tcp stack */
>>> +		struct plist plist; /* For use with ptr_ring */
>>>           };
>>>
>> This look ok.
>>
>>>> For XDP, we need to embed plist in struct xdp_buff too,
>>> Right - that's pretty straightforward, isn't it?
>> Yes, it's not clear to me this is really needed for XDP consider the lock
>> contention it brings.
>>
>> Thanks
> The contention is only when the ring overflows into the list though.
>

Right, but there's usually a mismatch of speed between producer and 
consumer. In case of a fast producer, we may get this contention very 
frequently.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ