DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jie Hai <haijie1@huawei.com>
To: <dev@dpdk.org>, <ferruh.yigit@amd.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>
Cc: <fengchengwen@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH] net/hns3: don't support QinQ insert for VF
Date: Thu, 28 Dec 2023 20:14:28 +0800	[thread overview]
Message-ID: <20231228121429.1264196-1-haijie1@huawei.com> (raw)

From: Chengwen Feng <fengchengwen@huawei.com>

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 <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 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


             reply	other threads:[~2023-12-28 12:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 12:14 Jie Hai [this message]
2024-01-08 18:07 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231228121429.1264196-1-haijie1@huawei.com \
    --to=haijie1@huawei.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=lihuisong@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).