From: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net v1] iavf: Fix promiscuous mode configuration flow messages
Date: Tue, 14 Sep 2021 23:50:32 +0000 [thread overview]
Message-ID: <6ee88bc8f34dedbddd528272f67704f2d62e49a3.camel@intel.com> (raw)
In-Reply-To: <20210914064346.3376-1-karen.sornek@intel.com>
On Tue, 2021-09-14 at 08:43 +0200, Karen Sornek wrote:
> Currently when configuring promiscuous mode on the AVF we detect a
> change in the netdev->flags. We use IFF_PROMISC and IFF_ALLMULTI to
> determine whether or not we need to request/release promiscuous mode
> and/or multicast promiscuous mode. The problem is that the AQ calls
> for
> setting/clearing promiscuous/multicast mode are treated separately.
> This
> leads to a case where we can trigger two promiscuous mode AQ calls in
> a row with the incorrect state. To fix this make a few changes.
>
> Use IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE instead of the previous
> IAVF_FLAG_AQ_[REQUEST|RELEASE]_[PROMISC|ALLMULTI] flags.
>
> In iavf_set_rx_mode() detect if there is a change in the
> netdev->flags in comparison with adapter->flags and set the
> IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE aq_required bit. Then in
> iavf_process_aq_command() only check for
> IAVF_FLAG_CONFIGURE_PROMISC_MODE
> and call iavf_set_promiscuous() if it's set.
>
> In iavf_set_promiscuous() check again to see which (if any)
> promiscuous mode bits have changed when comparing the netdev->flags
> with
> the adapter->flags. Use this to set the flags which get sent to the
> PF
> driver.
>
> Add a spinlock that is used for updating current_netdev_promisc_flags
> and only allows one promiscuous mode AQ at a time.
>
> [1] Fixes the fact that we will only have one AQ call in the
> aq_required
> queue at any one time.
>
> [2] Streamlines the change in promiscuous mode to only set one AQ
> required bit.
>
> [3] This allows us to keep track of the current state of the flags
> and
> also makes it so we can take the most recent netdev->flags
> promiscuous
> mode state.
>
> [4] This fixes the problem where a change in the netdev->flags can
> cause
> IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE to be set in iavf_set_rx_mode(),
> but cleared in iavf_set_promiscuous() before the change is ever made
> via
> AQ call.
This patch still doesn't apply.
Were there any changes made or is this a resend of the same patch[1]?
Please include proper tags, revisions, and/or changelogs to make
reviews easier.
> Fixes: 129cf89e5856 ("iavf: rename functions and structs to new
> name")
> Signed-off-by: Brett Creeley brett.creeley at intel.com
> Signed-off-by: Karen Sornek karen.sornek at intel.com
>
[1] https://patchwork.ozlabs.org/project/intel-wired-
lan/patch/20210902124436.162039-1-karen.sornek at intel.com/
next prev parent reply other threads:[~2021-09-14 23:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 6:43 [Intel-wired-lan] [PATCH net v1] iavf: Fix promiscuous mode configuration flow messages Karen Sornek
2021-09-14 23:50 ` Nguyen, Anthony L [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-09-02 12:44 Karen Sornek
2021-09-03 18:32 ` Nguyen, Anthony L
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=6ee88bc8f34dedbddd528272f67704f2d62e49a3.camel@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/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