From patchwork Sun Mar 9 10:46:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Abdul Rahim, Faizal" X-Patchwork-Id: 14008330 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 B2F80C282D1 for ; Sun, 9 Mar 2025 11:00:58 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YcmIKZXLQukbVhSf/JNgXSh7TbSilucKt3VmMFcpj+s=; b=ihGYuig2P1H92U2pn8P3ducbEG QW9NmOFIwwRfzD8gk+YckAgbsujWCwaT47EdZxKcWYNRm+LNDUSKOY1Tx0V4DlErNK0SFynaEhNFB 4hg9NFjo3LRHFsaB9C+BWaAK6e3wPdsvi4e71ewEz159Zd3Zm/foKAQtLtfezysvRQ7i1RXzpDUPQ 9bJf8YnxUtZ4yyPgYGFvU7Hdy9cVUsCW88ArLgnmXAEfPVBn7OFrI+Y4B4CC7pfQS/dp7huqwC6Ls N8KqjNuBtxZNYGqFDdwJK31bMr88KTVIiSvAhEcw2lQfmwiGvQVpMSPqCl/AChw8ppRXnKMyL5W85 4b84Kluw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1trEOm-00000000PeU-0R55; Sun, 09 Mar 2025 11:00:48 +0000 Received: from mgamail.intel.com ([198.175.65.16]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1trECj-00000000OA9-1ciE for linux-arm-kernel@lists.infradead.org; Sun, 09 Mar 2025 10:48:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741517302; x=1773053302; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=Ij2fIraKDwf5/gzdQZNpLgFH8xiF4vMpUeJsnouOpmo=; b=U850VBpe1CVimmQCwE+KJOA8gMZrEQXnZBH+cQsAVYdfIBmsVgQnTZTZ 3bQ0fifKy5HSQRAiMt7CPWKU/GZtKzxlNi93G2DYwF5su3GtUqLHv5Cow 1PMohzwhyEoa99/KRIkwfIfaK3aOyqbc6cHMjupyiGhaVqTCeCzdKMl9K i9wzD64z+cqmvse7Lt0KXnqpFJghnay/sRk/kKlbU2TmOsNc+qa0wgUoR ml1ey+7Xm7JOKxOXKtwprSmrcvpwOubCa+xoIYy7F52QUZWBn10UG4O0F 5Ddt66RPhwu3Orp7u5dSOXl49/2nx2OQL1w6ooYH/HNOsJrbrW11Kk7K4 Q==; X-CSE-ConnectionGUID: cLNCSZSiQPyUu9VIlA8CmQ== X-CSE-MsgGUID: J4P3A/gNQIKzSJZbBr/cmw== X-IronPort-AV: E=McAfee;i="6700,10204,11367"; a="42636117" X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="42636117" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2025 03:48:21 -0700 X-CSE-ConnectionGUID: qUiAYvO5T/msA+rP2OOg+w== X-CSE-MsgGUID: p13HVF5gQh6tQD9QU4MA+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="124655099" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by orviesa003.jf.intel.com with ESMTP; 09 Mar 2025 03:48:13 -0700 From: Faizal Rahim To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Simon Horman , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Russell King , Vladimir Oltean , Serge Semin , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , Choong Yong Liang , Chwee-Lin Choong , Faizal Rahim , Kunihiko Hayashi , Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Subject: [PATCH iwl-next v9 07/14] igc: optimize TX packet buffer utilization for TSN mode Date: Sun, 9 Mar 2025 06:46:41 -0400 Message-Id: <20250309104648.3895551-8-faizal.abdul.rahim@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> References: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250309_034821_475449_DB01C4B4 X-CRM114-Status: GOOD ( 12.17 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In preparation for upcoming frame preemption patches, optimize the TX packet buffer size. The total packet buffer size (RX + TX) is 64KB, with a maximum of 34KB for either RX or TX. Split the buffer evenly, allocating 32KB to each. For TX, assign 7KB to each of the four TX packet buffers (total 28KB) and reserve 4KB for BMC. References: I225/I226 SW User Manual Section 4.7.9, Section 8.3.2 Co-developed-by: Vinicius Costa Gomes Signed-off-by: Vinicius Costa Gomes Signed-off-by: Faizal Rahim --- drivers/net/ethernet/intel/igc/igc_defines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index b180e1497cc5..db937931c646 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -419,8 +419,8 @@ IGC_TXPB0SIZE(20) | IGC_TXPB1SIZE(0) | IGC_TXPB2SIZE(0) | \ IGC_TXPB3SIZE(0) | IGC_OS2BMCPBSIZE(4)) #define IGC_TXPBSIZE_TSN ( \ - IGC_TXPB0SIZE(5) | IGC_TXPB1SIZE(5) | IGC_TXPB2SIZE(5) | \ - IGC_TXPB3SIZE(5) | IGC_OS2BMCPBSIZE(4)) + IGC_TXPB0SIZE(7) | IGC_TXPB1SIZE(7) | IGC_TXPB2SIZE(7) | \ + IGC_TXPB3SIZE(7) | IGC_OS2BMCPBSIZE(4)) #define IGC_DTXMXPKTSZ_TSN 0x19 /* 1600 bytes of max TX DMA packet size */ #define IGC_DTXMXPKTSZ_DEFAULT 0x98 /* 9728-byte Jumbo frames */