net/mvpp2: fix not supported VLAN operations status
authorMeir Levi <mlevi4@marvell.com>
Sun, 11 Jul 2021 13:13:14 +0000 (16:13 +0300)
committerJerin Jacob <jerinj@marvell.com>
Mon, 12 Jul 2021 09:07:08 +0000 (11:07 +0200)
vlan_strip and vlan_extend features need to return "unsupported"
error value.

Fixes: ff0b8b10dc4 ("net/mvpp2: support VLAN offload")
Cc: stable@dpdk.org
Signed-off-by: Meir Levi <mlevi4@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
drivers/net/mvpp2/mrvl_ethdev.c

index 1802695..078aefb 100644 (file)
@@ -1873,8 +1873,10 @@ static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask)
        uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
        int ret;
 
-       if (mask & ETH_VLAN_STRIP_MASK)
+       if (mask & ETH_VLAN_STRIP_MASK) {
                MRVL_LOG(ERR, "VLAN stripping is not supported\n");
+               return -ENOTSUP;
+       }
 
        if (mask & ETH_VLAN_FILTER_MASK) {
                if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
@@ -1886,8 +1888,10 @@ static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask)
                        return ret;
        }
 
-       if (mask & ETH_VLAN_EXTEND_MASK)
+       if (mask & ETH_VLAN_EXTEND_MASK) {
                MRVL_LOG(ERR, "Extend VLAN not supported\n");
+               return -ENOTSUP;
+       }
 
        return 0;
 }