Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6638747rwp; Tue, 18 Jul 2023 03:45:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlF5gWuOmn2lGQ86tVklzV12fZiH12ONKTJcer1lzS208J3dOW+/j5Wt7OECE0mwY8Ml0oR1 X-Received: by 2002:a05:6a00:b90:b0:66a:5d4a:e47d with SMTP id g16-20020a056a000b9000b0066a5d4ae47dmr20441768pfj.8.1689677159479; Tue, 18 Jul 2023 03:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689677159; cv=none; d=google.com; s=arc-20160816; b=ZXVOz0F+9U/Pe/7pPR6CugKWopP4oY+CQo1Xx1MQwT4SP8dncnbyS7IepmMKrLrmbP YH1ju/MSMDpztCe3wNkTynwq3XmRNtKTYAYTrq3dIq1jdzAYsLbdLA6kRAGV9d9/Dk24 mA8P2bwyBx77Q5nS/iw0gk9RY/IPVBXxhuwCIiB1LKP7FiLYrMEaGujXjyoBusFjwQ8N Yh5KiNmicpnRWqz/VqdyKras9+Rold7zVFQyxu8IOPa9kSeQVCKhxOJI3i6C0B+FUyhY nxyBB90jU7kv1vEL/pM2AtkhY5nTff4P8GIeLVwq4hTYU16ng43LR9I1H34MlQMuiUoq uYEg== 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=6XGcDhIWrhS23tD6OwMQQJa/j5MXYUXS0CKJz9pthPA=; fh=TjNvWDV+DW341RlQ9PLoW9lxFGDk0RgufyO2pkROl0k=; b=KJ3CZbOFQuMxXVNSkidow7mSIY7MMfU2VJp/ePqpQ94K2jFiZ8iQBUG6tiwQ0kzppW U9CUtzW45OA06Q/bpmyGLk2sADncRIc+OHggy3STh4vXxotDAriYwE1gDrYtNdansHgn BOmKrb+F12oHIan2To62ZdDAst0hw4iVzmwUKhCDXYobAYRiXs40me3tbVUBuWpa+F7/ Vzpo4y8dD+S7F2/6YCkurTG5vjMKIPbKH7248pGm6jXaXimJVeY6dcSpTovoTNIOKhUG OWSgAjby7rlFQUZcA7oJAJRJr3WrO/tl2zaX9DwxiszmHXJqh3CdFoWQIcT0X7Kx9Pv2 W7Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=BQIFUHHM; 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 d10-20020a63fd0a000000b00557888f1a61si1398790pgh.259.2023.07.18.03.45.45; Tue, 18 Jul 2023 03:45:59 -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=BQIFUHHM; 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 S230328AbjGRKSs (ORCPT + 99 others); Tue, 18 Jul 2023 06:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjGRKSr (ORCPT ); Tue, 18 Jul 2023 06:18:47 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 54C72BD; Tue, 18 Jul 2023 03:18:46 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1134) id C2418232AD57; Tue, 18 Jul 2023 03:18:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C2418232AD57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1689675525; bh=6XGcDhIWrhS23tD6OwMQQJa/j5MXYUXS0CKJz9pthPA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BQIFUHHMEi1O3hQvxP8eYYA4ZWRBtBVbDAATEZhC1DdLBFlVrT7GkNbdRe09o/sbs vlPjlNtLUv9vhFrMQ+oIXuiWpRNq6MXagDjUMDBiRMuRKOIHd+7Co90Hh9e0QgBqkc uKrO/P9hrSDr9YT5FXWASiCeUezrmkRel6316iE0= Date: Tue, 18 Jul 2023 03:18:45 -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: <20230718101845.GA24931@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1688032719-22847-1-git-send-email-shradhagupta@linux.microsoft.com> <20230703043742.GA9533@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230703043742.GA9533@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-17.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED, 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 Sun, Jul 02, 2023 at 09:37:42PM -0700, Shradha Gupta wrote: > 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 Completed this testing, rsc status reflects properly with the patch.