From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 435FB3C81B5 for ; Thu, 30 Jul 2026 20:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785442314; cv=none; b=Sp79NWFelVPs9aD/DaBrKdERcuB1sBONRu3FUDwMQdBzGzAtZdOEMVI++3KgzohqvEM+YIN9IuDgQJhPvkkB4qP+ogJL0xFjG6zHx3gh+hJosSBclrKJt4arZ9tzjNjU65fpP6Cu4fwZjmcY5zi3vniHeg8xbqxOqlBQP67cqm4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785442314; c=relaxed/simple; bh=ywoJVudyQly2BSU4Suu/ELob67veyV2IT2JljVMnXPQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a9ygDORhCWBhexZ/tYm+n/jF1fcWJr57IJUZ2ZAnKN9fd8OIWCOtQZQAxqvBXSeVNaES6pLbg+CpGEDhs6b4krrrRjZkkZDGpyA4m6EyuJ/noCxAGX3s8huK/EOtMHUt21ejAbuwhLlvdLypUVp4oJ9YGxDHfWT1z+EKGlkQ6KA= 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=ZZE+rgqp; arc=none smtp.client-ip=209.85.210.182 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="ZZE+rgqp" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-84a652535dcso210410b3a.3 for ; Thu, 30 Jul 2026 13:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785442301; x=1786047101; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=SiwSGXnRH3TAjHZf8TYJ+bLPyzkydxq8UaVMUOfakl0=; b=ZZE+rgqpWGO8ojZDXUbip2ounkYY1eNg1d/0oFePsUOEIaLoBEWK68sJkW7Do71l+c mv2c21/bWO0tG92lgpzz8W59tzWOgzs5Dyb+TSZ63ocakvnEwITXuv2zLJHhH5YoFoUf h32nb2ymWScCbUNtfx1Wh9iEYigiS3fehlP6otLLhF/HFqkH3dC9bLl/rlouFDNV1lNp 57RGYHcbxYHG6TKhdjIMrOTJSX6ljivYWRSYXrsjc9RyVX3bqWyG84P2MnMo2XJKI8jQ DgjQ+LjftpwVskuSqBOBR/leyinBmGfR93VbzVs5jHN5dy6CqqY8jpajaPK5QyvgGU9L qCGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785442301; x=1786047101; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SiwSGXnRH3TAjHZf8TYJ+bLPyzkydxq8UaVMUOfakl0=; b=QEPq7QumJE0N85gKNQ8Do1R5IdEEEJxxRprPHgmYg9/hiphNLTCd1CHKwZsDZ42O9n cZM49hFIqrDkle6MAO/mW1hSwrXSt6PsXGi2SkSXuLfgjQI7tBe2PrLgoRne7qFdnLLB q82VLsnLIkeCnhKknfO0kQznmsZwmoOkfrCtlvMlxS7yy3f36Y8WOGi788LR2xqufyJr V0WEiNeVUqZt6A6HEBfPNMxUZhiYvGi5POStA8GL9rYqjK82PLrlErIeN79OHBLx6AxS 9PREAb1FJnvroH8fTa4flQKRW6b00kFbbYAelNDOqD1vN7Nv2bekjGMC/oyFCEr54S4G 5W5w== X-Forwarded-Encrypted: i=1; AHgh+RqaL+svwQBe/mfGCiAPxG7YLPtRhrhVybLGH4YJ7IzHtxFVcUecmgFKGUYMULCYX7wT93StiaEYYkhx7Ac=@vger.kernel.org X-Gm-Message-State: AOJu0YwuT42cMQO6l41tghY5u6qlL3ylJ5KoPnwRkTGdTgMFKX1BSNzU LrRKAahN4JbWCppWdKkw8I57QpRXyjWwkeIrwPKcq6Kl0BjI2ScnL2ZB X-Gm-Gg: AR+sD11vrh+jJixN0NrZT192o8fjW5mv0w0w9sOhyMMLpKy7//1DDAiNXbhS8FxVQlF XN7wg7uyaL57SUd9NJ0TSvGjhEPvoeNE/Ga4CdgnjDnQM8JGgTUVyd4unrulqSODiof/iAChVV/ jpUpO2c1xnN12ly0nd+5XFJKjJJyQDSO35LB3X4imTbpnQZAaT1+mqczl0czWCtmpxXb9ykz2Nv 7TObTl9IN/ugdVoeO5571bl8xJeqdNkLEVezW7sjf0lC2/aDqNM153CnMuL9qIQHKFmfOH/Tl1k wpuY/egd6yiEM9jdy7NRrdfnmghfmiLWVAgRKPM8NfmkBqEXlGCmY8ueDTkDR4FtxEj05vKJjnc tf/KMW14C3F6AScJ5Ww4DHS8VFpp5XaLIYaMbwy8EnFb/x3XHkRSwPYnGy0wxPNUr8z1u88hreU OxRE5Koj4AIuxpStbrgDiqN9z/ejzTMh+FoefdWhh20L7LT0P6hS/0SZfHwrYIPlzxLD9TcwT6B T1hPiS4fwCy/j4FZpg24LZL3RjJmO56CqSrSp0VLuQ+0cVX+j7I5w== X-Received: by 2002:a05:6a00:1391:b0:848:56ff:6ced with SMTP id d2e1a72fcca58-84ebc1f5844mr3898044b3a.8.1785442301426; Thu, 30 Jul 2026 13:11:41 -0700 (PDT) Received: from localhost.localdomain (c-174-165-208-10.hsd1.wa.comcast.net. [174.165.208.10]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84ea0055325sm3689108b3a.15.2026.07.30.13.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 13:11:40 -0700 (PDT) From: Michael Kelley X-Google-Original-From: Michael Kelley To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, daniel.lezcano@kernel.org, ssengar@linux.microsoft.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, sgarzare@redhat.com, horms@kernel.org Cc: x86@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux.dev Subject: [RESEND PATCH net-next 3/6] hv_netvsc: Remove GPADL teardown special case for old Hyper-V hosts Date: Thu, 30 Jul 2026 13:11:20 -0700 Message-Id: <20260730201123.1767-4-mhklinux@outlook.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260730201123.1767-1-mhklinux@outlook.com> References: <20260730201123.1767-1-mhklinux@outlook.com> Reply-To: mhklinux@outlook.com Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With the overall removal of Linux support for running on Hyper-V hosts earlier than WS2016 and Windows 10, the special case handling of GPADL teardown is no longer necessary. Remove it. Signed-off-by: Michael Kelley --- drivers/net/hyperv/netvsc.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 4d319c50955e..4295b96b4312 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -695,17 +695,8 @@ void netvsc_device_remove(struct hv_device *device) = rtnl_dereference(net_device_ctx->nvdev); int i; - /* - * Revoke receive buffer. If host is pre-Win2016 then tear down - * receive buffer GPADL. Do the same for send buffer. - */ netvsc_revoke_recv_buf(device, net_device, ndev); - if (vmbus_proto_version < VERSION_WIN10) - netvsc_teardown_recv_gpadl(device, net_device, ndev); - netvsc_revoke_send_buf(device, net_device, ndev); - if (vmbus_proto_version < VERSION_WIN10) - netvsc_teardown_send_gpadl(device, net_device, ndev); RCU_INIT_POINTER(net_device_ctx->nvdev, NULL); @@ -733,14 +724,9 @@ void netvsc_device_remove(struct hv_device *device) /* Now, we can close the channel safely */ vmbus_close(device->channel); - /* - * If host is Win2016 or higher then we do the GPADL tear down - * here after VMBus is closed. - */ - if (vmbus_proto_version >= VERSION_WIN10) { - netvsc_teardown_recv_gpadl(device, net_device, ndev); - netvsc_teardown_send_gpadl(device, net_device, ndev); - } + /* Must do the GPADL teardown after channel is closed */ + netvsc_teardown_recv_gpadl(device, net_device, ndev); + netvsc_teardown_send_gpadl(device, net_device, ndev); /* Release all resources */ free_netvsc_device_rcu(net_device); -- 2.25.1