Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-08 Thread Antoine Tenart
Quoting Alexander Duyck (2021-01-08 23:04:57) > On Fri, Jan 8, 2021 at 10:58 AM Antoine Tenart wrote: > > > > Quoting Alexander Duyck (2021-01-08 17:33:01) > > > On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote: > > > > > > > > Quoting Alexander Duyck (2021-01-07 17:38:35) > > > > > On Thu, Ja

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-08 Thread Alexander Duyck
On Fri, Jan 8, 2021 at 10:58 AM Antoine Tenart wrote: > > Quoting Alexander Duyck (2021-01-08 17:33:01) > > On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote: > > > > > > Quoting Alexander Duyck (2021-01-07 17:38:35) > > > > On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart > > > > wrote: > > >

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-08 Thread Antoine Tenart
Quoting Alexander Duyck (2021-01-08 17:33:01) > On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote: > > > > Quoting Alexander Duyck (2021-01-07 17:38:35) > > > On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote: > > > > > > > > Quoting Alexander Duyck (2021-01-06 20:54:11) > > > > > On Wed, Ja

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-08 Thread Alexander Duyck
On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote: > > Quoting Alexander Duyck (2021-01-07 17:38:35) > > On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote: > > > > > > Quoting Alexander Duyck (2021-01-06 20:54:11) > > > > On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart > > > > wrote: > > >

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-08 Thread Antoine Tenart
Quoting Alexander Duyck (2021-01-07 17:38:35) > On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote: > > > > Quoting Alexander Duyck (2021-01-06 20:54:11) > > > On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote: > > > > That would require to hold rcu_read_lock in the caller and I'd like to >

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-07 Thread Alexander Duyck
On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote: > > Quoting Alexander Duyck (2021-01-06 20:54:11) > > On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote: > > > +/* Should be called with the rtnl lock held. */ > > > +static int xps_queue_show(struct net_device *dev, unsigned long **mask, >

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-07 Thread Antoine Tenart
Quoting Alexander Duyck (2021-01-06 20:54:11) > On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote: > > +/* Should be called with the rtnl lock held. */ > > +static int xps_queue_show(struct net_device *dev, unsigned long **mask, > > + unsigned int index, bool is_rxqs_map

Re: [PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-06 Thread Alexander Duyck
On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote: > > Most of the xps_cpus_show and xps_rxqs_show functions share the same > logic. Having it in two different functions does not help maintenance > and we can already see small implementation differences. This should not > be the case and this p

[PATCH net 3/3] net-sysfs: move the xps cpus/rxqs retrieval in a common function

2021-01-06 Thread Antoine Tenart
Most of the xps_cpus_show and xps_rxqs_show functions share the same logic. Having it in two different functions does not help maintenance and we can already see small implementation differences. This should not be the case and this patch moves their common logic into a new function, xps_queue_show