From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 985B84F55B6; Wed, 30 Sep 2026 16:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790787244; cv=none; b=mFy2+UPuo/NXqF3E5AOWF4ZyQByl/v/CsaDmxGuOYisx7YA0UIKYvyPouIdXN+34tnnDL4j3d2ZPuR1hcevaTwIReLCiaFpYCepFgb+XV8SQQlfuG6YXslD/A6p/3Z2tuSicXGzqd0TCCw3QsYbAGVY2vhoPD/aC9JRkM7Pzs3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790787244; c=relaxed/simple; bh=wa+u7IJNVUtMRCjEX3dStwxMqI42teqwAUPBYfmvMMo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uqWuw4ldSVcJCrNJvt8x9S7blnonnXss0zZT68Y42xspiZV63SckMKxpc1zDzp1KfDn5Q0Q5oLTQ/nqJD7Vy9c0Q7Xdjj/NiBNKJS/mxoYsDBjiJL3T2ly7iMkmABbty22c8q5vmAyrTxDbGs8GV3sjz2DamERwNw23MmOTSiCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NQltji6l; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NQltji6l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 944381F000FF; Wed, 30 Sep 2026 16:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790787243; bh=gGnhfWiZcltkYaGQeyAdOSnrd5p00Y3tWRkY82Ktdbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NQltji6l2LhaqgXB0YinWKTkdrWfRvxCXchkHuVL/MDQuSvq4pUeEnZEv53nvJSsn jnuaSqLmq++1QtMLBVhQSGz/Qq0/Xnm3KfSMK4c34XFVIOKBG4P4noqbVVpeEdoBqK 6H2SIBr2DEVSkgNwEDIbNhsfPJRFHRNFEuGGlG8s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolai Buchwitz , Maxime Chevallier , Jakub Kicinski , Sasha Levin Subject: [PATCH 7.2 163/457] net: stmmac: selftests: Account for alignment shift on dwmac1000 for Jumbo test Date: Wed, 30 Sep 2026 17:24:28 +0200 Message-ID: <20260930152349.567772163@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152346.024115587@linuxfoundation.org> References: <20260930152346.024115587@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maxime Chevallier [ Upstream commit c4ac6e94eb9423126bda907a7f2933284f7450ff ] On dwmac1000, we currently only support single-descriptor frames. The Jumbo test started failing when NET_IP_ALIGN was added to align the IP header, as this tests tries to send the biggest possible frame. On dwmac1000 the DMA transfer is aligned on 4-bytes, so adding a 2-byte shift at the start-of-buffer address means it takes a whole extra 4-byte DMA burst to receive the Jumbo packet, causing it to spill over the next descriptor. This doesn't seem to happen on dwmac4 and xgmac that appear to correctly handle unaligned xfers (only tested on dwmac4) Let's account for that in the Jumbo test, reduce the size of our big packet by the align size. Fixes: 23680bf5f8c6 ("net: stmmac: restore NET_IP_ALIGN in the RX DMA offset") Reviewed-by: Nicolai Buchwitz Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20260917215339.2022523-8-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index b3b05a7753335..75647992cbb44 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1809,6 +1809,9 @@ static int __stmmac_test_jumbo(struct stmmac_priv *priv, u16 queue) struct stmmac_packet_attrs attr = { }; int size = priv->dma_conf.dma_buf_sz; + if (!dwmac_is_xmac(priv->plat->core_type)) + size -= NET_IP_ALIGN; + attr.dst = priv->dev->dev_addr; attr.max_size = size - ETH_FCS_LEN; attr.queue_mapping = queue; -- 2.53.0