Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3247443pxj; Tue, 1 Jun 2021 00:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4zjfYcxtwpCy9LSRNUalcsn9IzZSGxb97vSSzYBOAjxdrM9MhyMR6rDPy5u2QZUzyLFEP X-Received: by 2002:a92:640d:: with SMTP id y13mr20695125ilb.158.1622532834294; Tue, 01 Jun 2021 00:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622532834; cv=none; d=google.com; s=arc-20160816; b=IrD+5tR/EvhKAxRn/aM8kA/1tc7xW3K14ELOCZTXrx0d/wJwz4D+wuXT0dWrT6CQug Ak6p+Gf1qfkfDbyP4klfoc8JWuQ2aJiKYaKrQZvPMqkDFNypsI4NdoDKw1DU4pafE3Ae DFJTovnkfUUz+3VFx0M5nPcLzQP/HiAQRbXU7ogJW3x3fUPMDb1N+QghMyQpVE1ahP6H HBIQ0SyrMhfPuvXXs8srym7sgk+71IPlZ0DW6/vNkHqXBlCxAHrB9jo1RHxzDODqb5f+ Evma7BxCevVwir4N1A+mDBnFrC1Y7pE0o6rtVsEtH5tYF+9KoobV/AQqs/o7C6LVWgsT nf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=KWIDkf7YWRJ9a9vwjuFaryLojWhv7MLllZYZiopgO7k=; b=f7bSWXCkdibNsJRSM85aFsFtq5QB2svBD1GFknL66uTkPlShOaM6y6HQAE7irEW8pc 5NCvfNE8pnKbZyjTajWwvQ1ZziMAfr3j0eN0kT/CisPRz/tFj3f9/HOdD1AgJMV6TDUc 1qzEt+AyQksdakENL/AORAruAdoh8pZLNBYOx2S/ZT5hczIkyzRBMB+zIxTZRM7ESg8w JbSbRdCgt5yEHfGkx8ea/lsxJqBupSgq5eXGK+DsdRaKxOkqg/Fp4PcyLENafV7TiPqN cbC2hvYC/J/FmRIAiikyCWRlvK6cGLhAcMLGa35xZfBp2ZJAxhn07MABrDxieyaeSOVO GgXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si17536820iol.40.2021.06.01.00.33.40; Tue, 01 Jun 2021 00:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233030AbhFAHey (ORCPT + 99 others); Tue, 1 Jun 2021 03:34:54 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3489 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbhFAHex (ORCPT ); Tue, 1 Jun 2021 03:34:53 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FvP2W21X0zYrxk; Tue, 1 Jun 2021 15:30:27 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 15:33:09 +0800 Received: from [127.0.0.1] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 15:33:09 +0800 Subject: Re: [RFC net-next 0/8] Introducing subdev bus and devlink extension To: Jakub Kicinski , moyufeng CC: Jakub Kicinski , Jiri Pirko , Parav Pandit , Or Gerlitz , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "michal.lkml@markovi.net" , "davem@davemloft.net" , "gregkh@linuxfoundation.org" , Jiri Pirko , Salil Mehta , "lipeng (Y)" , Guangbin Huang , , "chenhao (DY)" , Jiaran Zhang References: <1551418672-12822-1-git-send-email-parav@mellanox.com> <20190301120358.7970f0ad@cakuba.netronome.com> <20190304174551.2300b7bc@cakuba.netronome.com> <76785913-b1bf-f126-a41e-14cd0f922100@huawei.com> <20210531223711.19359b9a@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> From: Yunsheng Lin Message-ID: <7c591bad-75ed-75bc-5dac-e26bdde6e615@huawei.com> Date: Tue, 1 Jun 2021 15:33:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20210531223711.19359b9a@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggeme718-chm.china.huawei.com (10.1.199.114) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/1 13:37, Jakub Kicinski wrote: > On Mon, 31 May 2021 18:36:12 +0800 moyufeng wrote: >> Hi, Jiri & Jakub >> >> Generally, a devlink instance is created for each PF/VF. This >> facilitates the query and configuration of the settings of each >> function. But if some common objects, like the health status of >> the entire ASIC, the data read by those instances will be duplicate. >> >> So I wonder do I just need to apply a public devlink instance for the >> entire ASIC to avoid reading the same data? If so, then I can't set >> parameters for each function individually. Or is there a better suggestion >> to implement it? > > I don't think there is a great way to solve this today. In my mind > devlink instances should be per ASIC, but I never had to solve this > problem for a multi-function ASIC. Is there a reason why it didn't have to be solved yet? Is it because the devices currently supporting devlink do not have this kind of problem, like single-function ASIC or multi-function ASIC without sharing common resource? Was there a discussion how to solved it in the past? > > Can you assume all functions are in the same control domain? Can they > trust each other? "same control domain" means if it is controlled by a single host, not by multi hosts, right? If the PF is not passed through to a vm using VFIO and other PF is still in the host, then I think we can say it is controlled by a single host. And each PF is trusted with each other right now, at least at the driver level, but not between VF. > > . >