diff mbox series

[v2,12/37] net/mvpp2: add loopback support

Message ID 20210122191925.24308-13-lironh@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series net/mvpp2: misc updates | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Jan. 22, 2021, 7:19 p.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(+)
diff mbox series

Patch

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 3891313cf..fc04e1abb 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -756,6 +756,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);