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: 12636705 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 803D0C433F5 for ; Wed, 24 Nov 2021 11:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241529AbhKXLps (ORCPT ); Wed, 24 Nov 2021 06:45:48 -0500 Received: from mga09.intel.com ([134.134.136.24]:10469 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbhKXLpr (ORCPT ); Wed, 24 Nov 2021 06:45:47 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10177"; a="235079884" X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="235079884" 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 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.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;