Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp447574pxb; Wed, 29 Sep 2021 02:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2pojFvowtIGHbaWu8Wc9orsJwgyJqPZs9XXpuvaq9gjxKQGRYKrFhz+FoTzwsqbam2k/M X-Received: by 2002:a17:902:a5c2:b0:13e:4f02:222 with SMTP id t2-20020a170902a5c200b0013e4f020222mr2115686plq.68.1632908584842; Wed, 29 Sep 2021 02:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632908584; cv=none; d=google.com; s=arc-20160816; b=WyBe4n/uSilkpc8iQznid/+FkeZXSEI1n4Q3Xghij18sVTx1nHztEmgx2xmHTtbJRJ cUjVjyTrTntf2wPisxYMNsp43TIctfbETiVooe3iD7CaGz56cZqHDIfDMwt1fiqam3N7 LhJTTSPhz66zdO8gnTCJo+oNkjQCQodP7oliy+LJRyQrDL9lPDqobN65YkHQDgesLTDZ d5/E93KH6Qm4O0YMxnFGSpngZNx/1NryHO3HnRXbvumynXeyM+9rGShligOPZNY6WN6z az4UlJaUpmxHpWRGxy6W19fpyUtpmzR4VEWUN3brOlRhUzeOEItJINx8eoVvT4qOKxDy nKGw== 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=mAnmjc5OOUwQi0wbrI6tkTHmHsVnFOwlBHGObG85zU4=; b=SwRzdnPqhdcSkHQbcZS0bFBAeTcF75Y3rv89ulwX3zqn3jSYgRsPnm1WrTAIvrl3tg ILvU/Yl9wvvZfIqmAi6UOfSNq9UrgzokaWxTKLNPhXoTTcBqUjFoq5ZmHcyHNuA3arKu yPUIqbUcgiVmFeOvm/TF8k0VE55c1Vk7XwZOkxDJpMulFkOVn80fEziiVyYa4J5X0hZq eFp31C04Xt6oHGTUHgNnWXNseHrchExFx0KtQTFf6LJAolZNHhfR7zLpRpFjOuKCC/fS WwMMAtPRoyfvoNApLzJs4Kx26WiwHMwWBNF+4D/WH0TCPQu+9FdYSQWYiRAdxxNpjfB8 xppA== 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 u11si2324391pfl.104.2021.09.29.02.42.51; Wed, 29 Sep 2021 02:43:04 -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 S232113AbhI2Jlz (ORCPT + 99 others); Wed, 29 Sep 2021 05:41:55 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:13392 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245099AbhI2Jlv (ORCPT ); Wed, 29 Sep 2021 05:41:51 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HKB7R14Pbz8xwD; Wed, 29 Sep 2021 17:35:31 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) 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.2308.8; Wed, 29 Sep 2021 17:40:09 +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.2308.8; Wed, 29 Sep 2021 17:40:08 +0800 From: Guangbin Huang To: , CC: , , , Subject: [PATCH net 6/8] net: hns3: PF enable promisc for VF when mac table is overflow Date: Wed, 29 Sep 2021 17:35:54 +0800 Message-ID: <20210929093556.9146-7-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210929093556.9146-1-huangguangbin2@huawei.com> References: <20210929093556.9146-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If unicast mac address table is full, and user add a new mac address, the unicast promisc needs to be enabled for the new unicast mac address can be used. So does the multicast promisc. Now this feature has been implemented for PF, and VF should be implemented too. When the mac table of VF is overflow, PF will enable promisc for this VF. Fixes: 1e6e76101fd9 ("net: hns3: configure promisc mode for VF asynchronously") Signed-off-by: Guangbin Huang --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 3391244d9d3d..f5b8d1fee0f1 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -12796,8 +12796,12 @@ static void hclge_sync_promisc_mode(struct hclge_dev *hdev) continue; if (vport->vf_info.trusted) { - uc_en = vport->vf_info.request_uc_en > 0; - mc_en = vport->vf_info.request_mc_en > 0; + uc_en = vport->vf_info.request_uc_en > 0 || + vport->overflow_promisc_flags & + HNAE3_OVERFLOW_UPE; + mc_en = vport->vf_info.request_mc_en > 0 || + vport->overflow_promisc_flags & + HNAE3_OVERFLOW_MPE; } bc_en = vport->vf_info.request_bc_en > 0; -- 2.33.0