lkml.org 
[lkml]   [2022]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] net/mlx5e: Leverage sched_numa_hop_mask()
On Wed, 10 Aug 2022 15:57:33 +0300 Tariq Toukan wrote:
> > + for_each_cpu(cpu, mask) {
> > + cpus[i] = cpu;
> > + if (++i == ncomp_eqs)
> > + goto spread_done;
> > + }
> > + }
> > +spread_done:
> > + rcu_read_unlock();
> > ret = mlx5_irqs_request_vectors(dev, cpus, ncomp_eqs, table->comp_irqs);
> > kfree(cpus);
> > if (ret < 0)
>
> This logic is typical. Other drivers would also want to use it.
> It must be introduced as a service/API function, if not by the sched
> topology, then at least by the networking subsystem.
> Jakub, WDYT?

Agreed, no preference where the helper would live tho.

\
 
 \ /
  Last update: 2022-08-10 19:42    [W:0.067 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site