Messages in this thread | | | Date | Wed, 10 Aug 2022 10:42:09 -0700 | From | Jakub Kicinski <> | Subject | Re: [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.
| |