From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FFDEC531DC for ; Thu, 15 Aug 2024 00:20:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 00F0F81209; Thu, 15 Aug 2024 00:20:52 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 04qRNxSzwzH5; Thu, 15 Aug 2024 00:20:51 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 44E7F811AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1723681251; bh=pufS3tS+BnwIAS6fc5QK++rR+1brArYrZIVBTFl8H78=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=P85fLzzt4HWBCGzYrdUy+fU+xqvKUHLvcqlVDOnLJ2XbxHmNVb+Pbccv9DAhVJxwA qkz5yq+uKYdgWWsTMRL0AV4mX336iEcdeKjiDsGLtB4UPp2jwoxw95q1GkRCyLnx2L JTHswb+MunmtknFQd7b3QTNZrxNa+MmZc2vs6/YR7rz03q39HKw42jSE6EF3R5nCqS hi8am89v+EoyXnQfTkC/eoFfxYHfO+opUoctu1btWFWjEhYaNx+FX0/J8zYpdBRaV5 TMKWcyLdJWk/niF0oX+1EJg9xTqB6NfwB6rUmhA2KsVQ9rzg/ZBuBUU7vjRyRflHMt E/iaUURSbD/BA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 44E7F811AE; Thu, 15 Aug 2024 00:20:51 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 90AD21BF983 for ; Thu, 15 Aug 2024 00:20:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7DD68608F5 for ; Thu, 15 Aug 2024 00:20:50 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id aZMezdIKCxaj for ; Thu, 15 Aug 2024 00:20:50 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org D1BD1608F4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D1BD1608F4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by smtp3.osuosl.org (Postfix) with ESMTPS id D1BD1608F4 for ; Thu, 15 Aug 2024 00:20:49 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 92A5360EA2; Thu, 15 Aug 2024 00:20:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54EF3C32786; Thu, 15 Aug 2024 00:20:47 +0000 (UTC) Date: Wed, 14 Aug 2024 17:20:46 -0700 From: Jakub Kicinski To: Joe Damato Message-ID: <20240814172046.7753a62c@kernel.org> In-Reply-To: References: <20240812145633.52911-1-jdamato@fastly.com> <20240813171710.599d3f01@kernel.org> <20240814080915.005cb9ac@kernel.org> <701eb84c-8d26-4945-8af3-55a70e05b09c@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723681248; bh=FSrgGRb2+2F//PvIuCsVOMjuXhKEz50wuCkJVSwdb+I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rDPO14qKjJ1wnJ5ZxvYB9oMTm0/dws2WGAOGyl+hbv6KhS7THK4MgXl5q5cfVfsnq zgV9IHzFBohsEXiQzywZv65pzVGd9Qb+xnraM5bvU64DylyBf7QpsVihlIwMEttQ3G hzFh+IRclmhDON97ZiVB1HbgZKQSFjjFv58beXMeaJEM0ZnT9yFaK5ERXdF6zAHZaG 9z8P6BwK//xXongNDIzPn/rySWH5hk75m+HFbk6WeOIqRsOTBwBl2bv4AKKEHmyKy3 n3TduAjS4Thzq+grfjIa6nb6jrMEE6gF06O+/Hw606DJ/UlKnUS5tPJ5yeblHKnGZg 6Y/Aozow4NgSw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=rDPO14qK Subject: Re: [Intel-wired-lan] [RFC net-next 0/6] Cleanup IRQ affinity checks in several drivers X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sebastian Andrzej Siewior , Eric Dumazet , Tony Nguyen , Ziwei Xiao , Jeroen de Borst , Leon Romanovsky , "open list:MELLANOX MLX4 core VPI driver" , Przemek Kitszel , "moderated list:INTEL ETHERNET DRIVERS" , Paolo Abeni , Lorenzo Bianconi , Jiri Pirko , Shailend Chand , Harshitha Ramamurthy , Willem de Bruijn , Yishai Hadas , Daniel Borkmann , netdev@vger.kernel.org, open list , Tariq Toukan , Shay Drori , Praveen Kaligineedi , Saeed Mahameed , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, 14 Aug 2024 19:01:40 +0100 Joe Damato wrote: > If it is, then the only option is to have the drivers pass in their > IRQ affinity masks, as Stanislav suggested, to avoid adding that > call to the hot path. > > If not, then the IRQ from napi_struct can be used and the affinity > mask can be generated on every napi poll. i40e/gve/iavf would need > calls to netif_napi_set_irq to set the IRQ mapping, which seems to > be straightforward. It's a bit sad to have the generic solution blocked. cpu_rmap_update() is exported. Maybe we can call it from our notifier? rmap lives in struct net_device From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2BA9A35; Thu, 15 Aug 2024 00:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723681249; cv=none; b=GtFHbRv7L3a2L/p16Y9sZyFx2h8KoG372ne46QI754YP4U3ztOm1wkW9MlIqjhXdyQz82sV5HChbV1CfC28WBL9tRQpbKVDWciAkbTRUO7aiDtlxky/ff5u4KQpgv/VRuM2oIoUrpNk9p6EP9Aj+tcg0Mu8gZjToRN3bnuJAT2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723681249; c=relaxed/simple; bh=FSrgGRb2+2F//PvIuCsVOMjuXhKEz50wuCkJVSwdb+I=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k3+WJjEzZ7yOVMgf2uxa/WTeS79Ho5arksLldlLXzsdaoACQI6QH1iAgAVP+HHNKqi5Tikqi5NCj0YcopX5mPi3sTapt3HfEp0CWgtjBvwnOYT5SV13cDST///yNkmaJ9LfTq0URswsyYNVHn6v9NaaZ93O6VrI2cHhgFe4WK/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rDPO14qK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rDPO14qK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54EF3C32786; Thu, 15 Aug 2024 00:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723681248; bh=FSrgGRb2+2F//PvIuCsVOMjuXhKEz50wuCkJVSwdb+I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rDPO14qKjJ1wnJ5ZxvYB9oMTm0/dws2WGAOGyl+hbv6KhS7THK4MgXl5q5cfVfsnq zgV9IHzFBohsEXiQzywZv65pzVGd9Qb+xnraM5bvU64DylyBf7QpsVihlIwMEttQ3G hzFh+IRclmhDON97ZiVB1HbgZKQSFjjFv58beXMeaJEM0ZnT9yFaK5ERXdF6zAHZaG 9z8P6BwK//xXongNDIzPn/rySWH5hk75m+HFbk6WeOIqRsOTBwBl2bv4AKKEHmyKy3 n3TduAjS4Thzq+grfjIa6nb6jrMEE6gF06O+/Hw606DJ/UlKnUS5tPJ5yeblHKnGZg 6Y/Aozow4NgSw== Date: Wed, 14 Aug 2024 17:20:46 -0700 From: Jakub Kicinski To: Joe Damato Cc: Shay Drori , netdev@vger.kernel.org, Daniel Borkmann , "David S. Miller" , Eric Dumazet , Harshitha Ramamurthy , "moderated list:INTEL ETHERNET DRIVERS" , Jeroen de Borst , Jiri Pirko , Leon Romanovsky , open list , "open list:MELLANOX MLX4 core VPI driver" , Lorenzo Bianconi , Paolo Abeni , Praveen Kaligineedi , Przemek Kitszel , Saeed Mahameed , Sebastian Andrzej Siewior , Shailend Chand , Tariq Toukan , Tony Nguyen , Willem de Bruijn , Yishai Hadas , Ziwei Xiao Subject: Re: [RFC net-next 0/6] Cleanup IRQ affinity checks in several drivers Message-ID: <20240814172046.7753a62c@kernel.org> In-Reply-To: References: <20240812145633.52911-1-jdamato@fastly.com> <20240813171710.599d3f01@kernel.org> <20240814080915.005cb9ac@kernel.org> <701eb84c-8d26-4945-8af3-55a70e05b09c@nvidia.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 14 Aug 2024 19:01:40 +0100 Joe Damato wrote: > If it is, then the only option is to have the drivers pass in their > IRQ affinity masks, as Stanislav suggested, to avoid adding that > call to the hot path. > > If not, then the IRQ from napi_struct can be used and the affinity > mask can be generated on every napi poll. i40e/gve/iavf would need > calls to netif_napi_set_irq to set the IRQ mapping, which seems to > be straightforward. It's a bit sad to have the generic solution blocked. cpu_rmap_update() is exported. Maybe we can call it from our notifier? rmap lives in struct net_device