From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3B4A1341ABD; Tue, 26 Aug 2025 13:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756216258; cv=none; b=hUq9E4oeVqBUOKqQz65bJ+WYITQtw98EKQHEyVYTtLLtFiFfxvGbtF24y0tA5vXLac8t+6hnEVpVR5xBBYSfEW6N/Zw79WrUPoBLgFXbMwgxOIAbsqw9PSTm8G/cnrk/TJflVhFh/c7cwDUoLIXqwh4YfL7yt/UBRe479T5Njjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756216258; c=relaxed/simple; bh=RlBE3wim5N0BXBb6csp0fStfE+GXdhevBDECNAFy2eU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZMweHj82U7FX68txAlL6PiLEoY6o4s+TEynXa/k8sgkVEjvP1JVk+JA6e2N8IRF8dcsEbJ0+uwdh5VBHr4A3/f27jWSXC7ZnTOmxApg6ELU90t4gY6Nf6QDFuvzAGqbFYEA9FEMp0i0fe6s1hRvDjNaFuiYMMQVIcmRXHNAsqrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rq9YsTPI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rq9YsTPI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7622C4CEF1; Tue, 26 Aug 2025 13:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756216258; bh=RlBE3wim5N0BXBb6csp0fStfE+GXdhevBDECNAFy2eU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rq9YsTPIN8h30G+LDy5S4+kvmkFE4v65+XgR9n/5qqPWtpbV3KEy+X/OSGKn/+opu 2vLDINAj1pLvoFAabklajLhwFt/U7JFwJbJ1/zSw8mxMhF26u2j+V2HRvyO9rOHnpP nvZZ5Z5FvQEMjNl7UofyQ4XRoCyV5puEB4vxpWv8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alok Tiwari , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 341/644] be2net: Use correct byte order and format string for TCP seq and ack_seq Date: Tue, 26 Aug 2025 13:07:12 +0200 Message-ID: <20250826110954.839974270@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110946.507083938@linuxfoundation.org> References: <20250826110946.507083938@linuxfoundation.org> User-Agent: quilt/0.68 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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alok Tiwari [ Upstream commit 4701ee5044fb3992f1c910630a9673c2dc600ce5 ] The TCP header fields seq and ack_seq are 32-bit values in network byte order as (__be32). these fields were earlier printed using ntohs(), which converts only 16-bit values and produces incorrect results for 32-bit fields. This patch is changeing the conversion to ntohl(), ensuring correct interpretation of these sequence numbers. Notably, the format specifier is updated from %d to %u to reflect the unsigned nature of these fields. improves the accuracy of debug log messages for TCP sequence and acknowledgment numbers during TX timeouts. Signed-off-by: Alok Tiwari Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250717193552.3648791-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/emulex/benet/be_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index c61dc7d05bcb..69284efbd517 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1466,10 +1466,10 @@ static void be_tx_timeout(struct net_device *netdev, unsigned int txqueue) ntohs(tcphdr->source)); dev_info(dev, "TCP dest port %d\n", ntohs(tcphdr->dest)); - dev_info(dev, "TCP sequence num %d\n", - ntohs(tcphdr->seq)); - dev_info(dev, "TCP ack_seq %d\n", - ntohs(tcphdr->ack_seq)); + dev_info(dev, "TCP sequence num %u\n", + ntohl(tcphdr->seq)); + dev_info(dev, "TCP ack_seq %u\n", + ntohl(tcphdr->ack_seq)); } else if (ip_hdr(skb)->protocol == IPPROTO_UDP) { udphdr = udp_hdr(skb); -- 2.39.5