diff mbox series

[net] net: af_packet: fix procfs header for 64-bit pointers

Message ID 54917251d8433735d9a24e935a6cb8eb88b4058a.1608103684.git.baruch@tkos.co.il (mailing list archive)
State Accepted
Commit abdcd06c4dedbcabaec68c433c7f53f33307811f
Delegated to: Netdev Maintainers
Headers show
Series [net] net: af_packet: fix procfs header for 64-bit pointers | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Baruch Siach Dec. 16, 2020, 7:28 a.m. UTC
On 64-bit systems the packet procfs header field names following 'sk'
are not aligned correctly:

sk       RefCnt Type Proto  Iface R Rmem   User   Inode
00000000605d2c64 3      3    0003   7     1 450880 0      16643
00000000080e9b80 2      2    0000   0     0 0      0      17404
00000000b23b8a00 2      2    0000   0     0 0      0      17421
...

With this change field names are correctly aligned:

sk               RefCnt Type Proto  Iface R Rmem   User   Inode
000000005c3b1d97 3      3    0003   7     1 21568  0      16178
000000007be55bb7 3      3    fbce   8     1 0      0      16250
00000000be62127d 3      3    fbcd   8     1 0      0      16254
...

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 net/packet/af_packet.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 18, 2020, 8:30 p.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed, 16 Dec 2020 09:28:04 +0200 you wrote:
> On 64-bit systems the packet procfs header field names following 'sk'
> are not aligned correctly:
> 
> sk       RefCnt Type Proto  Iface R Rmem   User   Inode
> 00000000605d2c64 3      3    0003   7     1 450880 0      16643
> 00000000080e9b80 2      2    0000   0     0 0      0      17404
> 00000000b23b8a00 2      2    0000   0     0 0      0      17421
> ...
> 
> [...]

Here is the summary with links:
  - [net] net: af_packet: fix procfs header for 64-bit pointers
    https://git.kernel.org/netdev/net/c/abdcd06c4ded

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 7a18ffff8551..99de3bbe437f 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -4581,7 +4581,9 @@  static void packet_seq_stop(struct seq_file *seq, void *v)
 static int packet_seq_show(struct seq_file *seq, void *v)
 {
 	if (v == SEQ_START_TOKEN)
-		seq_puts(seq, "sk       RefCnt Type Proto  Iface R Rmem   User   Inode\n");
+		seq_printf(seq,
+			   "%*sRefCnt Type Proto  Iface R Rmem   User   Inode\n",
+			   IS_ENABLED(CONFIG_64BIT) ? -17 : -9, "sk");
 	else {
 		struct sock *s = sk_entry(v);
 		const struct packet_sock *po = pkt_sk(s);