[dpdk-dev,6/6] net/vmxnet3: preserve configured MAC address

Message ID 1495216863-14121-6-git-send-email-ciwillia@brocade.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Chas Williams May 19, 2017, 6:01 p.m. UTC
  From: George Wilkie <gwilkie@brocade.com>

When starting a vmxnet3 device, it is always writing the permanent MAC
address, even if a different MAC address was configured.  Write from
the device data instead which holds the current one.

Signed-off-by: George Wilkie <gwilkie@brocade.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Shrikrishna Khare May 22, 2017, 6:33 p.m. UTC | #1
On Fri, 19 May 2017, Charles (Chas) Williams wrote:

> From: George Wilkie <gwilkie@brocade.com>
> 
> When starting a vmxnet3 device, it is always writing the permanent MAC
> address, even if a different MAC address was configured.  Write from
> the device data instead which holds the current one.
> 
> Signed-off-by: George Wilkie <gwilkie@brocade.com>

Acked-by: Shrikrishna Khare <skhare@vmware.com>
  

Patch

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d241499..2e80cb1 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -734,7 +734,7 @@  vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 	vmxnet3_dev_vlan_offload_set(dev,
 				     ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
 
-	vmxnet3_write_mac(hw, hw->perm_addr);
+	vmxnet3_write_mac(hw, dev->data->mac_addrs->addr_bytes);
 
 	return VMXNET3_SUCCESS;
 }