net/mvpp2: support loopback
authorYuri Chipchev <yuric@marvell.com>
Wed, 27 Jan 2021 16:09:24 +0000 (18:09 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:11 +0000 (18:16 +0100)
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

index 2ec2330..f215500 100644 (file)
@@ -750,6 +750,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);