From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 152832DCF4E for ; Tue, 28 Oct 2025 09:10:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761642636; cv=none; b=a2X6NgjgE8Lv8/b7wqTEvJtqMapgB76OTaSvq+0NN+xRqcwzyQmYwnMwypXCwAX5xcSGW3Ij29OkZok861fEFWWPVQoCBX5FstKtbBNM+3fw6p1xoz7W4WjR/x2026TW/bmVdM+q3a03ygd5/5TyqSDGPT30iPZ3q7e4zgr0MIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761642636; c=relaxed/simple; bh=gsaXk6rPSnT3/htmS1wC1UxgQ9W8HC0fe87DUuj7boA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=iF4I6hD7TgUU63qJR4OeNrx5J0d5jyDRLMPUnfnsf951LnZjSRUHrgFsZkglZRPVnMWhNVc/l0Dow83Iohbdo2l26R+ITCtVurAAjnc1+d82mdEH835XzdrSKkq5L7XhNW9/XhVP9sqGvsUsqN+Y7eoE3s8Tru7ge3+zHyjfCQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NgyY83Bn; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NgyY83Bn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761642634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9fC2VCoLVnfLvc+GVN6vMzms7DTor0VnmsdHYFXK6aw=; b=NgyY83BnzL76LgaChcp1o+QsuFmE3Ic77LDPlD+p63psc8nzXp691CHTf33DWi01fPF+Tu yHr2ClcT47FKRtTGZOE0pW/BPp/f1o4AXJfhCKaOiuWh9v6N6ci5xYbXb7E14Uvw/a9tls P4+FefCuy0UpyFS+2rjjSyYKJfC6PCQ= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-EFbPRIPBOhG8PP8vqmInIg-1; Tue, 28 Oct 2025 05:10:32 -0400 X-MC-Unique: EFbPRIPBOhG8PP8vqmInIg-1 X-Mimecast-MFC-AGG-ID: EFbPRIPBOhG8PP8vqmInIg_1761642631 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-b6d7ad47b58so336874966b.1 for ; Tue, 28 Oct 2025 02:10:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761642631; x=1762247431; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9fC2VCoLVnfLvc+GVN6vMzms7DTor0VnmsdHYFXK6aw=; b=fko/0P5mPhY7ohi3nlIOtCdYO6aFm05dYCynbC9jGZdJpCn+lchoj5CnTW5TY/E/tc ccSX4Vv8KqdFDsQ2HCkdN4iuv6zxG9+lZYc1uY3EOWgUPu+GMAJW+Pqn37/d1ZaPTKQ4 LidNEh7dFHJeXvvstMnOqk/HAOPLpbHIsQPm9yp0XGeN+sSTctEFbgAazPmaUTWFsHsh 1G4zafhlhX+rtljSoCdI2NT7aGoEwcqwLMYiazldhCzsxA1+LvwD5WOI8SCFSKcUoy6Q 5iBP4srT1k1za1muZNflccH0wLksLmzXw/FJp+bGmSeK04K9LjXtzV9hjPesbMbJgA1A Vadg== X-Forwarded-Encrypted: i=1; AJvYcCXMkc7ZcIn10FC/f29dF7Z9OyYbCZIZJs8lFSyp9E8C3YlzsKe4aiE/d562n2arBO8TzcAth2uO06PjNVk=@vger.kernel.org X-Gm-Message-State: AOJu0Yygq/vCO1Ictz4dTZaS7hjkbvqOfmtGFhXVmYm1c1LbEq2YzMWc 3TgPz27S+TrYLaLgfC5YekY4xv5kipLxq4ScNS3Ue/P6bByhmk2/Jx5lleC7UDab7fjs41Td0YJ EoYg8z/u9X20L0Vatg+vkCudPvrOFucra5rRf0Zh/yvxnF2OokuhX6py3E07aoUXJQwzWo05bOQ == X-Gm-Gg: ASbGnctwxtwIqJPnvpvWTX4Jm7TXBpG3vE55lGFfbD+eu2nLfDip32aTr3UUADgjA2p eECEebV7k8CgF5J7+E2r4VNwZSCp5ZzMaC0jOmiYmx9jzgk4dMcn0dC1hOvhZANr787wrdygCBj 8Hw55TrR/0XOZWXO773JRRwVgDmy9xYz/ZRYvg/PZbdIdXm7CXCrNBpm9mQocigkBvPb9mTauVH fW3M6op3YbGpLbtNKjlfw5sYR7zMchjw7fiEuc38IUxLlMq50uIIQkEb3D8Y9/naYXiA5EnN4wZ X4xFoWEXkRV6KWLWOgFer/66eB8W4AiK7bCT1Nz5fVZJ0CqsP67AKxZGYb4ZBAR7EsM603h6VNa WaCIGORkNKmy07bBByVB5uM4= X-Received: by 2002:a17:906:7314:b0:b6d:5f02:51e1 with SMTP id a640c23a62f3a-b6dba48ed89mr308757866b.20.1761642630682; Tue, 28 Oct 2025 02:10:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHp5fIM3h+FEyqEOS5MHMS5ieohkbVb2Z5rr/lbPP90LvTja8uJXC93IQE7iLbY3k1MDqtHAA== X-Received: by 2002:a17:906:7314:b0:b6d:5f02:51e1 with SMTP id a640c23a62f3a-b6dba48ed89mr308756366b.20.1761642630332; Tue, 28 Oct 2025 02:10:30 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d8548ed9asm1045251566b.74.2025.10.28.02.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 02:10:29 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id C0E5E2EAC74; Tue, 28 Oct 2025 10:10:28 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jesper Dangaard Brouer , netdev@vger.kernel.org Cc: Jesper Dangaard Brouer , Eric Dumazet , "David S. Miller" , Jakub Kicinski , Paolo Abeni , ihor.solodrai@linux.dev, "Michael S. Tsirkin" , makita.toshiaki@lab.ntt.co.jp, toshiaki.makita1@gmail.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@cloudflare.com Subject: Re: [PATCH net V2 1/2] veth: enable dev_watchdog for detecting stalled TXQs In-Reply-To: <176159553266.5396.10834647359497221596.stgit@firesoul> References: <176159549627.5396.15971398227283515867.stgit@firesoul> <176159553266.5396.10834647359497221596.stgit@firesoul> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 28 Oct 2025 10:10:28 +0100 Message-ID: <87ecqne6ij.fsf@toke.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jesper Dangaard Brouer writes: > The changes introduced in commit dc82a33297fc ("veth: apply qdisc > backpressure on full ptr_ring to reduce TX drops") have been found to cau= se > a race condition in production environments. > > Under specific circumstances, observed exclusively on ARM64 (aarch64) > systems with Ampere Altra Max CPUs, a transmit queue (TXQ) can become > permanently stalled. This happens when the race condition leads to the TXQ > entering the QUEUE_STATE_DRV_XOFF state without a corresponding queue wak= e-up, > preventing the attached qdisc from dequeueing packets and causing the > network link to halt. > > As a first step towards resolving this issue, this patch introduces a > failsafe mechanism. It enables the net device watchdog by setting a timeo= ut > value and implements the .ndo_tx_timeout callback. > > If a TXQ stalls, the watchdog will trigger the veth_tx_timeout() function, > which logs a warning and calls netif_tx_wake_queue() to unstall the queue > and allow traffic to resume. > > The log message will look like this: > > veth42: NETDEV WATCHDOG: CPU: 34: transmit queue 0 timed out 5393 ms > veth42: veth backpressure stalled(n:1) TXQ(0) re-enable > > This provides a necessary recovery mechanism while the underlying race > condition is investigated further. Subsequent patches will address the ro= ot > cause and add more robust state handling. > > Fixes: dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to = reduce TX drops") > Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen