[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 18 Nov 2016 19:20:58 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jakub Kicinski <kubakici@...pl>
Cc: John Fastabend <john.fastabend@...il.com>, 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 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:
> > > On Fri, 18 Nov 2016 13:09:53 -0800, Jakub Kicinski wrote:
> > >> Looks very cool! :)
> > >>
> > >> On Fri, 18 Nov 2016 11:00:41 -0800, John Fastabend wrote:
> > [...]
> > >>
> > >> Is num_online_cpus() correct here?
> > >
> > > Sorry, I don't know the virto_net code, so I'm probably wrong. I was
> > > concerned whether the number of cpus can change but also that the cpu
> > > mask may be sparse and therefore offsetting by smp_processor_id()
> > > into the queue table below could bring trouble.
> > >
> >
> > 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 ;)
Powered by blists - more mailing lists