From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Manoj Vishwanathan <manojvishy@google.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
google-lan-reviews@googlegroups.com,
Willem de Bruijn <willemb@google.com>,
Manoj Vishwanathan <manojvishy@google.com>
Subject: Re: [PATCH v1 5/5] idpf: warn on possible ctlq overflow
Date: Tue, 13 Aug 2024 15:19:55 -0400 [thread overview]
Message-ID: <66bbb1db36a9c_8a56a29485@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240813182747.1770032-6-manojvishy@google.com>
Manoj Vishwanathan wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> The virtchannel control queue is lossy to avoid deadlock. Ensure that
> no losses occur in practice. Detect a full queue, when overflows may
> have happened.
>
> In practice, virtchnl is synchronous currenty and messages generally
> take a single slot. Using up anywhere near the full ring is not
> expected.
>
> Tested: Running several traffic tests and no logs seen in the dmesg
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
This was an internal patch. Not really intended for upstream as is.
> Signed-off-by: Manoj Vishwanathan <manojvishy@google.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> index 07239afb285e..1852836d81e4 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> @@ -218,6 +218,15 @@ static int idpf_mb_clean(struct idpf_adapter *adapter)
> if (err)
> goto err_kfree;
>
> + /* Warn if messages may have been dropped */
> + if (num_q_msg == IDPF_DFLT_MBX_Q_LEN) {
> + static atomic_t mbx_full = ATOMIC_INIT(0);
> + int cnt;
> +
> + cnt = atomic_inc_return(&mbx_full);
> + net_warn_ratelimited("%s: ctlq full (%d)\n", __func__, cnt);
A single static variable across all devices.
If this indeed should never happen, a WARN_ON_ONCE will suffice.
next prev parent reply other threads:[~2024-08-13 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 18:27 [PATCH v1 0/5] IDPF Virtchnl fixes Manoj Vishwanathan
2024-08-13 18:27 ` [PATCH v1 1/5] idpf: address an rtnl lock splat in tx timeout recovery path Manoj Vishwanathan
2024-08-13 18:27 ` [PATCH v1 2/5] idpf: Acquire the lock before accessing the xn->salt Manoj Vishwanathan
2024-08-13 18:27 ` [PATCH v1 3/5] idpf: convert workqueues to unbound Manoj Vishwanathan
2024-08-13 18:27 ` [PATCH v1 4/5] idpf: more info during virtchnl transaction time out Manoj Vishwanathan
2024-08-13 19:28 ` [Intel-wired-lan] " Paul Menzel
2024-08-13 18:27 ` [PATCH v1 5/5] idpf: warn on possible ctlq overflow Manoj Vishwanathan
2024-08-13 19:19 ` Willem de Bruijn [this message]
2024-08-15 22:55 ` [PATCH v1 0/5] IDPF Virtchnl fixes 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=66bbb1db36a9c_8a56a29485@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=google-lan-reviews@googlegroups.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manojvishy@google.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=willemb@google.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
all inboxes | Powered by JetHome®