From: Simon Horman <horms@kernel.org>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
marcin.szycik@linux.intel.com, jedrzej.jagielski@intel.com,
przemyslaw.kitszel@intel.com, piotr.kwapulinski@intel.com,
anthony.l.nguyen@intel.com, dawid.osuchowski@intel.com
Subject: Re: [Intel-wired-lan] [iwl-next v1 3/4] ixgbe: add Tx hang detection unhandled MDD
Date: Tue, 11 Feb 2025 10:02:07 +0000 [thread overview]
Message-ID: <20250211100207.GG554665@kernel.org> (raw)
In-Reply-To: <Z6mTraxmxHzsvrZ3@mev-dev.igk.intel.com>
On Mon, Feb 10, 2025 at 06:50:37AM +0100, Michal Swiatkowski wrote:
> On Fri, Feb 07, 2025 at 02:57:10PM +0000, Simon Horman wrote:
> > On Fri, Feb 07, 2025 at 11:43:42AM +0100, Michal Swiatkowski wrote:
...
> > > +/**
> > > + * ixgbe_handle_mdd_event - handle mdd event
> > > + * @adapter: structure containing ring specific data
> > > + * @tx_ring: tx descriptor ring to handle
> > > + *
> > > + * Reset VF driver if malicious vf detected or
> > > + * illegal packet in an any queue detected.
> > > + */
> > > +static void ixgbe_handle_mdd_event(struct ixgbe_adapter *adapter,
> > > + struct ixgbe_ring *tx_ring)
> > > +{
> > > + u16 vf, q;
> > > +
> > > + if (adapter->vfinfo && ixgbe_check_mdd_event(adapter)) {
> > > + /* vf mdd info and malicious vf detected */
> > > + if (!ixgbe_get_vf_idx(adapter, tx_ring->queue_index, &vf))
> > > + ixgbe_vf_handle_tx_hang(adapter, vf);
> > > + } else {
> > > + /* malicious vf not detected */
> > > + for (q = 0; q < IXGBE_MAX_TX_QUEUES; q++) {
> > > + if (ixgbe_check_illegal_queue(adapter, q) &&
> > > + !ixgbe_get_vf_idx(adapter, q, &vf))
> > > + /* illegal queue detected */
> > > + ixgbe_vf_handle_tx_hang(adapter, vf);
> >
> > It looks like ixgbe_vf_handle_tx_hang() will run for each illegal queue.
> > Could that be more than once for a given vf? If so, is that desirable?
> >
>
> Yes, it will be called for each hanged queue of a given VF. I assume
> this is fine, as the function is counting the hang events, not resetting
> VF.
Thanks for the clarification, much appreciated.
I missed that this is just accounting and agree this seems fine.
...
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
marcin.szycik@linux.intel.com, jedrzej.jagielski@intel.com,
przemyslaw.kitszel@intel.com, piotr.kwapulinski@intel.com,
anthony.l.nguyen@intel.com, dawid.osuchowski@intel.com
Subject: Re: [iwl-next v1 3/4] ixgbe: add Tx hang detection unhandled MDD
Date: Tue, 11 Feb 2025 10:02:07 +0000 [thread overview]
Message-ID: <20250211100207.GG554665@kernel.org> (raw)
In-Reply-To: <Z6mTraxmxHzsvrZ3@mev-dev.igk.intel.com>
On Mon, Feb 10, 2025 at 06:50:37AM +0100, Michal Swiatkowski wrote:
> On Fri, Feb 07, 2025 at 02:57:10PM +0000, Simon Horman wrote:
> > On Fri, Feb 07, 2025 at 11:43:42AM +0100, Michal Swiatkowski wrote:
...
> > > +/**
> > > + * ixgbe_handle_mdd_event - handle mdd event
> > > + * @adapter: structure containing ring specific data
> > > + * @tx_ring: tx descriptor ring to handle
> > > + *
> > > + * Reset VF driver if malicious vf detected or
> > > + * illegal packet in an any queue detected.
> > > + */
> > > +static void ixgbe_handle_mdd_event(struct ixgbe_adapter *adapter,
> > > + struct ixgbe_ring *tx_ring)
> > > +{
> > > + u16 vf, q;
> > > +
> > > + if (adapter->vfinfo && ixgbe_check_mdd_event(adapter)) {
> > > + /* vf mdd info and malicious vf detected */
> > > + if (!ixgbe_get_vf_idx(adapter, tx_ring->queue_index, &vf))
> > > + ixgbe_vf_handle_tx_hang(adapter, vf);
> > > + } else {
> > > + /* malicious vf not detected */
> > > + for (q = 0; q < IXGBE_MAX_TX_QUEUES; q++) {
> > > + if (ixgbe_check_illegal_queue(adapter, q) &&
> > > + !ixgbe_get_vf_idx(adapter, q, &vf))
> > > + /* illegal queue detected */
> > > + ixgbe_vf_handle_tx_hang(adapter, vf);
> >
> > It looks like ixgbe_vf_handle_tx_hang() will run for each illegal queue.
> > Could that be more than once for a given vf? If so, is that desirable?
> >
>
> Yes, it will be called for each hanged queue of a given VF. I assume
> this is fine, as the function is counting the hang events, not resetting
> VF.
Thanks for the clarification, much appreciated.
I missed that this is just accounting and agree this seems fine.
...
next prev parent reply other threads:[~2025-02-11 10:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 10:43 [Intel-wired-lan] [iwl-next v1 0/4] ixgbe: support MDD events Michal Swiatkowski
2025-02-07 10:43 ` Michal Swiatkowski
2025-02-07 10:43 ` [Intel-wired-lan] [iwl-next v1 1/4] ixgbe: add MDD support Michal Swiatkowski
2025-02-07 10:43 ` Michal Swiatkowski
2025-02-07 15:07 ` [Intel-wired-lan] " Simon Horman
2025-02-07 15:07 ` Simon Horman
2025-02-10 5:51 ` [Intel-wired-lan] " Michal Swiatkowski
2025-02-10 5:51 ` Michal Swiatkowski
2025-02-07 10:43 ` [Intel-wired-lan] [iwl-next v1 2/4] ixgbe: check for MDD events Michal Swiatkowski
2025-02-07 10:43 ` Michal Swiatkowski
2025-02-07 10:43 ` [Intel-wired-lan] [iwl-next v1 3/4] ixgbe: add Tx hang detection unhandled MDD Michal Swiatkowski
2025-02-07 10:43 ` Michal Swiatkowski
2025-02-07 14:57 ` [Intel-wired-lan] " Simon Horman
2025-02-07 14:57 ` Simon Horman
2025-02-10 5:50 ` [Intel-wired-lan] " Michal Swiatkowski
2025-02-10 5:50 ` Michal Swiatkowski
2025-02-11 10:02 ` Simon Horman [this message]
2025-02-11 10:02 ` Simon Horman
2025-02-07 10:43 ` [Intel-wired-lan] [iwl-next v1 4/4] ixgbe: turn off MDD while modifying SRRCTL Michal Swiatkowski
2025-02-07 10:43 ` Michal Swiatkowski
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=20250211100207.GG554665@kernel.org \
--to=horms@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=dawid.osuchowski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jedrzej.jagielski@intel.com \
--cc=marcin.szycik@linux.intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=piotr.kwapulinski@intel.com \
--cc=przemyslaw.kitszel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.