Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp813405imm; Fri, 1 Jun 2018 09:59:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ+DgGqLw9imbmoyg0o9NcBHbE5M4PZ1KQM5iOtuFGkcg3rF/Vb5JRQ6PHxmzq8oIV+yOI0 X-Received: by 2002:a63:203:: with SMTP id 3-v6mr9537597pgc.133.1527872355434; Fri, 01 Jun 2018 09:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527872355; cv=none; d=google.com; s=arc-20160816; b=t0qxkuDvb/yUjXuUKPiF3gV1DiISRK4rsJq5RdtCuidtznf5N4RMS9UMEkTWclr5dA 6uG0wQehbyonswc9auhQwMYgBslC/GlixuyI2avCGqa0JKoilvlsAC9otFGriw7jTPCp 26FAk6kt/9ApuS7ELrYMC6Qrks++e2YsbFXjQeuQ4LN2/ZPb+goIQ7twSF0okZDSMZk/ OPMP2r7wVbUSp0t2y8xP1YLnOs7XqJyEh6m1oPex7WOrGYeMwFYe6iirSvOkmD2cjpR0 2IktxmGO7+Tg83F7nlmZquTiYfTvzD2g/KFWOhJ8OgsmDgffDBYCD4wmYAANDKHruR6T xyiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=zsw3sx+27vhStJB64urAPQz1uJPQZIZpYrGfVDcT+cI=; b=kYRF3k3UeCIXuCFWeNWXYw7D2v5ng9lkQv6SqrilNILUT5Eo79UfF6kuRlxn7F3mPi GBT3SHvVP6xYHF7Yt2Ca9lJN3cZ9nQrSSVJkaIlNg2r17mFrohNadF9GViiTFpM80xJr HnjX7XmgmBFMhv8HD0YHx5R+uKVaYt6Je0WHjt7RTWHKCK0R8S9LqRgKZ58n+VJ8kirc sOqZuR6F43A5thSewF31LSY9A8xjdJ6dhtJgOTOHtQDOsFo2pXcJgS1hkMVTsH++ByIY WgV3lH8+1MNlqU0k9H8w/QtwiwOQIK6iowiWReizXduFVG/HQ4gh1Z24cGyED+cTZ1sz dKpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si5500907plp.496.2018.06.01.09.59.01; Fri, 01 Jun 2018 09:59:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbeFAQx5 (ORCPT + 99 others); Fri, 1 Jun 2018 12:53:57 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8247 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751693AbeFAQxw (ORCPT ); Fri, 1 Jun 2018 12:53:52 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2566DD2A6B364; Sat, 2 Jun 2018 00:53:36 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.227.234) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.382.0; Sat, 2 Jun 2018 00:53:29 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 01/11] net: hns3: Disable vf vlan filter when vf vlan table is full Date: Fri, 1 Jun 2018 17:52:01 +0100 Message-ID: <20180601165211.46372-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180601165211.46372-1-salil.mehta@huawei.com> References: <20180601165211.46372-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.227.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin This is only 128 entries for hardware's vf vlan table, when the vf table is full, the firmware will disable the vf vlan filter and return a resp_code of HCLGE_VF_VLAN_NO_ENTRY to driver. This patch checks the if resp_code from firmware is HCLGE_VF_VLAN_NO_ENTRY, if yes, then print a warning and return ok to the caller. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 6916685..4ca5318 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4525,9 +4525,16 @@ static int hclge_set_vf_vlan_common(struct hclge_dev *hdev, int vfid, } if (!is_kill) { +#define HCLGE_VF_VLAN_NO_ENTRY 2 if (!req0->resp_code || req0->resp_code == 1) return 0; + if (req0->resp_code == HCLGE_VF_VLAN_NO_ENTRY) { + dev_warn(&hdev->pdev->dev, + "vf vlan table is full, vf vlan filter is disabled\n"); + return 0; + } + dev_err(&hdev->pdev->dev, "Add vf vlan filter fail, ret =%d.\n", req0->resp_code); -- 2.7.4