From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5ADB5437B2; Thu, 28 Dec 2023 13:18:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2298402BA; Thu, 28 Dec 2023 13:18:44 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 02B374026A for ; Thu, 28 Dec 2023 13:18:42 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4T16x12q00zZfkv; Thu, 28 Dec 2023 20:18:29 +0800 (CST) Received: from kwepemd100004.china.huawei.com (unknown [7.221.188.31]) by mail.maildlp.com (Postfix) with ESMTPS id 2BE19180032; Thu, 28 Dec 2023 20:18:40 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Thu, 28 Dec 2023 20:18:30 +0800 From: Jie Hai To: , , Yisen Zhuang CC: , Subject: [PATCH] net/hns3: don't support QinQ insert for VF Date: Thu, 28 Dec 2023 20:14:28 +0800 Message-ID: <20231228121429.1264196-1-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemd100004.china.huawei.com (7.221.188.31) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Chengwen Feng In the HIP08 platform, the PF driver will notify VF driver to update the PVID state [1], and VF will declare support QinQ insert when PVID is disabled. In the later platform (e.g. HIP09), the hardware has been improved, so the PF driver will NOT notify VF driver to update the PVID state. However, the later platform still have constraint: PVID and QinQ insert cannot be enabled at the same time, otherwise, the hardware discards packets and reports an error interrupt. Plus, as far as we known, VF driver's users don't use the QinQ insert. Therefore, we declare that the VF driver don't support QinQ insert. [1] commit b4e4d7ac9f09 ("net/hns3: support setting VF PVID by PF driver") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Jie Hai --- drivers/net/hns3/hns3_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c index 8f224aa00c7b..28c26b049cf9 100644 --- a/drivers/net/hns3/hns3_common.c +++ b/drivers/net/hns3/hns3_common.c @@ -85,7 +85,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info) RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE | RTE_ETH_TX_OFFLOAD_VLAN_INSERT); - if (!hw->port_base_vlan_cfg.state) + if (!hns->is_vf && !hw->port_base_vlan_cfg.state) info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_QINQ_INSERT; if (hns3_dev_get_support(hw, OUTER_UDP_CKSUM)) -- 2.30.0