patches for DPDK stable branches
 help / color / mirror / Atom feed
From: <danat@marvell.com>
To: <jerinj@marvell.com>
Cc: <dev@dpdk.org>, <danat@marvell.com>, <lironh@marvell.com>,
	Meir Levi <mlevi4@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH] net/mvpp2: fix declare unsupported vlan offload features
Date: Sun, 11 Jul 2021 16:13:14 +0300	[thread overview]
Message-ID: <20210711131314.11985-1-danat@marvell.com> (raw)

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

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


             reply	other threads:[~2021-07-11 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 13:13 danat [this message]
2021-07-12  9:09 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210711131314.11985-1-danat@marvell.com \
    --to=danat@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=lironh@marvell.com \
    --cc=mlevi4@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).