• Brett Creeley's avatar
    ice: don't remove netdev->dev_addr from uc sync list · 3ba7f53f
    Brett Creeley authored
    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:
    
    > 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 eth0
    
    The following ping command fails due to the netdev->dev_addr being
    deleted when removing the bridge module.
    > 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: e94d4478 ("ice: Implement filter sync, NDO operations and bump version")
    Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
    Tested-by: default avatarLiang Li <liali@redhat.com>
    Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    3ba7f53f
ice_main.c 194 KB