]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iavf: convert to ndo_set_rx_mode_async
authorStanislav Fomichev <sdf.kernel@gmail.com>
Thu, 16 Apr 2026 18:57:06 +0000 (11:57 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 21 Apr 2026 10:50:25 +0000 (12:50 +0200)
Convert iavf from ndo_set_rx_mode to ndo_set_rx_mode_async.
iavf_set_rx_mode now takes explicit uc/mc list parameters and
uses __hw_addr_sync_dev on the snapshots instead of __dev_uc_sync
and __dev_mc_sync.

The iavf_configure internal caller passes the real lists directly.

Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260416185712.2155425-10-sdf@fomichev.me
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/intel/iavf/iavf_main.c

index dad001abc9086b37d166e23cc875c7cede545437..3c1465cf05159a2a4d98e34c52550af28b1f7f9b 100644 (file)
@@ -1150,14 +1150,18 @@ bool iavf_promiscuous_mode_changed(struct iavf_adapter *adapter)
 /**
  * iavf_set_rx_mode - NDO callback to set the netdev filters
  * @netdev: network interface device structure
+ * @uc: snapshot of uc address list
+ * @mc: snapshot of mc address list
  **/
-static void iavf_set_rx_mode(struct net_device *netdev)
+static void iavf_set_rx_mode(struct net_device *netdev,
+                            struct netdev_hw_addr_list *uc,
+                            struct netdev_hw_addr_list *mc)
 {
        struct iavf_adapter *adapter = netdev_priv(netdev);
 
        spin_lock_bh(&adapter->mac_vlan_list_lock);
-       __dev_uc_sync(netdev, iavf_addr_sync, iavf_addr_unsync);
-       __dev_mc_sync(netdev, iavf_addr_sync, iavf_addr_unsync);
+       __hw_addr_sync_dev(uc, netdev, iavf_addr_sync, iavf_addr_unsync);
+       __hw_addr_sync_dev(mc, netdev, iavf_addr_sync, iavf_addr_unsync);
        spin_unlock_bh(&adapter->mac_vlan_list_lock);
 
        spin_lock_bh(&adapter->current_netdev_promisc_flags_lock);
@@ -1210,7 +1214,9 @@ static void iavf_configure(struct iavf_adapter *adapter)
        struct net_device *netdev = adapter->netdev;
        int i;
 
-       iavf_set_rx_mode(netdev);
+       netif_addr_lock_bh(netdev);
+       iavf_set_rx_mode(netdev, &netdev->uc, &netdev->mc);
+       netif_addr_unlock_bh(netdev);
 
        iavf_configure_tx(adapter);
        iavf_configure_rx(adapter);
@@ -5153,7 +5159,7 @@ static const struct net_device_ops iavf_netdev_ops = {
        .ndo_open               = iavf_open,
        .ndo_stop               = iavf_close,
        .ndo_start_xmit         = iavf_xmit_frame,
-       .ndo_set_rx_mode        = iavf_set_rx_mode,
+       .ndo_set_rx_mode_async  = iavf_set_rx_mode,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_set_mac_address    = iavf_set_mac,
        .ndo_change_mtu         = iavf_change_mtu,