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 A815D51DDEE; Wed, 30 Sep 2026 18:31:41 +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=1790793102; cv=none; b=jXeSN+0f4lWEczU35VWUMuAjruGb8U5ckKM49oxRb40tNjmT1HYMhkb8tJgVloaLQvbArCDjNBzKQ2aztTfl4myxd6DcTR4uRBISxQc2FT83ohpPX5vDpuy/C4uLz2+0zH1BX4OHXO7Z4/2TJxS6v4Ru5k3kPx2wMFqV4HZtHDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790793102; c=relaxed/simple; bh=9DnRjU7hXA8UECfQXev3+QiYMZbqgqsfqQDImEKD9ws=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kK3CfZj6ewKHYSSZtAgAEMRvYzafSMbvpIhs62eBGsklt11JE9wJKdWHJDkDXuklVuxRZdyv4VAkYZx2O6FFNhOuZSpVCXj+ZfzrJgUTjwO1OFc5HEmWVXu1fUdMLdfPiqEscObK8p0tyOT6ecmZ0j9abB/EDm52+7+eSdqYGgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ydwsPla8; 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="ydwsPla8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1066A1F000FF; Wed, 30 Sep 2026 18:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790793101; bh=g8fDaU42r3HvP+T1JPMRZmcFhhzyzKefYgvWhTrD3Ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ydwsPla8aEbyXJ62rBSacVeh9OY4a7edLDjqk/FNs+grVS/4kICQ7Gl3cM5gju8e1 sv6SxjOIVNG5rO/YuKlySuhlUHwulP05DP2RgQ7hW2f6WKBqqZB+MW1PBk28KlXYWe 0i1wRUL/JhMSyv5W0u3Squ9LTK2ZrQuD44+QGzPg= 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 6.18 137/395] net: stmmac: selftests: Account for alignment shift on dwmac1000 for Jumbo test Date: Wed, 30 Sep 2026 17:26:39 +0200 Message-ID: <20260930152343.617345059@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152340.591469096@linuxfoundation.org> References: <20260930152340.591469096@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 6.18-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 bd92d5b051953..a2f99e2cb43b5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1769,6 +1769,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