From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADAC530BF66 for ; Tue, 23 Sep 2025 23:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758669649; cv=none; b=suKFAopAplek4slZDkYKjQ+7lgRCndRxf0vdA3USchbzHYQRpi7vjuSAqGsxcKQhGAlTqVPhm8W9mQgWK/ATCr1wtV77lwsfRz1st7w6lKdns9IjNDQmSdsZVWTyrLFxiL+Fs9Bt9diGeTIw0JdbHl2dIM2KJW1b9htpWUqpYvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758669649; c=relaxed/simple; bh=vkZtgaI8+DwA2vFDCXnyuKa4Ewv+3A6r93k8zDXNbj8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kUrjHj7K1OoK4gjj8Udugi+2X/iXQmU4UuiQgWRMlBLkbh/ha7hqZ1c+Y/X1k1mAnKTRjMblBcbWVfZ/F8Le4GHZHAjkjWC+C5kG2DvXre8VXC8jCjr/XxdR/4Zng8r+oCKmXOeB+VSbbHbcpakg13u89U01+REzFvbdycrMajg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=a/b+eHPV; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a/b+eHPV" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-57b35e176dbso4582799e87.1 for ; Tue, 23 Sep 2025 16:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758669646; x=1759274446; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=7kc5MQmgIpaNTBaT8ZNBy5t4B5Vp5p3q0VgcMo06yqw=; b=a/b+eHPVxSEVzqwuiPJ8CzT3NtkU2uTRGYOVBG0a85NIM/V7LIgduFX43z4mfyuCTH ztSwhGWtWXxbDlU4zJducKmaLowbqaDsVN7yHTA775POKH8ETdQg9Qs/pKLk2aWpHUi+ 95f24pkm3Iq/CnoCiYkT+Rc0zku8deULAW9BkTGSic+lQ7Bv90Wo0lKkfzhJHmSUTg4J 0hTRj8exXcj0/AU+Dhus3unbM9hY9vN9AZ19M+sX1kq7dGnoy8WOCITzI+S+fk1CaZ12 u27xn34EmKwEeUHniWGYSuGyddyOBn/phkHsSRpWQzoP3UvU+w+O5EExE/aY+eX61E/t 6PxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758669646; x=1759274446; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7kc5MQmgIpaNTBaT8ZNBy5t4B5Vp5p3q0VgcMo06yqw=; b=CL13vQ8sY82pozfV0p4YE6V+3MIDinok2xDOy/7ts43P1KG5JZYwwpFiVEPeQqmBt6 IHS8RTPn6uOSlpqxMWrLKKvYGhly56Yf4xWFdvQ1FYr53e+/gI33KLC36k8JUI/517X8 43HyTAlNaXPFWNS02EFr2i2HwftW50fWy/UbxdC253eqVOfMMpayLj5bpn9qYKY6k4Pd ayJFh/zjx3sxE4sTw8dUviH7mVPeZxWScRtX3Hjo+rLl/CjtXhjdwXCcVJ/2rTYwru5c hy/SkRH9nv29aKmMB0+f4s4Q0Toj5mOZQM6FbhQMdb6XCyDusn1bjPx6JBzMN4aI5ocB arJw== X-Forwarded-Encrypted: i=1; AJvYcCX3s51UTQ05MswbdA141PTM7f/47C4YsALnew4vmePGw0WJ40VFZB819b8t8fn5TqV/DMRHWatrA9A=@vger.kernel.org X-Gm-Message-State: AOJu0YzyIPmvJgLTarpEH3ItDyfSkdKml3s/nz6fD9twbPRETCrV4+VN IQGCL3pYKSZX0pwg+dbQj1UcBlSyXToQE6L3Ovjz4CIMvCRbxSxXmtJV X-Gm-Gg: ASbGnctERlxx6PhgwqZyxLU5zfJsTPZtm+Ew4Upss9+C6piJGL4M5/sIiTXnrwwPUsS xm/Rdqe3Jy7hj9yaTXFOj+6wLPFA2DIsvA3WAdS2EJJos4PkahBfJEgiLtIxqcMhxf3cGznXTFJ +kW6sXpc9yuBz6UuboCn6uXyg0nxD4rcy5Mm/oZ0MAzEJJDcPnjYdnpi1qFxGLfjiATvcbtOkls m/Ch1Ddoa95bS38wHLUFjEtHgKv5oqbX5RrNHYX5z+8yYnraWurcuzxTSJKi+fmV/MofL4WjBeG 9NRQCwLOGYUavn331kVowTpIc6EHAi/SiUvvpTiGcgCHhIt3yHRy7JfsYdjGi8RjDoMUKYkhWQo CN/BlxGzmUTAtLE8qEdIB4FW4n3PD1bpyLqU= X-Google-Smtp-Source: AGHT+IFVMR2s4ilEdfP5c3p3+7X515B1QLyMWkcy/0fTuDiMsgwVqSp4AmW8TfIdg0R7IgmgC3jp6A== X-Received: by 2002:a05:6512:6314:b0:560:9702:4fe6 with SMTP id 2adb3069b0e04-5807190a878mr1402555e87.24.1758669645455; Tue, 23 Sep 2025 16:20:45 -0700 (PDT) Received: from foxbook (bfe191.neoplus.adsl.tpnet.pl. [83.28.42.191]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-57b43ff413asm3101295e87.144.2025.09.23.16.20.44 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 23 Sep 2025 16:20:45 -0700 (PDT) Date: Wed, 24 Sep 2025 01:20:39 +0200 From: Michal Pecio To: Jakub Kicinski Cc: I Viswanath , andrew@lunn.ch, andrew+netdev@lunn.ch, davem@davemloft.net, david.hunter.linux@gmail.com, edumazet@google.com, linux-kernel-mentees@lists.linux.dev, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, petkan@nucleusys.com, skhan@linuxfoundation.org, syzbot+78cae3f37c62ad092caa@syzkaller.appspotmail.com Subject: Re: [PATCH net v2] net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast Message-ID: <20250924012039.66a2411c.michal.pecio@gmail.com> In-Reply-To: <20250923072809.1a58edaf@kernel.org> References: <83171a57-cb40-4c97-b736-0e62930b9e5c@lunn.ch> <20250920181852.18164-1-viswanathiyyappan@gmail.com> <20250922180742.6ef6e2d5@kernel.org> <20250923094711.200b96f1.michal.pecio@gmail.com> <20250923072809.1a58edaf@kernel.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 23 Sep 2025 07:28:09 -0700, Jakub Kicinski wrote: > Excellent, could you check if there is any adverse effect of > repeatedly writing the RCR register under heavy Tx traffic (without > stopping/waking the Tx queue)? The driver seems to pause Tx when RCR > is written, seems like an odd thing to do without a reason, but > driver authors do the darndest things. I don't know what's the point of this, because it doesn't prevent the async "set RCR" control request racing with an async TX URB submitted before the queue was stopped or after it was restarted. Such races could be prevented by net core not calling this while TX is outstanding and not issuing TX until the control request completes, but it doesn't look like any of that is the case? I sucessfully reproduced the double submit bug as follows: ifconfig eth1 10.9.9.9 arp -s 10.9.8.7 87:87:87:87:87:87 # doesn't actually exist ping -f 10.9.8.7 while :; do ifconfig eth1 allmulti; ifconfig eth1 -allmulti; done For some reason I had to use two instances of 'ping -f', not sure why. Then the double submission warning appears in a few seconds and also some refcount issues, probably on skbs (dev->tx_skb gets mixed up). With the patch, it all goes away and doesn't show up even after a few minutes. I also tried with two TCP streams to a real machine and only observed a 20KB/s decrease in throughput while the ifconfig allmulti loop is running, probably due to USB bandwidth. So it looks OK. But one annoying problem is that those control requests are posted asynchronously and under my test they seem to accumulate faster than they drain. I get brief or not so brief lockups when USB core cleans this up on sudden disconnection. And rtl8150_disconnect() should kill them, but it doesn't. Not sure how this is supposed to work in a well-behaved net driver? Is this callback expected to return without sleeping and have an immediate effect? I can't see this working with USB. Regards, Michal