From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH] net/mlx5: Fix mlx5_get_vector_affinity function Date: Sun, 6 May 2018 09:43:12 +0200 (CEST) Message-ID: References: <20180505143838.GA12621@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Guenter Roeck Cc: Israel Rukshin , Max Gurtovoy , Matan Barak , Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org List-Id: linux-rdma@vger.kernel.org On Sun, 6 May 2018, Thomas Gleixner wrote: > On Sat, 5 May 2018, Guenter Roeck wrote: > > > -#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK > > > - mask = irq_data_get_effective_affinity_mask(&desc->irq_data); > > > -#else > > > - mask = desc->irq_common_data.affinity; > > > -#endif > > > - return mask; > > > + return desc->affinity_hint; > > NAK. > > Nothing in regular device drivers is supposed to ever fiddle with struct > irq_desc. The existing code is already a violation of that rule and needs > to be fixed, but not in that way. > > The logic here is completely screwed. affinity_hint is set by the driver, > so the driver already knows what it is. If the driver does not set it, then > the thing is NULL. And this completely insane fiddling with irq_desc is in MLX4 as well. Dammit, why can't people respect subsytem boundaries and just fiddle in everything just because they can? If there is something missing at the core level then please talk to the maintainers instead of hacking utter crap into your driver. Yours grumpy tglx