Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13475031ybl; Sun, 29 Dec 2019 12:48:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwtEgDMANd+Aa0hZIRDNM+lYFjQzOlkwkBj4tJCmT/poBl5oM5mLxOX8ZJZYawZ71/q/qsi X-Received: by 2002:a05:6830:10d5:: with SMTP id z21mr73224082oto.30.1577652485126; Sun, 29 Dec 2019 12:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652485; cv=none; d=google.com; s=arc-20160816; b=CDvYP4aMyiECb+NS0wM6K05R0BOhQyvrYH2898j1/huscGggYD+xh5NsLqhyfBRx7j zYoCayYFtZ/EAn1PIJiew2PFTZ/MWWYmlqAoUmAZ3pKTLxJarAdrQe8GsUyiYp4J4+QM 5KdG+Ydao9oZbvR1aS/s0e2kf6Zb7V3pcWpjvwXg5NELck45+b1eqpEtNYsuIartRMaK IVO/pDWzAzy/G1mG8QCMJDskhRWdf3hogLQ2D8HCF2hiTCdSdIXzCvCxtSV7QDBJm5kf tvYieHZXa/juolHALuZqPN8DjZLu/z+88Emsl0kFfla4hudx6AvNsqJr8Rky9BlPdBSs l5QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2mXJ8TOGfePpM7CQD3qRIODLsHViBepVEnwYoUQ4fCM=; b=PV1be0OJi5nNX+xJXlkrU0BrydzBJ+R+8+C+dqNwNWyCWmbvydIdMcchozV5aFfsuP nb55qG3kq2JaaqKdR+HF1QItyHyE02su78uayhOLwj0LFNcXDey+n1YwRQ2/5A+GDo/h TH1CQWwVpfpUohBE2lHp/nJDb8W050Ka1Wv1DhxUcnJPYMmWdfJFrHFpdMmZNNwrGcd0 KOpJ0dGQIJoqxY5wINbBR7Uj59SOiWn+rG/cWMPotwSxTzmeIAYOPzwgmYbjfJqV50ko ia47/4tVm8sOnc/9c/i8LE3QozEyDXYeOpEvh9PF/kApaLziqLP36wd3xt7dOTC1TEhR ZJBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WzRNO7Vk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si11563469oti.74.2019.12.29.12.47.54; Sun, 29 Dec 2019 12:48:05 -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=@kernel.org header.s=default header.b=WzRNO7Vk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732171AbfL2Rvx (ORCPT + 99 others); Sun, 29 Dec 2019 12:51:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:33832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731740AbfL2Rtu (ORCPT ); Sun, 29 Dec 2019 12:49:50 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 732AF206A4; Sun, 29 Dec 2019 17:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641789; bh=Y1qjcZXZE+pft8lJojTbgxiwdulEmme1T/JnVcarjCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WzRNO7VkpEj6MKh5TL22NR0zshSipVOoorcCAvAvf4kuOPJUjxHaaeGDiZTc043rc +NtBSWsGw/u80kg+jz0GqPMnVwPen9A9gRk9PPW5LKQ2a+pmt9rRHMpLvCvlcJrxAD waJK21CQjKo1oqrkKmXmfiyJNqB1U2iuXFF+7DY4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Huazhong Tan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 212/434] net: hns3: add struct netdev_queue debug info for TX timeout Date: Sun, 29 Dec 2019 18:24:25 +0100 Message-Id: <20191229172715.911088910@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin [ Upstream commit 647522a5ef6401dcdb8ec417421e43fb21910167 ] When there is a TX timeout, we can tell if the driver or stack has stopped the queue by looking at state field, and when has the last packet transmited by looking at trans_start field. So this patch prints these two field in the hns3_get_tx_timeo_queue_info(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 616cad0faa21..84d8816c8681 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1692,6 +1692,9 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) time_after(jiffies, (trans_start + ndev->watchdog_timeo))) { timeout_queue = i; + netdev_info(ndev, "queue state: 0x%lx, delta msecs: %u\n", + q->state, + jiffies_to_msecs(jiffies - trans_start)); break; } } -- 2.20.1