Re: [PATCH net 3/4] ice: don't remove netdev->dev_addr from uc sync list
From: Jonathan Toppins <hidden>
Date: 2021-08-10 14:29:20
On 8/9/21 1:14 PM, Tony Nguyen wrote:
From: Brett Creeley <redacted> In some circumstances, such as with bridging, it's possible that the stack will add the device's own MAC address to its unicast address list. If, later, the stack deletes this address, the driver will receive a request to remove this address. The driver stores its current MAC address as part of the VSI MAC filter list instead of separately. So, this causes a problem when the device's MAC address is deleted unexpectedly, which results in traffic failure in some cases. The following configuration steps will reproduce the previously mentioned problem:quoted
ip link set eth0 up ip link add dev br0 type bridge ip link set br0 up ip addr flush dev eth0 ip link set eth0 master br0 echo 1 > /sys/class/net/br0/bridge/vlan_filtering modprobe -r veth modprobe -r bridge ip addr add 192.168.1.100/24 dev eth0The following ping command fails due to the netdev->dev_addr being deleted when removing the bridge module.quoted
ping <link partner>Fix this by making sure to not delete the netdev->dev_addr during MAC address sync. After fixing this issue it was noticed that the netdev_warn() in .set_mac was overly verbose, so make it at netdev_dbg(). Also, there is a possibility of a race condition between .set_mac and .set_rx_mode. Fix this by calling netif_addr_lock_bh() and netif_addr_unlock_bh() on the device's netdev when the netdev->dev_addr is going to be updated in .set_mac. Fixes: e94d44786693 ("ice: Implement filter sync, NDO operations and bump version") Signed-off-by: Brett Creeley <redacted> Tested-by: Liang Li <redacted> Tested-by: Gurucharan G <redacted> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Jonathan Toppins <redacted>