From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796368305; b=wXNF8O9ORoOGQE12SRJ1E66hrMEsfpLm7MAKl4m85ujn0/7/2MO9/h2RxoAD2i516oER 588XDcbNrghjBSkRXnHFNctw9lSQONYME+lhcNRo7tWwWvJBEQa8LdK3URtOhz0FDhRrg 853sHYDPW2xXIyxNEv4TFpTWrOPZRIhsG+rcYD87HK2TisOTSEIX7x6G2zPrc8gRUU5an 5dieHkqPr/0xDtYS4/NPBc/JWULlGYXyYDVynejKZKAlAL1ACluyDAFxpvZkL0AJnPt8f EndNLLKZ9s3wCmxc200wA46wTUEaCmOUwj9ReLMXCyFp5PezIjP2VD1BK1OHqnEyXPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796368305; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=CQjVRE2qWdylX2ogfdrelwqfTMlDiRq6sQuVEs3JIvU=; b=2TOzXTcRw7njRLfk3HAmkRyDJFN5jeJznBd9srhDMerkmuXpWoy2i/BARQkPNNwxZHVf XIpSM4FQ4VMzfzWQzBJjsU3G5QXuWDEEBrq6N8ky39HJ/g92zBDIGql/dXjk2oHSi+muS +GkwxwUCue5vEL7kGKUocx3Jh2YeQOMVNA1BmLeZQArfBUgQAStUxBoWWe6UwNEbTZvSJ yM0u9/Q+uFUerh44xgTX0T+DAK4m/BGleccW4Z78c6N0uh30E02L8NRPLgZxlal49Ttb1 GfdO/pulWQA4Y5m5pIzTJjhyW1/e0TiCMAGqiyAert1G0f2IF1zhBU9pbGjd5h2Wyiw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="mwl/C0vm"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E60A2606A322 for ; Fri, 4 Dec 2026 07:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mwl/C0vm Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE251F00897; Fri, 4 Dec 2026 07:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796368304; bh=CQjVRE2qWdylX2ogfdrelwqfTMlDiRq6sQuVEs3JIvU=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=mwl/C0vm0139zlFPLT0rMUVT9wjgdYFzQBAWq6O73Snr3MN/8HSm6DcAI0VfXlKrQ +CwyPFdrMDsMJEcl5T3udp23nZ8vURbrJ2dZua5JJbX/1RLcMTMj3ZoZ1tvfUn6b7m nuuqJhURhYn7KrpN+ekJvk9A0ed8MFIDSMVZiVs2n+LGflrQq5z74ALs2+B1d8o2S2 WD8isx7nBOk7/gGPnLFMv+6CQbeUfCwQF7FcINZgAgOHv3OM8YW9uriei9kGm5QvjY ps5ZoO7d293YHzxTt145r9lvt10j08u4wNo704TK5DAfMiWHtk1WA0JIWYNOPdtNsc 3+2JgdK2VVMpw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v2] net: hv_netvsc: Preserve RSS indirection table across device recreation Reply-To: sashiko-reviews@lists.linux.dev To: "Aditya Garg" , linux-hyperv@vger.kernel.org In-Reply-To: <20261203071129.396360-1-gargaditya@linux.microsoft.com> References: <20261203071129.396360-1-gargaditya@linux.microsoft.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 07:11:43 +0000 X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] net: hv_netvsc: zeroing rx_table and rss_key in netvsc_attach() breaks RSS -- commit 9294af50c8f8757092c38dc965ae71d9b53d00c2 Author: Aditya Garg net: hv_netvsc: Preserve RSS indirection table across device recreation This commit saves and restores user-configured RSS indirection tables across RNDIS device recreation, notifies ethtool via ethtool_rxfh_indir_lost() when a custom table cannot be restored, and cleans up saved device info if detach fails during suspend. > diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_= drv.c > index 1d43c73fd73f1..4df17d7baa30c 100644 > --- a/drivers/net/hyperv/netvsc_drv.c > +++ b/drivers/net/hyperv/netvsc_drv.c [ ... ] > @@ -1036,6 +1054,19 @@ static int netvsc_attach(struct net_device *ndev, > if (ret) { > nvdev->max_chn =3D 1; > nvdev->num_chn =3D 1; > + } else { > + ret =3D rndis_filter_set_rss_param(nvdev->extension, dev_info->rss_ke= y); > + } > + > + if (ret) { > + netdev_err(ndev, > + "unable to restore RSS parameters (ret %d).\n", > + ret); > + /* Do not report the saved parameters as restored. */ > + memset(ndev_ctx->rx_table, 0, > + ndev_ctx->rx_table_sz * sizeof(*ndev_ctx->rx_table)); > + memset(nvdev->extension->rss_key, 0, NETVSC_HASH_KEYLEN); > + rss_failed =3D true; > } > } [Severity: Medium] Can zeroing ndev_ctx->rx_table and nvdev->extension->rss_key here cause later RSS updates or device recreations to silently collapse all RX traffic onto a single queue? rndis_set_rss_param_msg() always sends both ndc->rx_table and rss_key to the host. Since ethtool_rxfh_indir_lost() only signals a lost table, a table-only netvsc_set_rxfh() reuses the zeroed rndis_dev->rss_key and programs an all-zero Toeplitz key that steers all packets to rx_table[0]. Similarly, if rndis_filter_set_rss_param() fails after rndis_set_subchannel() enabled multiple queues, a key-only netvsc_set_rxfh() update programs the zeroed ndc->rx_table. Later recreations also copy the zeroed rss_key via netvsc_devinfo_get(). Tracking the unapplied RSS state separately, or falling back to netvsc_hash_key and ethtool_rxfh_indir_default() when programming omitted parameters or recreating the device, would keep netlink retries working without programming all-zero RSS parameters. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203071129.3963= 60-1-gargaditya@linux.microsoft.com?part=3D1