Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2552561pxb; Mon, 18 Apr 2022 03:13:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvfd0Ucvyg+u02B5CdWmhjqzP+N35IDR+NJhrlz+ICiqS80RaUJ98QhOezi56JhOniEttu X-Received: by 2002:a17:90b:789:b0:1bc:293c:1445 with SMTP id l9-20020a17090b078900b001bc293c1445mr17494196pjz.111.1650276823518; Mon, 18 Apr 2022 03:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650276823; cv=none; d=google.com; s=arc-20160816; b=lDMnfTmOQGcWG5vciY3P2zVh5JmsxVtshivI3pMOUq5wAcEgrwh1+R5FzfasOPg4TO ZcYfI4HixcDZ5fI6VpKzDTTIk131JmUwulHxX+T8LNTP+6agjYtlSsnA3F+Kx1geZYz6 RjaKKCJWYP8cTfSjQrhW5wjF4VogTBmbEMTKwBDVolgl+OikJPp9y+DAheEpX2QOKuPF RVIkFJ6mFMlDh9kyU8w2pf4xMItGmwYPxZuRGSpRG0x4p+O3ia474DBSSJVWGjcwpKpv Uj3g7X0G8msaGLc03LSNriYJAG34hRZwzpx51/og7Cki3TJwD11cO2nSIxw+U4siHWs8 oP7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+qgb1No9bkBa0YFj6rMF4ZVEUogwiqUT2u/Q9DAP808=; b=Zacqq3hSPa5CBOLDc/heC7sfdR1tJ47y1qJA1KzpBGOhmY/JxWrba9RD5cVV4nlqwr 7qho54GSeTdbE7hano5e4Um8uB8reCKGdaUInjPaCDW6gWo5t1yrIHcbTCabTS1MOQQS F1YKmZdFhmW9LayBVYlZ5fuXfTGGsneCeqvOaPL+uvhOwSf0p3tLybLkrClaaYnx9xP0 KEsE11BmqIBI/+/3tQihcxpoMB9AJI0AtTX01KDYPzX7XdtdF3ewxbvGqZ85MXyoRuQP JLIvQ7W2oqdP18a3NVV2ae+RKI7COxDx2nUdPYAYy+xR9OL82SRiYUbnoU3EBLxTM35i h5tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a63ff57000000b00399599c54ffsi8468282pgk.252.2022.04.18.03.13.29; Mon, 18 Apr 2022 03:13:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbiDPJWM (ORCPT + 99 others); Sat, 16 Apr 2022 05:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbiDPJWA (ORCPT ); Sat, 16 Apr 2022 05:22:00 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7237949CA7; Sat, 16 Apr 2022 02:19:28 -0700 (PDT) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KgSLG5XqkzfYkS; Sat, 16 Apr 2022 17:18:46 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 16 Apr 2022 17:19:26 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 16 Apr 2022 17:19:26 +0800 From: Guangbin Huang To: , CC: , , , , Subject: [PATCH net-next 4/9] net: hns3: add failure logs in hclge_set_vport_mtu Date: Sat, 16 Apr 2022 17:13:38 +0800 Message-ID: <20220416091343.35817-5-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220416091343.35817-1-huangguangbin2@huawei.com> References: <20220416091343.35817-1-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 From: Jie Wang Currently, There is a low probability that pf mtu configuration fails, but the information in logs is insufficient for problem locating when the VF mtu value is illegally modified. So record the vf index and vf mtu value at the failure scenario. Signed-off-by: Jie Wang Signed-off-by: Guangbin Huang --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 8cebb180c812..a5dd2c8c244a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -10449,6 +10449,9 @@ int hclge_set_vport_mtu(struct hclge_vport *vport, int new_mtu) /* PF's mps must be greater then VF's mps */ for (i = 1; i < hdev->num_alloc_vport; i++) if (max_frm_size < hdev->vport[i].mps) { + dev_err(&hdev->pdev->dev, + "failed to set pf mtu for less than vport %d, mps = %u.\n", + i, hdev->vport[i].mps); mutex_unlock(&hdev->vport_lock); return -EINVAL; } -- 2.33.0