Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1982725ybc; Wed, 13 Nov 2019 07:17:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzIKNck2+6FQaFgY/9BOFzDb+/MBdS5aFOqFrGA0Iojm7r1mSS+XGhGohFCTzH948lnPTKV X-Received: by 2002:a17:906:404d:: with SMTP id y13mr3329554ejj.276.1573658279498; Wed, 13 Nov 2019 07:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573658279; cv=none; d=google.com; s=arc-20160816; b=K2yE8hRDOemwcCYRtSYqsk3TDbuYJhRrAxTxGFUQQ61MIV63/0MC1TCq1pVCz4FCb+ CO6pyU5N0zOfEacAxx6Y4DYzKs066I3dHSh7cyXxsl57oo0XGDlBkN9YHc0rtoE1Gcvn z6Kf83I2HSI8nyFsR/K1Xy6aWrL8wtRRQbcD7mIxlmyjUeyRKwh3UfiSNEFTJsil3laN sTh1ZCMNyeAGsBPdFXrf1MKQHB22CBJS/Zhh+Na5Mp6hi/+6LDsQ2Suad/bQ11VVi+eO J6jbdLk52OvPjCEOPEKPa6+iAAtdnMahHrxFV7VaTBpGwn5GWRIukqwsfHBsqWi3/gfm A/+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=4QIi9YqmkCr+HSrk1GM7D0ctQoEd8gragIeTcTnmnlI=; b=GRPoi+CYau/FrqTT3wF56qlRIqYN5gc4tlxhBlTBEN1/R9hUQQAftK14aY8Oga3MPG vIEya+fg/ktPEuQiA7dkzgK5Y0B4jUKK8XoJIaAsjh5tE+7/X3+56xqEJi/cafQArADD T/RowaIGiISKdFc/mVzCUPeWK32+Mzc+g1VoH3Fi+7Zx6ul6nR4hw79/iqzM+DgNH28M 5xUrVh+HOYo879PUlKy0KPfWprY8yQgeeb1RhKXcQbI+dRD6n/LH+3Ied06xSf7aDcdF OU8KmHNPYsYXYXvCatRkhfSrg5JcCCsw7L2tnHgRvDfh+z47KLSUCYrvynpsqsk28UCW UsDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=RffYW4TN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ov16si1366764ejb.274.2019.11.13.07.17.34; Wed, 13 Nov 2019 07:17:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=RffYW4TN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727729AbfKMPNF (ORCPT + 99 others); Wed, 13 Nov 2019 10:13:05 -0500 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:51248 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727550AbfKMPMV (ORCPT ); Wed, 13 Nov 2019 10:12:21 -0500 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (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 38E03C0E98; Wed, 13 Nov 2019 15:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1573657941; bh=jjICtN6nRPvjHGBNW8f6sLnIxarejkUWdfnGT+fEkhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=RffYW4TN54gSvtHNErDOxuzEPR6/DnIaT4qIvG4Z1jzdg0kzB8kOXEroRoYNEPPNh DHY/OLqKtEUbb4/tMUuu822UcQv+BfDeLk66Q1glFxlSsx6gT5RWk27Il8pZDflgEM 4f7HNGWeatmrf92VybDNnesbjHnyIRDd1pqJzlMF46p41EJj5NUfxU8jQnjC26IMWC Vah+bJtb/vG53vdZRXa2LF30igCDU+J8hK8S2uVrbteRWiTvTX7RoUs/hJAiZghYpw Wgwe+bLTF19xPBxDWALymorx+WFTld0ncIhQI+vjD0Yytzq9smLT2m9RH6LxeODkIz UrkfjS4o6Xgsw== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id E3509A0097; Wed, 13 Nov 2019 15:12:19 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 7/7] net: stmmac: TX Coalesce should be per-packet Date: Wed, 13 Nov 2019 16:12:08 +0100 Message-Id: <904a2b53a0957f6f82562a73dffb4d69218c99b5.1573657593.git.Jose.Abreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TX Coalesce settings are per packet and not per fragment because otherwise the coalesce would be different between TSO and non-TSO packets. 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/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 6136ada20c8e..140abfcb54c6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3033,7 +3033,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev) tx_q->tx_skbuff[tx_q->cur_tx] = skb; /* Manage tx mitigation */ - tx_q->tx_count_frames += nfrags + 1; + tx_q->tx_count_frames++; if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) && !((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && priv->hwts_tx_en)) { @@ -3241,7 +3241,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) * This approach takes care about the fragments: desc is the first * element in case of no SG. */ - tx_q->tx_count_frames += nfrags + 1; + tx_q->tx_count_frames++; if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) && !((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && priv->hwts_tx_en)) { -- 2.7.4