net/bonding: fix MAC address reset
authorKiran Kumar <kiran.kokkilagadda@caviumnetworks.com>
Wed, 23 May 2018 09:11:21 +0000 (14:41 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 15 Jun 2018 14:22:57 +0000 (16:22 +0200)
commitfb6eb1e69c499feb5f36193b906c910553835cc6
treed323ab38ecaaee9f0b7c3311ffc41e890d5c6b37
parent63b113afa51f223325642705685d3f1004cfdcaa
net/bonding: fix MAC address reset

Currently when resetting bond mac address, we are getting the
persisted mac address from slave info considering primary port
as index. But we need to compare the port id from slave info
with the primary port to get the primary slave index and get
the persisted mac address. Without this fix, persisted mac addr
will be zero and rte_eth_dev_default_mac_addr_set will fail.

Fixes: a45b288ef21a ("bond: support link status polling")
Cc: stable@dpdk.org
Signed-off-by: Kiran Kumar <kiran.kokkilagadda@caviumnetworks.com>
drivers/net/bonding/rte_eth_bond_api.c