From patchwork Mon Aug 12 09:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 11089531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B707F17E9 for ; Mon, 12 Aug 2019 09:46:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5259200E5 for ; Mon, 12 Aug 2019 09:46:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96F1527F2B; Mon, 12 Aug 2019 09:46:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E4FC200E5 for ; Mon, 12 Aug 2019 09:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=5fr6PTrDz/dMilx+mCV1TeyVjuBjdcEnTI3Urhgh2io=; b=bmFZdr+m0Zj1oUSQhVlDoA9mLN +GRhH5CBogkdemjlo5IBycxirz56eeHMqSGC4tOJGjvN64ZcQdfBcw5vQU+KdXBWSBVw+MBpFXbkh WkyqgIWhQEoAT+WxXm5jN8IXd4V3fx0HtOieS9GKKVox1C+dMmLYqoDDOiqX2Sf1tjMZPkflLiHK1 1tHAObc6nzJvfQjmMDnmmPVw1fWOIE+cVZ6x3qh9vSXfU8M+sJrxOgEoSLjodtD5wP6tY5eHuDeYi oGi9jMisWhkNqjwdi4Xvb2FIXiEuh/H/2sAVWen8vGWaDZ8eeH0kJOOZXPke9k+MHNTET33GDn2A/ SbVn+Qfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hx6uM-0004L4-N0; Mon, 12 Aug 2019 09:46:31 +0000 Received: from dc8-smtprelay2.synopsys.com ([198.182.47.102] helo=smtprelay-out1.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hx6sN-0001Ph-1a for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2019 09:44:31 +0000 Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 7FDFAC21DD; Mon, 12 Aug 2019 09:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1565603065; bh=Mu5FfcCMExtM/+NUUyaIoYWn4U1FuWhjBdmEdKgXuvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=Dc2AUs6hcTQHCc5Tqz3MRjAi+3x6g+gjzrL8EB2xNj4Gq9pOL7YHew3FL7d6JfJXC E1quAQNntpye6wb3FTzYlQUcGKkEsiPXcpqJEQxBI8XlTOWBEMUEBnxjRQfhg6RoUk jcMsL7Si0+1FAY08YxF2COTGgQfns/P+JY4zovWE6lTxGxi0T+l8YHzWk/Ii/C8V18 Qi00fKGuLW1jvhsXEY+d7qbHpMPwZV15LR/8kztbMSGhz7J5yNbp2vtBhyaHSE4zg7 PyTEJ9YyBp3moMJpPLQkx7rLxSGebZNjq7Hdd69RDAODbrbqs12Yl5JorPjjsjmtk9 sQPSZ5yNXCceA== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 1B3EEA006A; Mon, 12 Aug 2019 09:44:23 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Subject: [PATCH net-next v2 05/12] net: stmmac: Add a counter for Split Header packets Date: Mon, 12 Aug 2019 11:44:04 +0200 Message-Id: <401056872393d41f8fe87ad6f08ee52aea3316f8.1565602974.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190812_024427_126651_434D46D1 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Joao Pinto , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Giuseppe Cavallaro , "David S. Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add a counter that increments each time a packet with split header is received. Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 527f961579f4..1303ec81fd3d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -75,6 +75,7 @@ struct stmmac_extra_stats { unsigned long rx_missed_cntr; unsigned long rx_overflow_cntr; unsigned long rx_vlan; + unsigned long rx_split_hdr_pkt_n; /* Tx/Rx IRQ error info */ unsigned long tx_undeflow_irq; unsigned long tx_process_stopped_irq; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 2423160ab582..eb784fdb6d32 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -65,6 +65,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = { STMMAC_STAT(rx_missed_cntr), STMMAC_STAT(rx_overflow_cntr), STMMAC_STAT(rx_vlan), + STMMAC_STAT(rx_split_hdr_pkt_n), /* Tx/Rx IRQ error info */ STMMAC_STAT(tx_undeflow_irq), STMMAC_STAT(tx_process_stopped_irq), diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 556c75803f70..1fd00e18c65a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3504,6 +3504,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) len = hlen; prefetch(page_address(buf->sec_page)); + priv->xstats.rx_split_hdr_pkt_n++; } skb = netdev_alloc_skb_ip_align(priv->dev, len);