From: Peng Zhang <peng.zh...@corigine.com>

The logic in NFDk datapatch can make sure there only one layer VLAN,
so remove the unneeded logic here and make it clean and easy to
understand.

Fixes: 7c82b8626af8 ("net/nfp: support VLAN insert with NFDk")
Cc: sta...@dpdk.org

Signed-off-by: Peng Zhang <peng.zh...@corigine.com>
Reviewed-by: Chaoyong He <chaoyong...@corigine.com>
Reviewed-by: Long Wu <long...@corigine.com>
---
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c 
b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
index e6847ccb33..2cea5688b3 100644
--- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
+++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
@@ -141,7 +141,6 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
        uint32_t meta_type;
        struct nfp_net_hw *hw;
        uint32_t header_offset;
-       uint8_t vlan_layer = 0;
        uint8_t ipsec_layer = 0;
        struct nfp_net_meta_raw meta_data;
 
@@ -184,12 +183,7 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
                        meta += NFP_NET_META_FIELD_SIZE) {
                switch (meta_type & NFP_NET_META_FIELD_MASK) {
                case NFP_NET_META_VLAN:
-                       if (vlan_layer > 0) {
-                               PMD_DRV_LOG(ERR, "At most 1 layers of vlan is 
supported");
-                               return -EINVAL;
-                       }
                        nfp_net_meta_set_vlan(&meta_data, pkt, layer);
-                       vlan_layer++;
                        break;
                case NFP_NET_META_IPSEC:
                        if (ipsec_layer > 2) {
-- 
2.39.1

Reply via email to