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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 2005FD19503 for ; Mon, 26 Jan 2026 16:52:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C61AE60C2E; Mon, 26 Jan 2026 16:52:23 +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 zp_iJu7GJSQG; Mon, 26 Jan 2026 16:52:23 +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 smtp3.osuosl.org 01D0160C1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1769446343; bh=y/ZLXg/bukRRC9lfu2j5gYFIwAJwqmvfj4ggjQwJ9TU=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U6ZR8Qk/MXQdJfNEItK8slJVgvg8leMgJcSDm/gkK+NLS10H7yuLF1peZm9azp1p5 0i1tO+2UaWUwhJt7JZnEfhv3iyC5Yz0LZoGFPZRmECjbmaEhmBEaZIdIpjzqSQ7fvF EgS4NtbB9qNTfACzaRQB9C5z7uOvs0IyqMx7083FdXVl1gZlncQoXC39LLQJgmAbNT BMilKridxy+++gpQvmkciivbcsggWWKkCXlwD6YKN3qsFmojHH4f1fnrZlXq8C6NNq pbnHd234c8KHL8hIENjJ1LUNCWZh7Fwt8ApHElP53SaeDtqTl9mrwET4ymv7qrg8Od QMnroAiUPxvqg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 01D0160C1E; Mon, 26 Jan 2026 16:52:23 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 81794355 for ; Mon, 26 Jan 2026 16:52:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 70BA940912 for ; Mon, 26 Jan 2026 16:52:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id y9NatDVHjkki for ; Mon, 26 Jan 2026 16:52:20 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=141.14.17.11; helo=mx3.molgen.mpg.de; envelope-from=pmenzel@molgen.mpg.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org C5B8740817 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C5B8740817 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by smtp2.osuosl.org (Postfix) with ESMTPS id C5B8740817 for ; Mon, 26 Jan 2026 16:52:18 +0000 (UTC) Received: from [192.168.2.221] (p57bd931f.dip0.t-ipconnect.de [87.189.147.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id BFB144C4430092; Mon, 26 Jan 2026 17:51:37 +0100 (CET) Message-ID: <4eae4d1a-8043-4186-bd38-87f47dd35eda@molgen.mpg.de> Date: Mon, 26 Jan 2026 17:51:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Haoxiang Li Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org References: <20260125140423.2077845-1-lihaoxiang@isrc.iscas.ac.cn> Content-Language: en-US From: Paul Menzel In-Reply-To: <20260125140423.2077845-1-lihaoxiang@isrc.iscas.ac.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Subject: Re: [Intel-wired-lan] [PATCH] i40e: add an error handling path in i40e_xsk_pool_enable() 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" Dear Haoxiang, Thank you for your patch. Am 25.01.26 um 15:04 schrieb Haoxiang Li: > In i40e_xsk_pool_enable(), the memory allocated by > xsk_pool_dma_map() should be released if some error occurs. Add an > error handling path to do so. (Please be aware to use the fully allowed text width of 75 characters per line. (It wouldn’t save a line here though.)) Please add a Fixes: tag. > Signed-off-by: Haoxiang Li --- drivers/ > net/ethernet/intel/i40e/i40e_xsk.c | 12 ++++++++---- 1 file changed, > 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/ > net/ethernet/intel/i40e/i40e_xsk.c index 9f47388eaba5..92b853a75b28 > 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/ > drivers/net/ethernet/intel/i40e/i40e_xsk.c @@ -108,23 +108,27 @@ > static int i40e_xsk_pool_enable(struct i40e_vsi *vsi, if > (if_running) { err = i40e_queue_pair_disable(vsi, qid); if (err) - > return err; + goto unmap; > > err = i40e_realloc_rx_xdp_bi(vsi->rx_rings[qid], true); if (err) - > return err; + goto unmap; > > err = i40e_queue_pair_enable(vsi, qid); if (err) - return err; + > goto unmap; > > /* Kick start the NAPI context so that receiving will start */ err = > i40e_xsk_wakeup(vsi->netdev, qid, XDP_WAKEUP_RX); if (err) - > return err; + goto unmap; } > > return 0; + +unmap: + xsk_pool_dma_unmap(pool, I40E_RX_DMA_ATTR); + > return err; } > > /** Reviewed-by: Paul Menzel Kind regards, Paul