From patchwork Wed Apr 12 07:36:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kurt Kanzenbach X-Patchwork-Id: 1767928 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=dAIuuGLH; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PxF0f5zmtz1yZZ for ; Wed, 12 Apr 2023 17:37:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 98386613B4; Wed, 12 Apr 2023 07:37:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 98386613B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1681285038; bh=FO2KN37xkcmH9tuWjG5gPngnlOKaFMJW0RWjLTxxJjo=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=dAIuuGLHa2vVrLhvSRo+WUywpXURHV5UK6L4BtF3CwJH21Tr5i/awcjvcLkCyIszv PD0fTtjWfG7CFXRFsIYD2eB/PHgAkyreA2Xz2p8VRobI1cLaUB69u/bMCIlPmm+LiC D76ysvp2fOKQwYz8NYwSblH8QOJZouqKTGbuaqdAzt3fnvKibTU6MFp8hvPo6LRzIR KpxGBN5ofROWvFDr8Qi14Z7FraTQGSq+Apw6dnW2SGgQugJtlUo8wAnGEW/MkZd2UU x1Q9Fl6qtp4t/UB5G9DFGlDRmTKhU/Sp4gOy6EzcRDcC3L9winMCvsRi8BsRX03RFC D6wck6L+WCm4Q== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0KWPWrLZSeqF; Wed, 12 Apr 2023 07:37:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id B8DD0610C1; Wed, 12 Apr 2023 07:37:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B8DD0610C1 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6DB8A1BF386 for ; Wed, 12 Apr 2023 07:37:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3A68740A0A for ; Wed, 12 Apr 2023 07:37:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3A68740A0A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PGgyQWnB_ymt for ; Wed, 12 Apr 2023 07:37:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C318940192 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by smtp2.osuosl.org (Postfix) with ESMTPS id C318940192 for ; Wed, 12 Apr 2023 07:37:13 +0000 (UTC) From: Kurt Kanzenbach To: Jesse Brandeburg , Tony Nguyen Date: Wed, 12 Apr 2023 09:36:11 +0200 Message-Id: <20230412073611.62942-1-kurt@linutronix.de> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681285027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RQkxQvPTvjTB5S3EwtvOfTBwQl24EI140WoGiNkBG+s=; b=MW09NHjE0b5w53V52ZrAJ5VkN49spPATMCnsc9qgjoW4EDKZV805iagnvPySEwT1zsCx9l NTIAZ5xeuhBOe/RU+HaBHfVgsouZkF+DG1tZUBFswIusbtpFqaPFe+SIeJeSQA1X/pp0fP yEBhn2xL8UqzJkcc+hyqx6P1sdFiSgx/O+XzgbjCMSFG3CjNG6eNP96r7l5Q2aKtRdZ/rt hjUHgIO+aejtST9qclya1ArAvq3CAkk8t8zQ6uw/e3WTaWAg97/Aopzb5x5SJyatHqi6XA buWas5/KGc7KBbuP2QfvFnMOBO45DdPPPYK5MKZ25M9HXtGPBD3UKuSY3og/lA== X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681285027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RQkxQvPTvjTB5S3EwtvOfTBwQl24EI140WoGiNkBG+s=; b=mFYbNfdzkk6Rb44H39Ue7RlLrMKpMhP3u3YBPCpGTpb6t7kJ7yKFaaL/GavogRvXU+DL/F T62zChYo5S4uKADQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=MW09NHjE; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=mFYbNfdz Subject: [Intel-wired-lan] [PATCH net-next] igc: Avoid transmit queue timeout for XDP X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Kurt Kanzenbach , Eric Dumazet , intel-wired-lan@lists.osuosl.org, Ong Boon Leong , Jakub Kicinski , Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" High XDP load triggers the netdev watchdog: |NETDEV WATCHDOG: enp3s0 (igc): transmit queue 2 timed out The reason is the Tx queue transmission start (txq->trans_start) is not updated in XDP code path. Therefore, add it for all XDP transmission functions. Signed-off-by: Kurt Kanzenbach Tested-by: Naama Meir --- drivers/net/ethernet/intel/igc/igc_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index ba49728be919..e71e85e3bcc2 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2384,6 +2384,8 @@ static int igc_xdp_xmit_back(struct igc_adapter *adapter, struct xdp_buff *xdp) nq = txring_txq(ring); __netif_tx_lock(nq, cpu); + /* Avoid transmit queue timeout since we share it with the slow path */ + txq_trans_cond_update(nq); res = igc_xdp_init_tx_descriptor(ring, xdpf); __netif_tx_unlock(nq); return res; @@ -2786,6 +2788,9 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring) __netif_tx_lock(nq, cpu); + /* Avoid transmit queue timeout since we share it with the slow path */ + txq_trans_cond_update(nq); + budget = igc_desc_unused(ring); while (xsk_tx_peek_desc(pool, &xdp_desc) && budget--) { @@ -6311,6 +6316,9 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames, __netif_tx_lock(nq, cpu); + /* Avoid transmit queue timeout since we share it with the slow path */ + txq_trans_cond_update(nq); + drops = 0; for (i = 0; i < num_frames; i++) { int err;