Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp79119rdb; Fri, 26 Jan 2024 20:12:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi0UGI1XOvBAWc5vTc/fsmn014p6kgu/Hm2gCPYNOPOvip7hyBx3BR6xAswvpg1rDRT626 X-Received: by 2002:a25:f506:0:b0:dc2:2598:2e40 with SMTP id a6-20020a25f506000000b00dc225982e40mr959503ybe.129.1706328772774; Fri, 26 Jan 2024 20:12:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706328772; cv=pass; d=google.com; s=arc-20160816; b=YfB4ayK/k2PAoisbtxDKr5TfzZVq3Pn5ddeZf6LKuC5m0m2shgypFRfMfO8UwP9toe IJNW1YWWr6u+/7A4WtQ5aO/ZVBGtbPjIPbmUjdJg1J3W86RUMau3EY5M/i7V+pIvxjbQ usPFuVCpQ312bpyWl81av9VGp7bbnzv5XzsNbpjEmcHym4f6Tt37GEYigaxqQYY1CstK gI7Xh0xAN5bxnfOsnN+o6TENfm5o8V5uvyFk1kcD9vXhN4PsP/0rzSD4owLKQyL8YAUN YOhfAYSidp4Y9QRU0sNsxo7rfVoMmMNIzIxVLBuW0TOtep7cbM/ermmiu6DWoVO7tI23 bnqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=35qSJVwIu0+27MSUt9Bpxs0xyVqGFH5tZvlgaHsqyx8=; fh=p36MzhksjyrQP8UVrj/w1y/OYb1NKbvLN3LzitIfoNM=; b=pGBdRvUr5WD5IazU92N/Lf1oxLv+pGYj9/PnMJtL+mxCTIlH3Qcg7RBBCMkRokLWXu vOdDs0gaK/xiPhg/SFpzsVhBInosZTd4luXPg4xxiWfZPJbwq5gpAcDoZ2xv6csmLwyK qFYhe2eHphCvOL8XHysbH/oSBe67egq2OPwS5s8PzXDdy+pdNV/WEau5Dxj/JzOa+jGE woFHDs+n9TVQmiqLhSXuOcLOGYVW3H4F6nzEDracvmFcGAJgiHU04J1PXTZrYurvLqzp K9/xIgtT9rRzWaPsMHS/yo2m9gY8vWMC8RaiwiwMo0GytTrkZzLkQr0Ad2t/LDF/eek7 Z6DA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CfIxG8NW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41055-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 17-20020a630211000000b005d4f48500easi2176875pgc.475.2024.01.26.20.12.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 20:12:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41055-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CfIxG8NW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41055-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B114C28C3D0 for ; Sat, 27 Jan 2024 04:05:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8435D1B96D; Sat, 27 Jan 2024 04:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CfIxG8NW" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (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 27DA71C6B3; Sat, 27 Jan 2024 04:05:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.55.52.115 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706328308; cv=none; b=VZTmQ/oq9j3rk65Go51mYC2LvgPqtgmFdo1w595jg+CH7xkvzcHPovVoVUvW+nZJs1sPtJB8vAn/yKPTvw6BjNUKfnqmiEsnP4ZJ+ZzrAyAP1ZH6ptr1vkj+u3g1sVNftmZLmKMBrl31fMzRk2975iCP0+FNXSnLzMixSD21i60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706328308; c=relaxed/simple; bh=eCcylmKuGhzpjVUqVE5u3nCimW0l3ydQAg3Bgrb9n4U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aujl3vZKJ5bqkL0dIJRBqUS/GdZAQu9iEuPvl4FaO/SuvMLcF21ZNxvpzVXN80sULBORKL+We6gitQmq1UtulE/IUDS0C3HOJkENkxTXp1mn5uat753/p0FVUFRGFYe0k8WSBUD+SZy/1JhZ2KTyearwlWSokQ+eQm1uyHPwXus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=CfIxG8NW; arc=none smtp.client-ip=192.55.52.115 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706328307; x=1737864307; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eCcylmKuGhzpjVUqVE5u3nCimW0l3ydQAg3Bgrb9n4U=; b=CfIxG8NWEBSj6NkIl90iCENNmQ3Lftrnyb8B18PTozq7e1IrnB4mjZiR l/WzTXGcJVYbfAz9NpZ8psZYfsIQPZ9DzZSq0yhnyxT/jaaqH4fA2V+gv i5mtrW0sl6tFJe+mBldlxyAveDtTP78tO7mx+WrujLWx4zM0p0GwaZahH s16CrV+vK0i2QSqSUImRiVLA2UmVENkVKTasFdTXZcDO1CRYWmTSTBbYQ +IlnrsRjzFZxk/smzOr3KXLFyPN47a70O1pVUTMSSEA3dbEcAIjV+LCXd efkN/pVn7nT/FkMdXgih045x40eS3jjz6E+H6tLfRg3KTN7HXy9x4MtWv g==; X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="402289664" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="402289664" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 20:05:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="787309861" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="787309861" Received: from ppglcf2090.png.intel.com ([10.126.160.96]) by orsmga002.jf.intel.com with ESMTP; 26 Jan 2024 20:05:00 -0800 From: Rohan G Thomas To: "David S . Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Giuseppe Cavallaro , Richard Cochran , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Serge Semin Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Rohan G Thomas Subject: [PATCH net-next 2/3] net: stmmac: est: Per Tx-queue error count for HLBF Date: Sat, 27 Jan 2024 12:04:42 +0800 Message-Id: <20240127040443.24835-3-rohan.g.thomas@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20240127040443.24835-1-rohan.g.thomas@intel.com> References: <20240127040443.24835-1-rohan.g.thomas@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Keep per Tx-queue error count on Head-Of-Line Blocking due to frame size(HLBF) error. The MAC raises HLBF error on one or more queues when none of the time Intervals of open-gates in the GCL is greater than or equal to the duration needed for frame transmission and by default drops those packets that causes HLBF error. EST_FRM_SZ_ERR register provides the One Hot encoded Queue numbers that have the Frame Size related error. Signed-off-by: Rohan G Thomas --- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_est.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index d8d2a90fd228..70bef7811c91 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -203,6 +203,7 @@ struct stmmac_extra_stats { unsigned long mtl_est_btre; unsigned long mtl_est_btrlm; unsigned long max_sdu_txq_drop[MTL_MAX_TX_QUEUES]; + unsigned long mtl_est_txq_hlbf[MTL_MAX_TX_QUEUES]; /* per queue statistics */ struct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES]; struct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES]; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c index 4da6ccc17c20..c9693f77e1f6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_est.c @@ -81,6 +81,7 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev, u32 status, value, feqn, hbfq, hbfs, btrl, btrl_max; void __iomem *est_addr = priv->estaddr; u32 txqcnt_mask = BIT(txqcnt) - 1; + int i; status = readl(est_addr + EST_STATUS); @@ -125,6 +126,11 @@ static void est_irq_status(struct stmmac_priv *priv, struct net_device *dev, x->mtl_est_hlbf++; + for (i = 0; i < txqcnt; i++) { + if (feqn & BIT(i)) + x->mtl_est_txq_hlbf[i]++; + } + /* Clear Interrupt */ writel(feqn, est_addr + EST_FRM_SZ_ERR); -- 2.26.2