net/hns3: don't support QinQ insert for VF

Message ID 20231228121429.1264196-1-haijie1@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/hns3: don't support QinQ insert for VF |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Jie Hai Dec. 28, 2023, 12:14 p.m. UTC
  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(-)
  

Comments

Ferruh Yigit Jan. 8, 2024, 6:07 p.m. UTC | #1
On 12/28/2023 12:14 PM, Jie Hai wrote:
> 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>
> 

Applied to dpdk-next-net/main, thanks.
  

Patch

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))