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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1CD28CCFA07 for ; Mon, 3 Nov 2025 10:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iHrOgEgzQLtXqfjmHDjsKinl4MI7A2M2jyU12+oKmNw=; b=HCJtvln4JUbbQmpmemW4r+Xt0X fZJHt5XNKZxM4BfY5ktE+4K4w5oBxSJdtcEhPlkhogCs0PVVtChZO4v6JT2iaaA42JsHHBZaQ3TkV OM0VCKQ9r30arBftDPmsdr66PifH7iBj7UioFXDaagJACFITcjnsOhfynw8V1mCMEDS4UVEL1muE9 LNMDYHbvH/GYUu/dCXqCuoxolvEx1NSt4vHmi8GbNb9zy7ZcxfGGAsAw6ILZf5hwG9pLDGXBpzVJT R5boRfFUIrHWZhLUbHCf7m91UzsoaEo3f0Bgq8uVoAd4SKfsIzciF4X/tNaFc+2X+mYe4hjreqQtt dSsPVr9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vFrnW-00000009d4z-13rV; Mon, 03 Nov 2025 10:28:26 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vFrnS-00000009d1h-4C4d; Mon, 03 Nov 2025 10:28:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id AB06240851; Mon, 3 Nov 2025 10:28:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33422C4CEF8; Mon, 3 Nov 2025 10:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762165702; bh=R6HeLI7JDCTVZupquML/vCC+pYaZ4S+yt8pXUQACxto=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JMBbxG/JFgkLStq6fa/BiyXiO80VoBi0IRsp5hFdV4bD/jmiAOs/xvHFFRH+hTQAS 0XRYH9LPnap6RvzNJp9cFYDkM9VTqIMSUOMcF3Yq357jKRJaMfI81HGOFtKJUIA0W/ +JkUwtYjIvridOy0V95he6RZCzT9IE5aTqtPJT0KR3Zn/JOMQtXHS5J47RndaxmkVr wTiAX99PqI4r40+Fh8sggDUoW4HKMObmjgV15WT8dJjBL7LVfPp/gN0jTMAuqneOo+ UkObvOY7iRU4UhdCqPUoAJKIzYK4pAMvlaEQsgJz3CTjNMhvNXQxPfNRhctwWDONjS 9u0t3+g8qUX8Q== From: Lorenzo Bianconi Date: Mon, 03 Nov 2025 11:27:56 +0100 Subject: [PATCH net-next 2/2] net: airoha: Reorganize airoha_queue struct MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251103-airoha-tx-linked-list-v1-2-baa07982cc30@kernel.org> References: <20251103-airoha-tx-linked-list-v1-0-baa07982cc30@kernel.org> In-Reply-To: <20251103-airoha-tx-linked-list-v1-0-baa07982cc30@kernel.org> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251103_022823_066105_0DC1959E X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Do not allocate memory for rx-only fields for hw tx queues and for tx-only fields for hw rx queues. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/airoha/airoha_eth.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h index fbbc58133364baefafed30299ca0626c686b668e..750dd3e5dfecb5d3d0ff754f6a92ffa000db3343 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h @@ -185,19 +185,27 @@ struct airoha_queue { spinlock_t lock; struct airoha_queue_entry *entry; struct airoha_qdma_desc *desc; - u16 head; - u16 tail; int queued; int ndesc; - int free_thr; - int buf_size; struct napi_struct napi; - struct page_pool *page_pool; - struct sk_buff *skb; - struct list_head tx_list; + union { + struct { /* rx */ + u16 head; + u16 tail; + int buf_size; + + struct page_pool *page_pool; + struct sk_buff *skb; + }; + + struct { /* tx */ + struct list_head tx_list; + int free_thr; + }; + }; }; struct airoha_tx_irq_queue { -- 2.51.1