From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796098997; b=lrrI9iQd9rUyrkFSY1LvVRil9HC5A8NeYG8GkMjKrzk8CwatrSsEbPvOGIrYf6DgmVjH 2HlANHZhHdfY5NqPyK7PlfqjveQCfhaVSfmsy+3tvlKH6bb/gXDwRmtm/AHwQegZpHSpv Aqf3QU3VepTmNHIYGDB+73Xr+bQh3lN+TAPsiBKpaDCvSVyYa//tb/d6j1e1t/UZ/U3gg hQWCcE3xtlGB6PbmXw3OPS1od8n+4sL5WJaGFEk9ZhEJhmg2/j/Bf6x8vLvI9oFruWeYY De/T4+qxE5Z1oMh0hkK8x4R4pqQmCEFZLuG/OcKSHlNz4xJXbAxPMVkAHSKRQUJwF9Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796098997; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=Qx761qz0F7o6biRohU4sSGYPm0vZxSUuRu2ZkHeisBQ=; b=j3aEhkCuh2LPS1ouiy7QdHQFoCyXVbo3C9zZzFSEGe5/HNZOPBvUo4opM1h2BWoviO5v YxXUekSrvKzbqJ2/3nZlV0j3CGvC4PEHIdG0xbOCnDSU/TUnubASD8at9jhNy+xCCOUfj KIiU/CafhMp/amWU2c1I569lYSoN19R9wmOLSB51e5JTAF0KuHNhtLsOwCy2d6LJbV1ZV 5wvFN/4iBN6xLgB2YPwH8Uver/Yqw/4nB5J++h3/9doBmLXsxHrgILyReN1+qlw5WjOoP 2NLwYmib9Q5ELbX+nMQPJpOYhpUtUkyjQgm4gy0BOH1FPeMxE9T8BHxJ6ydJr47EIdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aM7SdcIj; arc=none smtp.remote-ip=209.85.128.43 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDA20606A33E for ; Tue, 1 Dec 2026 04:23:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DDA20606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aM7SdcIj Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4bb5b8ef642so93251825e9.1 for ; Mon, 30 Nov 2026 20:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796098995; x=1796703795; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Qx761qz0F7o6biRohU4sSGYPm0vZxSUuRu2ZkHeisBQ=; b=aM7SdcIj8R3FhzHj3RZcxNyW0wGg4khKD45u3Mqx61Ms0dAiguPB5U4oSq+PV5IfSw dYLq2Gixd4pJ2HdfuXLIdbT9nsf7pTSs3y9MOEQ+SeRWQt/prFagkoonRt0fYp6JfDdf 890xuRbpK3EPYTH+zsbQmab4IuWCzFZN9uEsBlUlr9zvKSXWNqngIOB7KPuDyA/i4rMi 88/uPU/ZWknMUWw8Fws+9NVoRt/bQs6ANBiVTttFLfE8dSmMibuUmZg8ja2K7wQLobXg xPVEc2r7SeW096VDskq2RTDtmVynD0BYUd3NTIGZyhmY7WsdEN9JpxtdloTKPhJk9/ji zBng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796098995; x=1796703795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Qx761qz0F7o6biRohU4sSGYPm0vZxSUuRu2ZkHeisBQ=; b=P0+hW2ziR9+kqaf/P2Cz4CM5KrHVEcVrby2G15VUfEF8U1fea3JSk8ZKZlSewmKGk4 NNsoiM85nOEZmWD+5lp0DhxaUwI3PfpYFfw/mMlzCMK8S/cIZuZw///bN51+uvZ5NmfX BTB9njez3m8Xo5znolX8Fm6F8TWDfsAMzksC6+mJXjXNO3UFz5xgFTBcYoo1GvpI4uLj lRKbCaWn50YKZ/EsDRXm9DIAaHq6tsuSxwj53tIX1LuBwWB1QeVW7n5tmvEx51/vKXfC DAIn+KOBZgNxG6OX3Os0irxSqGGO0d5xeKOT61hWuIpLM9+deyb1ZMH/fpcupAyIJOcY AHog== X-Gm-Message-State: APuU4Z8reiFx0myuC1UjQLkmNRkuy5027bbPxdUjvXKE6ZLNh3ItPCKg LtNDHj6IqKhKh9MPlScNC/38emQ8nzmUWISF5hfZhmjdGNhSCQ170xDr X-Gm-Gg: AZFdTZcfWslUlQazo9kkG7lOg2mMwpqM6mBAVTHxuYTKlgt+BAKk5WtN2zX29hYb05I vZlLSORFzYnKAN343ou/39t2dYfav8dqUdmn21dS56xTWRD1iuy6FdACBC7GQp5tzeHCVoLOu96 UmhfjjcsBz+w2V6ImisvCOkyQXR/gJV+yOY6KQrlwPPp+T4SOp5T2XI8zG005wtDkPgE5EoS/OS bx1LwzrWwPRyYCDEt+dxv/sMYyvGvVr/UJed0X0Lyncdh+gT7YtMdBUl+NHYabpGO2SRH5kN36r D3pZCPe7ZKZWp945OaIeuChKG72jZPlSSUU/vThBSZhrAEFTN/t0p0kLcRvgilW6B6Vq77onyr4 7PTKiyaxP/A2nj7CPpWENpvqKIU2OA9LnDrX3sWQ6WQom9FVMdc8uOJZoG1UY2cdZ3g59t3d58Z msGR/RwLtuOUVpsEv63MBo6RiKLYLSRDnl1hl5KoGOjZxXHZhe9r6B/uR0Ts4Kqn48KXwr/vv0B X0COxVO6eenYYAacJxeg7xtBIjbT9UBeOqKRA+A6mDDwm71l6pfj4p8/oyIBCKu8c0EWtQFOC++ qDOS5r5Kc7J2lqCewl56ioDlDdb9Xp6Mqo2EZliLLP0IM0K+wE49CQ== X-Received: by 2002:a05:600c:a317:b0:4bb:a5f1:fb56 with SMTP id 5b1f17b1804b1-4bba5f20897mr344983605e9.26.1796098995317; Mon, 30 Nov 2026 20:23:15 -0800 (PST) Received: from center.. ([131.189.143.225]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbbaeb1e4csm266360845e9.13.2026.11.30.20.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 20:23:14 -0800 (PST) From: Orgad Shaneh To: tsbogend@alpha.franken.de Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Orgad Shaneh Subject: [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX Date: Tue, 1 Dec 2026 04:23:11 +0000 Message-ID: <20261201042313.3010724-2-orgads@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261201042313.3010724-1-orgads@gmail.com> References: <20261201042313.3010724-1-orgads@gmail.com> X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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