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 EC89EC433B4 for ; Thu, 15 Apr 2021 01:11:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE2986117A for ; Thu, 15 Apr 2021 01:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbhDOBLa (ORCPT ); Wed, 14 Apr 2021 21:11:30 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3528 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbhDOBL3 (ORCPT ); Wed, 14 Apr 2021 21:11:29 -0400 Received: from DGGEML403-HUB.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FLLp1717dzRc3P; Thu, 15 Apr 2021 09:08:57 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by DGGEML403-HUB.china.huawei.com (10.3.17.33) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 15 Apr 2021 09:11:04 +0800 Received: from [127.0.0.1] (10.69.26.252) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Thu, 15 Apr 2021 09:11:04 +0800 Subject: Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs To: Jakub Kicinski CC: , , , , , , , Guangbin Huang References: <1618294621-41356-1-git-send-email-tanhuazhong@huawei.com> <1618294621-41356-2-git-send-email-tanhuazhong@huawei.com> <20210413101826.103b25fc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <2dac0fe0-cdcb-a3c5-0c72-7873857824fd@huawei.com> <20210414094230.64caf43e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Huazhong Tan Message-ID: Date: Thu, 15 Apr 2021 09:11:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210414094230.64caf43e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.69.26.252] X-ClientProxiedBy: dggeme712-chm.china.huawei.com (10.1.199.108) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021/4/15 0:42, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 09:51:38 +0800 Huazhong Tan wrote: >> On 2021/4/14 1:18, Jakub Kicinski wrote: >>> On Tue, 13 Apr 2021 14:17:00 +0800 Huazhong Tan wrote: >>>> +static void hclge_push_link_status(struct hclge_dev *hdev) >>>> +{ >>>> + struct hclge_vport *vport; >>>> + int ret; >>>> + u16 i; >>>> + >>>> + for (i = 0; i < pci_num_vf(hdev->pdev); i++) { >>>> + vport = &hdev->vport[i + HCLGE_VF_VPORT_START_NUM]; >>>> + >>>> + if (!test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state) || >>>> + vport->vf_info.link_state != IFLA_VF_LINK_STATE_AUTO) >>>> + continue; >>>> + >>>> + ret = hclge_push_vf_link_status(vport); >>>> + if (ret) { >>>> + dev_err(&hdev->pdev->dev, >>>> + "failed to push link status to vf%u, ret = %d\n", >>>> + i, ret); >>> Isn't this error printed twice? Here and... >> They are in different contexts. here will be called to >> update the link status of all VFs when the underlying >> link status is changed, while the below one is called >> when the admin set up the specific VF link status. > I see. So this error will be printed twice only if these two cases happen at the same, do you mean to add some keyword to distinguish them? > .