[v1,13/38] net/mvpp2: add loopback support
diff mbox series

Message ID 20201202101212.4717-14-lironh@marvell.com
State Changes Requested
Delegated to: Jerin Jacob
Headers show
Series
  • net/mvpp2: misc updates
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Dec. 2, 2020, 10:11 a.m. UTC
From: Yuri Chipchev <yuric@marvell.com>

add support for loopback mode

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Michael Shamis Dec. 23, 2020, 9:41 a.m. UTC | #1
Reviewed-by: Michael Shamis <michaelsh@marvell.com>

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of lironh@marvell.com
Sent: Wednesday, December 2, 2020 12:12 PM
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Cc: dev@dpdk.org; Yuri Chipchev <yuric@marvell.com>; Liron Himi <lironh@marvell.com>
Subject: [dpdk-dev] [PATCH v1 13/38] net/mvpp2: add loopback support

From: Yuri Chipchev <yuric@marvell.com>

add support for loopback mode

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index c70a8fe93..5cd9ee38d 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -766,6 +766,12 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
+	ret = pp2_ppio_set_loopback(priv->ppio, dev->data->dev_conf.lpbk_mode);
+	if (ret) {
+		MRVL_LOG(ERR, "Failed to set loopback");
+		goto out;
+	}
+
 	if (dev->data->promiscuous == 1)
 		mrvl_promiscuous_enable(dev);
 
--
2.28.0

Patch
diff mbox series

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index c70a8fe93..5cd9ee38d 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -766,6 +766,12 @@  mrvl_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
+	ret = pp2_ppio_set_loopback(priv->ppio, dev->data->dev_conf.lpbk_mode);
+	if (ret) {
+		MRVL_LOG(ERR, "Failed to set loopback");
+		goto out;
+	}
+
 	if (dev->data->promiscuous == 1)
 		mrvl_promiscuous_enable(dev);