[dpdk-dev,v2] net/i40e: fix setting of MAC address on i40evf
Checks
Commit Message
When setting the MAC address, the ethdev layer copies the new mac
address in dev->data->mac_addrs[0] before calling the dev_ops.
Therefore, "is_same_ether_addr(mac_addr, dev->data->mac_addrs)" was
always true, and the MAC was never set. Remove this test to fix the
issue.
Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 3 ---
1 file changed, 3 deletions(-)
Comments
> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Wednesday, January 3, 2018 9:34 PM
> To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Cc: stable@dpdk.org
> Subject: [PATCH v2] net/i40e: fix setting of MAC address on i40evf
>
> When setting the MAC address, the ethdev layer copies the new mac
> address in dev->data->mac_addrs[0] before calling the dev_ops.
>
> Therefore, "is_same_ether_addr(mac_addr, dev->data->mac_addrs)" was
> always true, and the MAC was never set. Remove this test to fix the issue.
>
> Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>, thanks for the fix.
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xing, Beilei
> Sent: Thursday, January 4, 2018 3:40 PM
> To: Olivier Matz; dev@dpdk.org; Wu, Jingjing
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix setting of MAC address on
> i40evf
>
>
> > -----Original Message-----
> > From: Olivier Matz [mailto:olivier.matz@6wind.com]
> > Sent: Wednesday, January 3, 2018 9:34 PM
> > To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>
> > Cc: stable@dpdk.org
> > Subject: [PATCH v2] net/i40e: fix setting of MAC address on i40evf
> >
> > When setting the MAC address, the ethdev layer copies the new mac
> > address in dev->data->mac_addrs[0] before calling the dev_ops.
> >
> > Therefore, "is_same_ether_addr(mac_addr, dev->data->mac_addrs)" was
> > always true, and the MAC was never set. Remove this test to fix the issue.
> >
> > Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>
> Acked-by: Beilei Xing <beilei.xing@intel.com>, thanks for the fix.
Applied to dpdk-next-net-intel, thanks!
/Helin
@@ -2681,9 +2681,6 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
return;
}
- if (is_same_ether_addr(mac_addr, dev->data->mac_addrs))
- return;
-
if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
return;