From patchwork Wed Nov 24 11:40:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12693541 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 7D11CC433EF for ; Wed, 24 Nov 2021 11:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1A2SliCDstI1NwbjEnX3e7pNaFzQnjv+ZpQVAAC6iFA=; b=DsM8FeF94H8NSF DLOlrS1U4s3BAkmy5vttDTXp2WvdEnhbrAs3Ry2P5riAGXtfQGPbEXQ+0Eiz9l/vkBnkcUpbUvRQ7 ngTrzNcOCrxEXfKrmQ3Ld+aWqL78HVgpfezAsjXIQounvpzfZua7faPEyXJC8/MiFmcj2bjthPqbr W2psphlUUxXc857DpI5zmHPcrXfyoYr9yQSH+dJhapAxj2EqO5Yq4SLaJBFGbd8eI/1FQYGJm+hSl /aU/W/qslZJoo/h4IZsLDMaiK8hig93Wxi5opBAqCoSqbGfeVAtfs9Fh2CRTb8Dn9Lby7FfhcGS58 zZ/Xd+Ceu7vbhhMZqG6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpqfi-004biX-6Q; Wed, 24 Nov 2021 11:42:42 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpqfe-004bhe-Iw for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 11:42:39 +0000 X-IronPort-AV: E=McAfee;i="6200,9189,10177"; a="235079885" X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="235079885" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2021 03:42:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="554153649" Received: from sashimi-thinkstation-p920.png.intel.com ([10.158.65.178]) by fmsmga008.fm.intel.com with ESMTP; 24 Nov 2021 03:42:33 -0800 From: Ong Boon Leong To: netdev@vger.kernel.org Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , alexandre.torgue@foss.st.com, Kurt Kanzenbach , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Ong Boon Leong Subject: [PATCH net-next 1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup Date: Wed, 24 Nov 2021 19:40:19 +0800 Message-Id: <20211124114019.3949125-1-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_034238_804677_50F8408A X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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 When XDP program is loaded, it is desirable that the previous TX and RX coalesce values are not re-inited to its default value. This prevents unnecessary re-configurig the coalesce values that were working fine before. Fixes: ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance") Signed-off-by: Ong Boon Leong Tested-by: Kurt Kanzenbach --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 21111df7371..a122a161872 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6527,6 +6527,9 @@ int stmmac_xdp_open(struct net_device *dev) tx_q->tx_tail_addr = tx_q->dma_tx_phy; stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, chan); + + hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + tx_q->txtimer.function = stmmac_tx_timer; } /* Enable the MAC Rx/Tx */ @@ -6535,8 +6538,6 @@ int stmmac_xdp_open(struct net_device *dev) /* Start Rx & Tx DMA Channels */ stmmac_start_all_dma(priv); - stmmac_init_coalesce(priv); - ret = stmmac_request_irq(dev); if (ret) goto irq_error;