Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3896764rdb; Mon, 11 Dec 2023 03:23:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcgIMaSxXDYj7/y1ifx8jNFtfGA7HQvRxl++q96wNYx2Pmoa20m2j3JyBDFLOxTnuayfXN X-Received: by 2002:a05:6358:419d:b0:170:6eb2:783 with SMTP id w29-20020a056358419d00b001706eb20783mr5762816rwc.28.1702293797785; Mon, 11 Dec 2023 03:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702293797; cv=none; d=google.com; s=arc-20160816; b=BdXkN7BFhf1g6hKcQX1FMLUKd+iJGuM69D6OlBMTDezSZFUyqlHsVvYxXMp1HJyXSD DLcfAoI2yvAjRD4/IBx4R/ysMWc/3sBTUvz06OcjwgmxoAXVFpZcrq74MiD72y7qqGWR f5FwzExRch7yOHrMMVNrmHzELRA4VSpBoevukGodkq5H7/Yo2JqBS8EIhsqw67ftjuTG y1Zyi1WeGNPUvlfsNDhpf6Qr8GH3tvD5DxGOYkcQqBXwpuJEdiUxoVC/oztTpVxRKAhH 4hTxpv0RmW8h8X1ncxcGtUGc9bzs9Tq53YkPpPN4iCdUig0O0eWe2lu1E+AdS14RahPv 07qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7WZJCKbCr9Podif3y7Hd2jwKBObVAB2g0AB3VvrmFw8=; fh=1T2kbtccKJzMZqeNsZtXZgpJor92iclbTzPb4iZQsho=; b=lrmqFbW2QYcJcw+hQPeu/r1cPD5OzTFSWMo/BbOkQND1J41SndyNHDDruDYBARa/sH 7XRfhySMsVVypuId20YpB8bhq1bpYzgCBuVEY5ywdv+IjHrAztgiJ+1LHSQZvVmImKkq doF765JpdKDH3HqhT0Zh3QLW7mmJ1VlbVYParTAu/3VIKsO7aKExxItLv6slti35arax mhyZpCKYryKjblD7Wx6PMv670tRmQVB0t/1wZCpD4c7eT+0tcBdnqu62lrtu72rL5xkc gsLjYQroO6GuOtHURDHf4sQdfuJzcX/W3CgFE9NoB/5ERoMPp/rptp2/59YvioqzUDoL oh0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fS0qaeX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c22-20020a63da16000000b005641315d956si5964942pgh.147.2023.12.11.03.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fS0qaeX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 67856805B332; Mon, 11 Dec 2023 03:23:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234341AbjLKLXF (ORCPT + 99 others); Mon, 11 Dec 2023 06:23:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234311AbjLKLXE (ORCPT ); Mon, 11 Dec 2023 06:23:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85FC1AC for ; Mon, 11 Dec 2023 03:23:10 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F2E8C433C8; Mon, 11 Dec 2023 11:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702293790; bh=RvXeZsCsTRB/ykFjhY8FOPGVRNC7qDb5nFcV0xvctXA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fS0qaeX8EfWKEh9IFSNTv9viV0+RH5CMAUNGSPtr0gzzUh3wQ1OQWEYPuGog/n7qa JG9vgFJieBvXCujm3q+AGF5r8aHBCkm8Ev14Zf9GpaVsm5ATjGJA7p0a6t3+RZgjjj zHbJiq93+6efh3/fgpfwAV8HtmmyJwsDuHmkQMkP89sohR/RpB2vS0WAyxSdCLgRkw BZ5Vf9/B4yqGg/VWi1U27vhwXs/xk2fU77XUQucztqh37e9OWdKr2hZIuQoKz+1Dpb hy9m9kaBsWbkDmwO+cca9g0ykwF5DHT+pqop0MjRzCuWWFB1q8g9VMhPhAM2HGky7y zoodfxRSjtLOQ== Date: Mon, 11 Dec 2023 13:23:05 +0200 From: Leon Romanovsky To: Shinas Rasheed Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Haseeb Gani , Vimlesh Kumar , "egallen@redhat.com" , "mschmidt@redhat.com" , "pabeni@redhat.com" , "horms@kernel.org" , "kuba@kernel.org" , "davem@davemloft.net" , "wizhao@redhat.com" , "kheib@redhat.com" , "konguyen@redhat.com" , Veerasenareddy Burru , Sathesh B Edara , Eric Dumazet Subject: Re: [EXT] Re: [PATCH net-next v3 2/4] octeon_ep: PF-VF mailbox version support Message-ID: <20231211112305.GD4870@unreal> References: <20231211063355.2630028-1-srasheed@marvell.com> <20231211063355.2630028-3-srasheed@marvell.com> <20231211084652.GC4870@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Dec 2023 03:23:16 -0800 (PST) On Mon, Dec 11, 2023 at 10:31:32AM +0000, Shinas Rasheed wrote: > Hi Leon, > > > > @@ -28,10 +28,18 @@ static void octep_pfvf_validate_version(struct > > octep_device *oct, u32 vf_id, > > > { > > > u32 vf_version = (u32)cmd.s_version.version; > > > > > > - if (vf_version <= OCTEP_PFVF_MBOX_VERSION_V1) > > > - rsp->s_version.type = OCTEP_PFVF_MBOX_TYPE_RSP_ACK; > > > + dev_dbg(&oct->pdev->dev, "VF id:%d VF version:%d PF > > version:%d\n", > > > + vf_id, vf_version, OCTEP_PFVF_MBOX_VERSION_CURRENT); > > > + if (vf_version < OCTEP_PFVF_MBOX_VERSION_CURRENT) > > > + rsp->s_version.version = vf_version; > > > else > > > - rsp->s_version.type = OCTEP_PFVF_MBOX_TYPE_RSP_NACK; > > > + rsp->s_version.version = > > OCTEP_PFVF_MBOX_VERSION_CURRENT; > > > + > > > + oct->vf_info[vf_id].mbox_version = rsp->s_version.version; > > > + dev_dbg(&oct->pdev->dev, "VF id:%d negotiated VF version:%d\n", > > > + vf_id, oct->vf_info[vf_id].mbox_version); > > > + > > > + rsp->s_version.type = OCTEP_PFVF_MBOX_TYPE_RSP_ACK; > > > } > > > > <...> > > > > > +#define OCTEP_PFVF_MBOX_VERSION_CURRENT > > OCTEP_PFVF_MBOX_VERSION_V1 > > > > This architecture design is unlikely to work in the real world unless > > you control both PF and VF environment. Mostly PF is running some old > > legacy distribution while VFs run more modern OS and this check will > > prevent to run new driver in VF. > > > > Thanks > > Thanks for the review. This version validation only concerns regarding the control net API layer (which is used to communicate with > the firmware). In the case you have described, this instead enables new VF drivers to atleast work atop legacy PF drivers (note legacy here still > refers to PF drivers which support this backward compatibility), although they might not be able to use the latest control net functionalities that they > have been enabled for. The question what will be in X years from now, when you will have v100? Will you fallback to v0 for backward compatibility? > > In the absence of such a backward compatibility, VF drivers would issue control net requests which PF drivers wouldn't know, only leading to logs of > incompatibility errors and erroneous usage. > > Also again please note that this version compatibility only concerns the control net infrastructure and API (the control plane). It doesn't matter, even in best scenario, you can't guarantee that code in VM actually implements version Y fully and will need to check correctness per-command anyway. Thanks >