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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 ECB96E7718B for ; Fri, 20 Dec 2024 17:24:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8644E411D0; Fri, 20 Dec 2024 17:24:03 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XbdjQ-yyzRMP; Fri, 20 Dec 2024 17:24:02 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1A31341107 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1734715442; bh=awsQ/gNYz1QtesuPL69Uj9xf6MovyTW2G/UtONLIztk=; h=Date:From:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pGW8DM3jSuh6g4lurbC50jhIilG9enC1cW3aRbOJtZvHfwMrTrXPa2JhuNCGn6Bm5 fDBzHM059sl4vgt/d2ii2m2Sy6ceOm9jkuPvAn3UhdeQ9jjKv4PFjfu6585bDVqFa4 wAHgulnZ9Q3qv8ugl97UT7UQFA2egeAIKWA+umO7430Pi6eFufsFAq7z/ab/VBMCzz /+Bkf+a5zGozEE2CzrUCHfNyHC+t+y0hAyU7etsu5wbH/ygFZkWhorKz1WuCl47qJv cDqc7HOkV7V03vLoanGgpCDueJkTAFuQXcIneGDhqKqjPlkJAdSLaIsGaz4x6hbQeC sbmSuaBFWOuaQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 1A31341107; Fri, 20 Dec 2024 17:24:02 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 6632B920 for ; Fri, 20 Dec 2024 17:24:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4681B83BB9 for ; Fri, 20 Dec 2024 17:24:00 +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 Pp4RppOIyiAe for ; Fri, 20 Dec 2024 17:23:59 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=147.75.193.91; helo=nyc.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 979A283BCD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 979A283BCD Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by smtp1.osuosl.org (Postfix) with ESMTPS id 979A283BCD for ; Fri, 20 Dec 2024 17:23:59 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 96F34A40486; Fri, 20 Dec 2024 17:22:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49EBAC4CECD; Fri, 20 Dec 2024 17:23:57 +0000 (UTC) Date: Fri, 20 Dec 2024 09:23:56 -0800 From: Jakub Kicinski To: Ahmed Zaki Cc: , , , , , , , , , , , , Message-ID: <20241220092356.69c9aa1e@kernel.org> In-Reply-To: References: <20241218165843.744647-1-ahmed.zaki@intel.com> <20241218165843.744647-5-ahmed.zaki@intel.com> <20241219194237.31822cba@kernel.org> 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=1734715437; bh=y87VLdF5d2f4POgxkE6UMOkUIbV8zOdiEIsbrBIDqt8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KfORZ6fi8IYAwyWtbtHd8LiOE50f04K6XjDeWVvCaHMcL+k+y/5xq65UIi9jlPSoq a/aEhq+ECtQF7yI/NbwZtOlYW/JePiBZdRgfJzPYrO8P9pKnF7ZKjKwOQBqoY4tR0K koD3HF9fqAsS7uvDIBrbaFQr6zCGIBG1lL3rEBpEGJnqADPkciA/CdXs/YgGw8QDvO WCuBhaqpJOz/3FasBXgSF6jTYNqf8s7E25njMGGWtp7MpOTxXX+VG89vt2gEW9lfYr g3UbMLnzsXT69XmAuT1f47Lh1YvW2ICWs47C74IJMhmqCU5ewfzuU+zPYzAY/BmBb/ sNuMJl9Q3+YfA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KfORZ6fi Subject: Re: [Intel-wired-lan] [PATCH net-next v2 4/8] net: napi: add CPU affinity to napi->config X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Fri, 20 Dec 2024 07:51:09 -0700 Ahmed Zaki wrote: > On 2024-12-19 8:42 p.m., Jakub Kicinski wrote: > > On Wed, 18 Dec 2024 09:58:39 -0700 Ahmed Zaki wrote: > >> + if (!glue_created && flags & NAPIF_IRQ_AFFINITY) { > >> + glue = kzalloc(sizeof(*glue), GFP_KERNEL); > >> + if (!glue) > >> + return; > >> + glue->notify.notify = netif_irq_cpu_rmap_notify; > >> + glue->notify.release = netif_napi_affinity_release; > >> + glue->data = napi; > >> + glue->rmap = NULL; > >> + napi->irq_flags |= NAPIF_IRQ_NORMAP; > > > > Why allocate the glue? is it not possible to add the fields: > > > > struct irq_affinity_notify notify; > > u16 index; > > > > to struct napi_struct ? > > In the first branch of "if", the cb function netif_irq_cpu_rmap_notify() > is also passed to irq_cpu_rmap_add() where the irq notifier is embedded > in "struct irq_glue". I don't understand what you're trying to say, could you rephrase? > I think this cannot be changed as long as some drivers are directly > calling irq_cpu_rmap_add() instead of the proposed API. Drivers which are not converted shouldn't matter if we have our own notifier and call cpu_rmap_update() directly, no? Drivers which are converted should not call irq_cpu_rmap_add().