lkml.org 
[lkml]   [2022]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH net] ice: Fix broken IFF_ALLMULTI handling
    On Wed, 23 Mar 2022 21:05:20 +0100
    Marcin Szycik <marcin.szycik@linux.intel.com> wrote:

    > > @@ -3482,18 +3503,44 @@ ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto,
    > > if (!vid)
    > > return 0;
    > >
    > > + while (test_and_set_bit(ICE_CFG_BUSY, vsi->state))
    > > + usleep_range(1000, 2000);
    > > +
    > > /* Make sure ice_vsi_kill_vlan is successful before updating VLAN
    > > * information
    > > */
    > > ret = ice_vsi_kill_vlan(vsi, vid);
    > > if (ret)
    > > - return ret;
    > > + goto finish;
    > >
    > > - /* Disable pruning when VLAN 0 is the only VLAN rule */
    > > - if (vsi->num_vlan == 1 && ice_vsi_is_vlan_pruning_ena(vsi))
    > > - ret = ice_cfg_vlan_pruning(vsi, false);
    > > + /* Remove multicast promisc rule for the removed VLAN ID if
    > > + * all-multicast is enabled.
    > > + */
    > > + if (vsi->current_netdev_flags & IFF_ALLMULTI)
    > > + ice_fltr_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
    > > + ICE_MCAST_VLAN_PROMISC_BITS, vid);
    > > +
    > > + if (vsi->num_vlan == 1) {
    > > + /* Disable pruning when VLAN 0 is the only VLAN rule */
    > > + if (ice_vsi_is_vlan_pruning_ena(vsi))
    > > + ice_cfg_vlan_pruning(vsi, false);
    >
    > Why was `ret = ...` removed here?

    Because we are in ice_vlan_rx_kill_vid() that is used to remove VLAN and at this
    the VLAN ID was removed from VLAN filter so we cannot return value other than 0.
    Network stack would think that the VLAN ID is still present in VLAN filter.

    Ivan

    \
     
     \ /
      Last update: 2022-03-25 14:04    [W:3.559 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site