diff mbox series

net/mvpp2: fix declare unsupported vlan offload features

Message ID 20210711131314.11985-1-danat@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series net/mvpp2: fix declare unsupported vlan offload features | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-testing fail Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing warning Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

danat@marvell.com July 11, 2021, 1:13 p.m. UTC
From: Meir Levi <mlevi4@marvell.com>

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 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Jerin Jacob July 12, 2021, 9:09 a.m. UTC | #1
On Sun, Jul 11, 2021 at 6:43 PM <danat@marvell.com> wrote:
>
> From: Meir Levi <mlevi4@marvell.com>
>
> 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>


Changed the subject to net/mvpp2: fix VLAN ops return code

Applied to dpdk-next-net-mrvl/for-next-net. Thanks

> ---
>  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.17.1
>
diff mbox series

Patch

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;
 }