Received: by 10.192.165.148 with SMTP id m20csp1852089imm; Sun, 6 May 2018 00:45:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqhp+Q1igMOzLbQvLQuUoKoRhTH52NQRi6U87ib4lWXlKQE7nh2f9RivvsrHnVTHKuOAsfu X-Received: by 2002:a17:902:ab93:: with SMTP id f19-v6mr33440625plr.392.1525592724795; Sun, 06 May 2018 00:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525592724; cv=none; d=google.com; s=arc-20160816; b=l+LTLNqDugPivv8OlAsZc7wQoRUwbvG5tzr+6wP1q1IDeQxJoBkXOC+uAbtw46PveY d1K1r5Efb4UlBYWLwmXMGR+qL4xxnxE97HY4x3yjBwCZV5tUHPsg9KKvd4yrQ8AP005A CRl4bmm9GOD1fCSlvBFIZR8vruGzk76ZKu0lQB8P8nTiqEIX8nkVdafxYclOfRroolgQ 6dggx1/GuCkxNkNRJd0mGnMibWw/eCFammimgpNZK+pSJww/9+7BGIYQnqIwPCld1oJL ffDb75yEU8woCqNeD7oFNbbwN0jmX0mc9M4xAwC+dARiLACdU4O4RN53NwDqIQz381Dx IgDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=XfjtHg+fQ/l/uizSb8YwB08njUdz2a8qBjFyL9NZVz4=; b=jIXlRFRHkaQkAY65Il7O2hJ3S1FW35feSVjC0l1wEKz6A13g8pXJdgUB6f4gun2JYz 4PwmAgyKYdkRVNhZ/CMjeNC3l8d3lct3UlOom2KfmooQOPjQsl8993tGSz2ih2myOoHc OSfFHOgTFltwzwubUEaYtcWiKY3GjkZaFXoyQQoV4xexjmh2dLa2MrEQP6dUL7g/VGQR XOTDFTmDeJqRhrclP+N++KHeW4GWELBeKLCUaQVFuGaE578176ZAiEtV5U5A4JIc0Az/ szuVXHOjGasX0fV0BuLHNyca523UYzb2kqZH1RBMeP44QusqCJnHZ4ysGWZxi6YlrA++ guUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3-v6si9170819pld.45.2018.05.06.00.45.10; Sun, 06 May 2018 00:45:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbeEFHnX (ORCPT + 99 others); Sun, 6 May 2018 03:43:23 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47133 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeEFHnU (ORCPT ); Sun, 6 May 2018 03:43:20 -0400 Received: from p57927711.dip0.t-ipconnect.de ([87.146.119.17] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fFEK9-0004cM-6y; Sun, 06 May 2018 09:43:13 +0200 Date: Sun, 6 May 2018 09:43:12 +0200 (CEST) From: Thomas Gleixner 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 Subject: Re: [PATCH] net/mlx5: Fix mlx5_get_vector_affinity function In-Reply-To: Message-ID: References: <20180505143838.GA12621@roeck-us.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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