From: Orgad Shaneh <orgads@gmail.com>
To: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Orgad Shaneh <orgads@gmail.com>
Subject: [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX
Date: Tue, 1 Dec 2026 04:23:11 +0000 [thread overview]
Message-ID: <20261201042313.3010724-2-orgads@gmail.com> (raw)
In-Reply-To: <20261201042313.3010724-1-orgads@gmail.com>
cvmx_pko_initialize_global() sets PKO_REG_QUEUE_MODE from the number of
queues in use, but only on CN38XX, CN58XX, CN56XX and CN52XX. On CN63XX
and CN66XX the register keeps its reset value of 0. The PKO then splits
its local command storage over all 256 queues, 8 words each, however
few queues the system actually uses.
On a CN6635 (CN66XX) this breaks transmit under load. With one queue per
port shared by all cores, and the PKO freeing the sent buffers itself,
the PKO latched PKO_REG_ERROR[CURRZERO] after 3 to 15 minutes of heavy
traffic and stopped sending. A dump at that point showed an engine
holding command words from the neighbouring queue's stream, while
the command buffers in memory and the doorbell counts were correct.
With the mode set to 2 (up to 64 queues, 32 words each) the same load
ran three times for 20 minutes without an error.
The Cavium SDK that this file comes from includes CN63XX and CN66XX in
this check, with the same thresholds. Do the same here.
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
Tested on a CN6635 (CN66XX) board with a 7.3.4 kernel. The transmit
path that triggered it is ours, out of tree: it hands buffers to the
PKO to free, which mainline's octeon-ethernet does only when it reuses
skbs. CN63XX is by inspection only; the SDK treats it the same way.
Applies to torvalds/master and mips-next, where this file is unchanged.
An LLM helped write this patch.
arch/mips/cavium-octeon/executive/cvmx-pko.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c
index b0199d5..b98b7e6 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-pko.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c
@@ -208,7 +208,9 @@ void cvmx_pko_initialize_global(void)
*/
if (OCTEON_IS_MODEL(OCTEON_CN38XX) || OCTEON_IS_MODEL(OCTEON_CN58XX)
|| OCTEON_IS_MODEL(OCTEON_CN56XX)
- || OCTEON_IS_MODEL(OCTEON_CN52XX)) {
+ || OCTEON_IS_MODEL(OCTEON_CN52XX)
+ || OCTEON_IS_MODEL(OCTEON_CN63XX)
+ || OCTEON_IS_MODEL(OCTEON_CN66XX)) {
int num_interfaces = cvmx_helper_get_number_of_interfaces();
int last_port =
cvmx_helper_get_last_ipd_port(num_interfaces - 1);
--
2.47.0
next prev parent reply other threads:[~2026-12-01 4:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 4:23 [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks Orgad Shaneh
2026-12-01 4:23 ` Orgad Shaneh [this message]
2026-12-01 4:23 ` [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX Orgad Shaneh
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=20261201042313.3010724-2-orgads@gmail.com \
--to=orgads@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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®