[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220325140424.696e8abc@ceranb>
Date: Fri, 25 Mar 2022 14:04:24 +0100
From: Ivan Vecera <ivecera@...hat.com>
To: Marcin Szycik <marcin.szycik@...ux.intel.com>
Cc: netdev@...r.kernel.org, poros@...hat.com, mschmidt@...hat.com,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Akeem G Abodunrin <akeem.g.abodunrin@...el.com>,
Anirudh Venkataramanan <anirudh.venkataramanan@...el.com>,
"moderated list:INTEL ETHERNET DRIVERS"
<intel-wired-lan@...ts.osuosl.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] ice: Fix broken IFF_ALLMULTI handling
On Wed, 23 Mar 2022 21:05:20 +0100
Marcin Szycik <marcin.szycik@...ux.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
Powered by blists - more mailing lists