From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Grzegorz Siwik <grzegorz.siwik@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net v2 3/4] ice: Fix clearing of promisc mode with bridge over bond
Date: Fri, 5 Aug 2022 09:20:52 -0700 [thread overview]
Message-ID: <b226ea16-44e1-e58b-0ea1-9cb8352c680e@intel.com> (raw)
In-Reply-To: <1659622830-13292-4-git-send-email-grzegorz.siwik@intel.com>
On 8/4/2022 7:20 AM, Grzegorz Siwik wrote:
> When at least two interfaces are bonded and a bridge is enabled on the
> bond, an error can occur when the bridge is removed and re-added. The
> reason for the error is because promiscuous mode was not fully cleared from
> the VLAN VSI in the hardware. With this change, promiscuous mode is
> properly removed when the bridge disconnects from bonding.
>
> [ 1033.676359] bond1: link status definitely down for interface enp95s0f0, disabling it
> [ 1033.676366] bond1: making interface enp175s0f0 the new active one
> [ 1033.676369] device enp95s0f0 left promiscuous mode
> [ 1033.676522] device enp175s0f0 entered promiscuous mode
> [ 1033.676901] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6
> [ 1041.795662] ice 0000:af:00.0 enp175s0f0: Error setting Multicast promiscuous mode on VSI 6
> [ 1041.944826] bond1: link status definitely down for interface enp175s0f0, disabling it
> [ 1041.944874] device enp175s0f0 left promiscuous mode
> [ 1041.944918] bond1: now running without any active interface!
>
> Testing Hints (required if no HSD): Create bonding and
HSD?
> add bridge to bond. Test VLAN add/removal and make sure VLAN works
> correctly. Test combinations of bridge module and VLAN, bridge and bond,
> and bridge over the PF.
>
> Fixes: c31af68a1b94 ("ice: Add outer_vlan_ops and VSI specific VLAN ops implementations")
> Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com>
> Co-developed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Link:
> https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/
> ---
> v2: Fixed error message when setting same promiscuous mode
> ---
> drivers/net/ethernet/intel/ice/ice_lib.c | 8 +++++++-
> drivers/net/ethernet/intel/ice/ice_main.c | 13 ++++++++++++-
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index f7f9c97..251012d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -4078,7 +4078,13 @@ int ice_vsi_del_vlan_zero(struct ice_vsi *vsi)
> if (err && err != -EEXIST)
> return err;
>
> - return 0;
> + /* when deleting the last VLAN filter, make sure to disable the VLAN
> + * promisc mode so the filter isn't left by accident
> + */
> + err = ice_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
> + ICE_MCAST_VLAN_PROMISC_BITS, 0);
This can be returned directly, not need to assign it to return in next line.
> +
> + return err;
> }
>
> /**
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index c1ac2f7..c4f89c1 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -267,8 +267,10 @@ static int ice_set_promisc(struct ice_vsi *vsi, u8 promisc_m)
> status = ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx,
> promisc_m, 0);
> }
> + if (status && status != -EEXIST)
> + return status;
>
> - return status;
> + return 0;
> }
>
> /**
> @@ -3572,6 +3574,15 @@ struct ice_vsi *
> while (test_and_set_bit(ICE_CFG_BUSY, vsi->state))
> usleep_range(1000, 2000);
>
> + ret = ice_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
> + ICE_MCAST_VLAN_PROMISC_BITS, vid);
> +
> + if (ret) {
No newline between error check and the call.
> + netdev_err(netdev, "Error clearing multicast promiscuous mode on VSI %i\n",
> + vsi->vsi_num);
> + vsi->current_netdev_flags |= IFF_ALLMULTI;
> + }
> +
> vlan_ops = ice_get_compat_vsi_vlan_ops(vsi);
>
> /* Make sure VLAN delete is successful before updating VLAN
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2022-08-05 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 14:20 [Intel-wired-lan] [PATCH net v2 0/4] ice: Fixes for double vlan promiscuous mode Grzegorz Siwik
2022-08-04 14:20 ` [Intel-wired-lan] [PATCH net v2 1/4] ice: Fix double VLAN error when entering promisc mode Grzegorz Siwik
2022-08-04 14:20 ` [Intel-wired-lan] [PATCH net v2 2/4] ice: Ignore ERR_ALREADY_EXISTS when setting " Grzegorz Siwik
2022-08-05 16:17 ` Tony Nguyen
2022-08-04 14:20 ` [Intel-wired-lan] [PATCH net v2 3/4] ice: Fix clearing of promisc mode with bridge over bond Grzegorz Siwik
2022-08-05 16:20 ` Tony Nguyen [this message]
2022-08-04 14:20 ` [Intel-wired-lan] [PATCH net v2 4/4] ice: Ignore error message when setting same promiscuous mode Grzegorz Siwik
2022-08-05 16:24 ` Tony Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b226ea16-44e1-e58b-0ea1-9cb8352c680e@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=grzegorz.siwik@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox