From 71c5085bfbe09b1dd93b0691ecfdf626ac1e9e12 Mon Sep 17 00:00:00 2001 From: Meir Levi Date: Sun, 11 Jul 2021 16:13:14 +0300 Subject: [PATCH] net/mvpp2: fix not supported VLAN operations status 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 Reviewed-by: Liron Himi --- drivers/net/mvpp2/mrvl_ethdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 1802695a0e..078aefbb8d 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -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; } -- 2.20.1