Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4038846rdb; Mon, 11 Dec 2023 07:17:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbpGTgc//f3uXOftWbD6mxxgz9c60X1vzfk+Ib31XFIigKuN2r+VXkLUNx/7FWCdssidIS X-Received: by 2002:a17:902:ea06:b0:1d0:9b2d:566b with SMTP id s6-20020a170902ea0600b001d09b2d566bmr2084787plg.6.1702307835729; Mon, 11 Dec 2023 07:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702307835; cv=none; d=google.com; s=arc-20160816; b=o177kjiozV3sQcvllBdTteZoXl1cnALY+dliB2Xy7jofSIu/6yBeqLCIonUhDCMoCy BCIiWSE5LWE6Ak/G6dzZZ6nAdUVctifPQV39UnNgoTUjo2N0cyE/TbFUlRJ9xOn0nZzT YwqwOq07apRtb4VfsMG+TkCuShNhczsgSBZR0Rnvo3P4kHNsa2vEHKRmV5R7sFuf0QpX rsTlLDKvY8PlJT7R8t2x7Z9qQB49wKdnR0h0hHVor7zJdgh3ErTzdxOSXDJsDZk4OBU3 AQynu7YkeGvQrTQOn70TmXmUJqaswUqVJ8x7d7e2pO1GE4Tg4TJ6SRfXJ1oHkGdmOBFM 3tXg== 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=S2ihHd9+7y4v8tQKVfZ53n890dFt0R/fUEr/4WLLY5M=; fh=1T2kbtccKJzMZqeNsZtXZgpJor92iclbTzPb4iZQsho=; b=nzmL0Ujp67pH3yujydFuFmuCGxGlmHSeJ0SIJVc/d5EcU2WRw91p6Z+d3wEkVkzk/l hc7FtJ4QijgCBfaUofQsJlFZgS1uxlCbyl0cNk9gtTQnpD4cDxC5oZllF0c2G2BfByvV osUc5zsT1MF+HfT8Q8dHbT/DWacQfRIdkjfgnUb9rJwUESWER+G4OenecsFtm2Z/lIBT 4uAJYdMdpacKOSRdCB1moUWGUSeoWLlhPdj8NYcW4Bj1Qv21CBppaXWmu5KMZaSkPYky pKmf1CdmwCumxfU0gP+ktaQGHQO106/6ko+ifHQsb18tDuO46tydjpbmun9uQ8NWeuQ9 yBXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EnaNmQrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id f11-20020a170902e98b00b001cf8d316dfcsi6155035plb.236.2023.12.11.07.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 07:17:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EnaNmQrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id B1054805C72F; Mon, 11 Dec 2023 07:17:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344101AbjLKPQ6 (ORCPT + 99 others); Mon, 11 Dec 2023 10:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343886AbjLKPQ5 (ORCPT ); Mon, 11 Dec 2023 10:16:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB665DC for ; Mon, 11 Dec 2023 07:17:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E8E0C433C7; Mon, 11 Dec 2023 15:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702307823; bh=+7xaZHCEReXLiHg4uE2jmuXbc5piUceJjBYT0cz0lR4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EnaNmQrg5tQmIAu29CozoPxM8dfsAXGYElFYieadsSdQrPICykpcqgPvym0DA7X7r sXPpjePqoSGJoCe/HUL7oYE2ql3Kl0vWjSKVYDxyQ7E8FUOE30ktLlCQhS5kzIrEdk zjpn2kzJobjlzqZW0OIEoeB8u+DNXAg7dbshVBeVd+PMM2go9ouRvs0x0OkVrHQHWh Z0b3L59Mt5diZ54fXeROIW6xEv3V5FTxsK5UX95LduxWGLiD3p6DaovBoZU4Cx3EAG 9OyDudxRwO0pRsBs2a1D5qh2wfGp1dYTTX1pSmoJ2DH4cAEg0ADKOv60LN6TnKerfk jAVn7SDUB1EIQ== Date: Mon, 11 Dec 2023 17:16:58 +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: <20231211151658.GI4870@unreal> References: <20231211063355.2630028-1-srasheed@marvell.com> <20231211063355.2630028-3-srasheed@marvell.com> <20231211084652.GC4870@unreal> <20231211112305.GD4870@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 07:17:11 -0800 (PST) On Mon, Dec 11, 2023 at 02:51:19PM +0000, Shinas Rasheed wrote: > > > > 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 > > I'm afraid as to what else can be an alternative? The control net commands have to be decoded and passed by the PF driver for the VFs, > as only the PFs have access to talk to firmware directly. The VF drivers do not have an alternative way to query control net APIs, and may fail > if the control net APIs they have are not even recognized by the PF to decode them. > > Either VF commands which the PF can't support can be blocked at the source (by the equivalent PF-VF backward compatibility which will exist in VF drivers) > by this negotiation, or we have to let commands come through and fail them, leading to just redundancy in terms of running code. I don't see how this negotiation in > any way 'limit' the VF drivers. > > As you said, in essence the VF drivers will have to fallback to v0 for backward compatibility if the native host uses some old OS having older PF drivers. If not, the > commands would come and fail anyways at the PF. Either way, it's an error case and this negotiation is just to decide if we are going to allow letting such commands in. I don't know what netdev maintainers will do with this code, I just pointed to this architecture/HW troublesome design. Thanks > > Thanks for your time