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
| ||
|
Date: Sat, 19 Nov 2016 13:33:31 -0800 From: John Fastabend <john.fastabend@...il.com> To: Jakub Kicinski <kubakici@...pl>, Eric Dumazet <eric.dumazet@...il.com> Cc: tgraf@...g.ch, shm@...ulusnetworks.com, alexei.starovoitov@...il.com, daniel@...earbox.net, davem@...emloft.net, john.r.fastabend@...el.com, netdev@...r.kernel.org, bblanco@...mgrid.com, brouer@...hat.com Subject: Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues On 16-11-18 07:23 PM, Jakub Kicinski wrote: > On Fri, 18 Nov 2016 19:20:58 -0800, Eric Dumazet wrote: >> On Fri, 2016-11-18 at 18:57 -0800, Jakub Kicinski wrote: >>> On Fri, 18 Nov 2016 18:43:55 -0800, John Fastabend wrote: >>>> On 16-11-18 06:10 PM, Jakub Kicinski wrote: >> [...] >>>> >>>> Seem like a valid concerns to me how about num_possible_cpus() instead. >>> >>> That would solve problem 1, but could cpu_possible_mask still be sparse >>> on strange setups? Let me try to dig into this, I recall someone >>> (Eric?) was fixing similar problems some time ago. >> >> nr_cpu_ids is probably what you want ;) > > Thank you :) > Yep poked around a bit and the common pattern seems to be to use nr_cpu_ids to build a cpu array and then index it with smp_processor_id(). So I'll do this as well. Although I'm not sure I entirely follow on the x86 platforms at least how/if nr_cpu_ids != num_possible_cpus(). Nice catch Jakub. Thanks, John
Powered by blists - more mailing lists