Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25622681rwd; Sun, 2 Jul 2023 21:40:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6Yfcetjv9pr1sbigEijv+w/AfevMYI5HkRUje8UdIH8Wg4b1Ayflf4EuKl5AV82SFS+S1 X-Received: by 2002:a17:90a:312:b0:263:ad97:38f1 with SMTP id 18-20020a17090a031200b00263ad9738f1mr5955474pje.3.1688359252285; Sun, 02 Jul 2023 21:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688359252; cv=none; d=google.com; s=arc-20160816; b=WLn7xwY2F6gIr3IE3rTJ5d6GLMtSHiVQadsP93Rzu//gPByFKLCgQ1fdd6Y6zX3Niq UmYO3NNcmPob/KuhMjIgB9GkbG52ToEOrkVqN1xn0rYRIYlu4JQ8+Xp1bLMGwCOTsVQx 1dDid38rhvh5GHgCezWqmo0QAakYp4hFp6oBFlOZ+f1vh6jkCCojcUFuddHXUrtvQm/J qmQMB4oQtZ8/r8gtsZnbRDTt8lhu7bAlSS3QWKA4gEpKGVyrVq30zrwE48HhnVmiaB+z EsXptEt4ZzyExxICbD2hqc6yUyAlwlfqvQ7/8Z/EgKw+4ym9fie3OBtT3mPHKPj4oavi 4esQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=98TCDgh+qhihYtqPbBtXT0BEKRZ3kHNSyHjDAf+oyZs=; fh=vqcuAhz1i3CQEQea1hAoKfq4P8vrn2VeVAjSQqG8n70=; b=IqIKZrMhRFUOpZbQWcVS0oE9JV5l8GuDiIJYRTrTLnspJHcp21AAn21Dl4ODNw9wca qdUwSsHmsMoiHMprI+46SrYn1VohVjlTd6nHFmSQdl434ruh6kuCwUmTKwdUjUtCiZj4 fUXaHy5COPyD/cznTqQNqSmDF7KwYs8CEqpE1xnOTjrnOqr2KWwgF55rKFTAYRrFZ3Kk 1raOI+BuiX0XO4l2n5W73Ty+a+eUpZRlxxaOeICdXy0KK6dbJVR2O4LidK+k1TRR1ctx bUk55TVtObBBVtZRsUKQUcX93kwc2MwtdLD5vOq0Lm4WE7E2Q9punscJtG2JvQz0NYhO rOZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=feEaWfBd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id np17-20020a17090b4c5100b0025bea0a396asi21911252pjb.6.2023.07.02.21.40.39; Sun, 02 Jul 2023 21:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=feEaWfBd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjGCEhp (ORCPT + 99 others); Mon, 3 Jul 2023 00:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjGCEho (ORCPT ); Mon, 3 Jul 2023 00:37:44 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0405D1AB; Sun, 2 Jul 2023 21:37:43 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1134) id 7263A208F5BA; Sun, 2 Jul 2023 21:37:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7263A208F5BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1688359062; bh=98TCDgh+qhihYtqPbBtXT0BEKRZ3kHNSyHjDAf+oyZs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=feEaWfBd4YMfWq1EeLD8WY7WGXUmYm1E4NuI6suImR+DOgHjAIx6MJG/XjOUJekT0 4K2MnSErLSCGUC3/8HoFs5WF12G9RBUxIaI3RdY/WczwBV3Sg8T6AQm5G4ZNpzbv+K SknYnQgRWBTjnup9LPfUOY5Zd4agd8zhVKTwlBxc= Date: Sun, 2 Jul 2023 21:37:42 -0700 From: Shradha Gupta To: Haiyang Zhang Cc: "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , KY Srinivasan , Wei Liu , Dexuan Cui , Long Li , "Michael Kelley (LINUX)" , "David S. Miller" Subject: Re: [PATCH] hv_netvsc: support a new host capability AllowRscDisabledStatus Message-ID: <20230703043742.GA9533@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1688032719-22847-1-git-send-email-shradhagupta@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023 at 12:44:26PM +0000, Haiyang Zhang wrote: > > > > -----Original Message----- > > From: Shradha Gupta > > Sent: Thursday, June 29, 2023 5:59 AM > > To: linux-kernel@vger.kernel.org; linux-hyperv@vger.kernel.org; > > netdev@vger.kernel.org > > Cc: Shradha Gupta ; Eric Dumazet > > ; Jakub Kicinski ; Paolo Abeni > > ; KY Srinivasan ; Haiyang Zhang > > ; Wei Liu ; Dexuan Cui > > ; Long Li ; Michael Kelley > > (LINUX) ; David S. Miller > > Subject: [PATCH] hv_netvsc: support a new host capability > > AllowRscDisabledStatus > > > > A future Azure host update has the potential to change RSC behavior > > in the VMs. To avoid this invisble change, Vswitch will check the > > netvsc version of a VM before sending its RSC capabilities, and will > > always indicate that the host performs RSC if the VM doesn't have an > > updated netvsc driver regardless of the actual host RSC capabilities. > > Netvsc now advertises a new capability: AllowRscDisabledStatus > > The host will check for this capability before sending RSC status, > > and if a VM does not have this capability it will send RSC enabled > > status regardless of host RSC settings > > > > Signed-off-by: Shradha Gupta > > --- > > drivers/net/hyperv/hyperv_net.h | 3 +++ > > drivers/net/hyperv/netvsc.c | 8 ++++++++ > > 2 files changed, 11 insertions(+) > > > > diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h > > index dd5919ec408b..218e0f31dd66 100644 > > --- a/drivers/net/hyperv/hyperv_net.h > > +++ b/drivers/net/hyperv/hyperv_net.h > > @@ -572,6 +572,9 @@ struct nvsp_2_vsc_capability { > > u64 teaming:1; > > u64 vsubnetid:1; > > u64 rsc:1; > > + u64 timestamp:1; > > + u64 reliablecorrelationid:1; > > + u64 allowrscdisabledstatus:1; > > }; > > }; > > } __packed; > > diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c > > index da737d959e81..2eb1e85ba940 100644 > > --- a/drivers/net/hyperv/netvsc.c > > +++ b/drivers/net/hyperv/netvsc.c > > @@ -619,6 +619,14 @@ static int negotiate_nvsp_ver(struct hv_device > > *device, > > init_packet->msg.v2_msg.send_ndis_config.mtu = ndev->mtu + > > ETH_HLEN; > > init_packet->msg.v2_msg.send_ndis_config.capability.ieee8021q = 1; > > > > + /* Don't need a version check while setting this bit because if we > > + * have a New VM on an old host, the VM will set the bit but the host > > + * won't check it. If we have an old VM on a new host, the host will > > + * check the bit, see its zero, and it'll know the VM has an > > + * older NetVsc > > + */ > > + init_packet- > > >msg.v2_msg.send_ndis_config.capability.allowrscdisabledstatus = 1; > > Have you tested on the new host to verify: Before this patch, the host shows > RSC status on, and after this patch the host shows it's off? I have completed the patch sanilty tests. We are working on an upgraded host setup to test the rsc specific changes, will update with results soon. > > Thanks, > - Haiyang