Thread (3 messages) 3 messages, 3 authors, 2024-11-01

RE: [PATCH net] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint

From: Madalin Bucur (OSS) <hidden>
Date: 2024-10-30 13:34:10
Also in: linux-arm-kernel, lkml, netdev

-----Original Message-----
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Sent: Tuesday, October 29, 2024 6:31 PM
To: netdev@vger.kernel.org; Radu-Andrei Bulie <redacted>
Cc: David S. Miller <davem@davemloft.net>; Eric Dumazet
[off-list ref]; Jakub Kicinski [off-list ref]; Paolo Abeni
[off-list ref]; Breno Leitao [off-list ref]; Madalin Bucur
[off-list ref]; Ioana Ciornei [off-list ref]; Christophe
Leroy [off-list ref]; Sean Anderson
[off-list ref]; linux-kernel@vger.kernel.org; linuxppc-
dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org
Subject: [PATCH net] net: dpaa_eth: print FD status in CPU endianness in
dpaa_eth_fd tracepoint

Sparse warns:

note: in included file (through ../include/trace/trace_events.h,
../include/trace/define_trace.h,
../drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h):
warning: incorrect type in assignment (different base types)
   expected unsigned int [usertype] fd_status
   got restricted __be32 const [usertype] status

We take struct qm_fd :: status, store it and print it as an u32,
though it is a big endian field. We should print the FD status in
CPU endianness for ease of debug and consistency between PowerPC and
Arm systems.

Though it is a not often used debug feature, it is best to treat it as
a bug and backport the format change to all supported stable kernels,
for consistency.

Fixes: eb11ddf36eb8 ("dpaa_eth: add trace points")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
Context: https://lore.kernel.org/oe-kbuild-all/20241028-sticky-refined-lionfish-
b06c0c@leitao/
Acked-by: Madalin Bucur <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help