Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3831287rdb; Mon, 11 Dec 2023 00:47:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE55C8mzLk5gs1n1hMG3EysRtmbxvMvoBuajabPCdAGt0zWYoAaSKW75JMI0jfvZc+glWIj X-Received: by 2002:a17:902:d34c:b0:1d0:c906:f5f1 with SMTP id l12-20020a170902d34c00b001d0c906f5f1mr1399422plk.42.1702284426848; Mon, 11 Dec 2023 00:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702284426; cv=none; d=google.com; s=arc-20160816; b=dRkYxf6rO1NzHK0dbSrUv3EyjTJri6tAyXtIcD7XL8EvNunpAicEolnxBSZX4zfKhz HTFs9m4DA8Sr9V55As/fOqeUDaiJz7vFEZq9Lu4tIJkSwZiIN/XqRVhNGBs43J2U0Ixk a/x6IrGOm4CsJl3sA6qW4cnUTi2rZz35VfL1zLgU0GfvkSYb+ptCgk0zJ5QtgTZbzHnM SrsbYKonDQXi9mu5zfraqkiek+GBmPgFK1hi5WaZNH9+Y0Dk8EgG0ubW9PIBxNmcnCtW w0m6wIOWDWc4eYpr0OSrs8Ildm0tMAW53brXIxG0yikciUzB/9peZ6AfceWHCUVnTyHl e/Lg== 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=bTf+IOsiKK2blwONEG9+zALDV78dew10MLYX4kCsjRM=; fh=0yZCC+0MDxMO/BZV/tJGOH+2v84oWPNoWzQxehnpoRM=; b=LET6EGkSjVGpyyotr2ZADK1sDxRtb6CCqfDjpXwh2PihRmIl3NjyWJYKgEDInhRsmt J2bBzj0W/ZfrH7fLxu8RXCXKlIme8ZiWaZoUQ/8sZkCW7gGVKQRJ+xoDzGnSNELQ0/sI 7S0ICLzbk7sIaO2HQXRnI5fZn98h2aAW8YrWm92b1b9x538k25VziQkJzHcWChBMS624 gHj1JT1/EJOs9cgD/lq95YnlfJBC9mM6eEVDdfNKpUB5ZNkMVvxNwNBUwZ+YiP+ZbXiT kYpCH+MeJ0tJmy5117tXS/b1JdfENYoNR8pAWNRVAsHZdsLMX2vQNUBTEBN8IZZbWWxR bEgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qcDKzfe9; 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 k17-20020a170902ba9100b001d05aa54912si5597621pls.504.2023.12.11.00.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:47:06 -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=qcDKzfe9; 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 749A28090F85; Mon, 11 Dec 2023 00:47:05 -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 S234155AbjLKIqx (ORCPT + 99 others); Mon, 11 Dec 2023 03:46:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbjLKIqv (ORCPT ); Mon, 11 Dec 2023 03:46:51 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14660C4 for ; Mon, 11 Dec 2023 00:46:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D44DBC433C7; Mon, 11 Dec 2023 08:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702284417; bh=zjlRUhnaZnjsZZughQI/BxjLVo+4gBWoqW3Nl+z5Khw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qcDKzfe9rsmIXuu2kqeOHU7yRm2NbwkVuULN0FrjITTjlxqmzO422rRbPkyU8nL4L UD+X9olvrhTq7AGWbcm4s9wEwH/am42xmw/Wwhro9OC85ij8IXXU0D7Bf/cDVeBWFN STOVjZIn/TIkJ9MLNOBNFRHaGE6ovx32H5ebWrpYvstzSSonepFSKAwzII3+VSZviS 9SJf/NMBMoajszoJdo7OsdrMw0krOIB/J94WbDMJuryfWNoqMA6JCHouatti3sNbDG zXWSvluvyvp/HH7gLjm0K2jsmu5lJPaNQkWX+IoMKXirMi8vqnvf+IKjPV9YL0pG0o yO+uop5kGmZMA== Date: Mon, 11 Dec 2023 10:46:52 +0200 From: Leon Romanovsky To: Shinas Rasheed Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hgani@marvell.com, vimleshk@marvell.com, 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 Edara , Eric Dumazet Subject: Re: [PATCH net-next v3 2/4] octeon_ep: PF-VF mailbox version support Message-ID: <20231211084652.GC4870@unreal> References: <20231211063355.2630028-1-srasheed@marvell.com> <20231211063355.2630028-3-srasheed@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231211063355.2630028-3-srasheed@marvell.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 00:47:05 -0800 (PST) On Sun, Dec 10, 2023 at 10:33:53PM -0800, Shinas Rasheed wrote: > Add PF-VF mailbox initial version support > > Signed-off-by: Shinas Rasheed > --- <...> > @@ -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