Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2364864rdd; Fri, 12 Jan 2024 07:21:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IESIw+s6Z7K8ISaRAf6SmihsLM/Npygvjm820Vv5nVnnsFWKjmy9EOxjPqyWWzuu9V+3eLd X-Received: by 2002:a17:902:8bc7:b0:1d5:73b7:5de8 with SMTP id r7-20020a1709028bc700b001d573b75de8mr1586703plo.49.1705072918482; Fri, 12 Jan 2024 07:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705072918; cv=none; d=google.com; s=arc-20160816; b=QLVZLDt7u4h5dWYsilRIMO7HSmEEEQH8218Me3w5YElZ4u2QLyZSZ5e0rQL/wDRd+X UBfMZNImkiV5jkDFYoG4bSJIOMQSy11WZAR24EWJOk0MYf6amqeg+pCiT0xuqPqy+MFV e7V/UqbktxveK6xKA+FtKDxN/4FVnuW2xbwv1dEtDsQDrv3buBL3spIx2GyP6qto+QQx hfc8o0ftrfTmIDf6RNwWO0pGFb2MkU8hM0HC1k45vWIcaKbaK5/5h1MWna0HDFdJgmrU AFraK8uwt/6NBRBtMiUlRknWuul6Z2OKrCGJzGXcAaIkj8vD2y7UIxZ+RSLIEuhHkewc 8zoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=Z25VZWA4Q6roHwkdDLUCeMKTHBg7iJahkjeM0gxr5qg=; fh=/O9xMwABHIpREng8UHs4Df4clu99AQ7ktSpIqi9QbEk=; b=nN5HuzVmnFgeyPzCst+6+malQ2TDCLRiS98ZZshDUz7sL04P0tMg1pKOe+3+g5f3k3 gx1PQO0T0wEclgu9+GqOkeKXRfC0UjZzf6zYgr0D0lxgQ+K2+qdufQ8GgQmKbpK/1LTu 41VXmcIwiHXMFLy0D/a873kpUgGfrPKB3ImABDaKELKqIiqAet597TDDarrD1tzlKFAC VWgfKim38lrUcpIgsiV70Cjl7filNCp181kwwO9Yz68rMoNY3WvOvUdTdXQ7Uod6OZCa cnVcN1/Z599fyeaC+P5gNrhe4erJU7uoEnyMNWKr9gkuwNO90nnVO+KeIoeQB8ZEsOu9 EHPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VR7hgF78; spf=pass (google.com: domain of linux-kernel+bounces-24795-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ky4-20020a170902f98400b001d4e1f201b1si3386983plb.471.2024.01.12.07.21.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 07:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24795-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VR7hgF78; spf=pass (google.com: domain of linux-kernel+bounces-24795-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 26A32285CD6 for ; Fri, 12 Jan 2024 15:21:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35CAC6EB50; Fri, 12 Jan 2024 15:21:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VR7hgF78" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0FC56DD1D; Fri, 12 Jan 2024 15:21:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705072909; x=1736608909; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=7jVffiOSFNJ/djyJtPLNRXhEr/dyJlXTdJT72bt17RM=; b=VR7hgF78ftRXFs8+TdZjMPtMYYNfGH6Nt6kqw0RIDwDNApmMOmQR8CZs 2GNQbufgNNPp6RfXkhPf/F7O9KerjR1B74QObg6nbeijyOuSD3/9yloRB ne2tiP/BbnOEjZoviH6u3m18i57hCN478seQc3pKxcry92GPKDkex0DJe v6/hjTcsr7XyPn57RbHapYrsE9qpD0bjZSz4LiXR9UQMi36tnjk4Re6du IQQHGw2+ybstNt9iGPafDaWPgby/eQqEIFU0yJ4IKDuJr+jGKRDn4hb7N 5Wo0pBvtGpQw3BsUFJxE1jEmr+JPgH/vOWGKHqBg7wCBDZK+nsSkyiWeO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10951"; a="12681077" X-IronPort-AV: E=Sophos;i="6.04,189,1695711600"; d="scan'208";a="12681077" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2024 07:21:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10951"; a="786373596" X-IronPort-AV: E=Sophos;i="6.04,189,1695711600"; d="scan'208";a="786373596" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.33.141]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2024 07:21:44 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 12 Jan 2024 17:21:40 +0200 (EET) To: Liming Sun cc: Vadim Pasternak , David Thompson , Hans de Goede , Mark Gross , Dan Carpenter , platform-driver-x86@vger.kernel.org, LKML Subject: Re: [PATCH v3] Drop Tx network packet when Tx TmFIFO is full In-Reply-To: <20240111173106.96958-1-limings@nvidia.com> Message-ID: <107b5fda-d3ec-48c1-107e-53502a1de0bd@linux.intel.com> References: <20240111173106.96958-1-limings@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-168994210-1705072900=:1030" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-168994210-1705072900=:1030 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 11 Jan 2024, Liming Sun wrote: > Starting from Linux 5.16 kernel, Tx timeout mechanism was added > in the virtio_net driver which prints the "Tx timeout" warning > message when a packet stays in Tx queue for too long. Below is an > example of the reported message: >=20 > "[494105.316739] virtio_net virtio1 tmfifo_net0: TX timeout on > queue: 0, sq: output.0, vq: 0=C3=971, name: output.0, usecs since > last trans: 3079892256". >=20 > This issue could happen when external host driver which drains the > FIFO is restared, stopped or upgraded. To avoid such confusing > "Tx timeout" messages, this commit adds logic to drop the outstanding > Tx packet if it's not able to transmit in two seconds due to Tx FIFO > full, which can be considered as congestion or out-of-resource drop. >=20 > This commit also handles the special case that the packet is half- > transmitted into the Tx FIFO. In such case, the packet is discarded > with remaining length stored in vring->rem_padding. So paddings with > zeros can be sent out when Tx space is available to maintain the > integrity of the packet format. The padded packet will be dropped on > the receiving side. >=20 > Signed-off-by: Liming Sun > --- > v2->v3: > Updates for Ilpo's comments: > - Revises commit message to avoid confusion. > v2: Fixed formatting warning > v1: Initial version Thanks, the commit message makes much more sense now! Reviewed-by: Ilpo J=C3=A4rvinen --=20 i. --8323328-168994210-1705072900=:1030--