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.3 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 C472BC48BCF for ; Wed, 9 Jun 2021 11:35:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A274861364 for ; Wed, 9 Jun 2021 11:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238681AbhFILhS (ORCPT ); Wed, 9 Jun 2021 07:37:18 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3923 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234139AbhFILhR (ORCPT ); Wed, 9 Jun 2021 07:37:17 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0Q1r16SRz6w4c; Wed, 9 Jun 2021 19:32:16 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 19:35:19 +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; Wed, 9 Jun 2021 19:35:19 +0800 Subject: Re: [PATCH RESEND iproute2-next] devlink: Add optional controller user input To: Parav Pandit , "dsahern@gmail.com" , "stephen@networkplumber.org" , "netdev@vger.kernel.org" CC: Jiri Pirko , "moyufeng@huawei.com" , "linuxarm@openeuler.org" References: <20210603111901.9888-1-parav@nvidia.com> <338a2463-eb3a-f642-a288-9ae45f721992@huawei.com> <8c3e48ce-f5ed-d35d-4f5e-1b572f251bd1@huawei.com> <17a59ab0-be25-3588-dd1e-9497652bfe23@huawei.com> <4e696fd6-3c7b-b48c-18da-16aa57da4d54@huawei.com> From: Yunsheng Lin Message-ID: Date: Wed, 9 Jun 2021 19:35:18 +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: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggeme720-chm.china.huawei.com (10.1.199.116) 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/9 17:24, Parav Pandit wrote: >> From: Yunsheng Lin >> >> I thought the representor ports of a PF'eswitch is decided by the function >> under a specific PF(For example, the PF itself and the VF under this PF)? > > Eswitch is not per PF in context of smartnic/multi-host. So the Eswitch may be per PF in context of *non*-"smartnic/multi-host", right? It seems that it makes more sense to set the eswitch mode based on devlink port instance instead of devlink instance if devlink instance represents a multi-function ASIC? > PF _has_ eswitch that contains the representor ports for PF, VF, SF. > >> >>> Each representor port represent either PF, VF or SF. >>> This PF, VF or SF can be of local controller residing on the eswitch device or >> it can be of an external controller(s). >>> Here external controller = 1. >> >> If I understood above correctly: >> The fw/hw decide which PF has the eswitch, and how many >> devlink/representor port does this eswitch has? > Number of ports are dynamic. When new SFs/VFs are created, ports get added to the switch. > >> Suppose PF0 of controller_num=0 in have the eswitch, and the eswitch may >> has devlink/representor port representing other PF, like PF1 in >> controller_num=0, and even PF0/PF1 in controller_num=1? > Yes. Correct. Thanks for clarifying, I think I can see the big picture now. >