From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72573C47080 for ; Tue, 1 Jun 2021 07:33:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C1D9613AB for ; Tue, 1 Jun 2021 07:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233157AbhFAHey (ORCPT ); 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: netdev@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. > > . >