diff mbox

[dpdk-dev,v3,3/7] net/mrvl: do not enable port after setting MAC address

Message ID 1512466762-1982-4-git-send-email-tdu@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tomasz Duszynski Dec. 5, 2017, 9:39 a.m. UTC
Setting enabled port's mac address caused it to stop receiving
packets. Now as that issue is fixed in library renabling port
is no longer necessary.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

--
2.7.4
diff mbox

Patch

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 47f12b8..c44a2bc 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -822,15 +822,14 @@  static void
 mrvl_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
+	int ret;

-	pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
-	/*
-	 * TODO
-	 * Port stops sending packets if pp2_ppio_set_mac_addr()
-	 * was called after pp2_ppio_enable(). As a quick fix issue
-	 * enable port once again.
-	 */
-	pp2_ppio_enable(priv->ppio);
+	ret = pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
+	if (ret) {
+		char buf[ETHER_ADDR_FMT_SIZE];
+		ether_format_addr(buf, sizeof(buf), mac_addr);
+		RTE_LOG(ERR, PMD, "Failed to set mac to %s\n", buf);
+	}
 }

 /**