[dpdk-dev,v2,04/11] ixgbe/base: set VF mac addr only when acked by PF
Commit Message
This patch resolves an issue where VF mac address is zeroed out
in cases where the VF driver is loaded while the PF interface
is down.
The solution is to only set it when we get an ACK from the PF.
Fixes: 6202266e5680 ("ixgbe/base: vf changes")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
doc/guides/rel_notes/release_16_04.rst | 6 ++++++
drivers/net/ixgbe/base/ixgbe_vf.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
@@ -74,6 +74,12 @@ EAL
Drivers
~~~~~~~
+* **ixgbe/base: Fixed zeroed VF mac address.**
+
+ Resolved an issue where VF mac address is zeroed out in cases where the VF
+ driver is loaded while the PF interface is down.
+ The solution is to only set it when we get an ACK from the PF.
+
Libraries
~~~~~~~~~
@@ -228,7 +228,9 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw)
msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_NACK))
return IXGBE_ERR_INVALID_MAC_ADDR;
- memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
+ if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
+ memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
+
hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
return ret_val;