Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH v4 net-next 0/5] rtnetlink: RTNL avoidance in rtnl_getlink() and rtnl_dump_ifinfo()
Date: Fri, 22 May 2026 14:29:42 -0700	[thread overview]
Message-ID: <20260522142942.36973ef6@kernel.org> (raw)
In-Reply-To: <20260522173002.2181677-1-edumazet@google.com>

On Fri, 22 May 2026 17:29:57 +0000 Eric Dumazet wrote:
> Many shell scripts invoke iproute2 commands specifying a device by
> its name.
> 
> This series improves their performance avoiding RTNL acquisition
> for their (repeated) name->index conversion.
> 
> v3: insert patch 2/3 in the series (Jakub reported a KASAN splat)
> v4: Addressed Sashiko's feedback.
>     added 2 patches for rtnl_dump_ifinfo().

The CI looks fried, various errors:

# 0.02 [+0.02] RTNETLINK answers: File exists
# 0.02 [+0.00] Failed to create netif

# CMD: ip -d -j link show dev eth8
#   EXIT: 1
#   STDOUT: []
#   STDERR: RTNETLINK answers: Message too long
#           Cannot send link get request: Message too long

At boot we hit:

[    0.661578] ------------[ cut here ]------------
[    0.661608] WARNING: net/core/rtnetlink.c:4296 at rtnl_getlink+0x457/0x5e0, CPU#3: ip/71
[    0.661656] Modules linked in:
[    0.661681] CPU: 3 UID: 0 PID: 71 Comm: ip Tainted: G        W           7.1.0-rc4-virtme #1 PREEMPT(lazy) 
[    0.661735] Tainted: [W]=WARN
[    0.661756] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.661795] RIP: 0010:rtnl_getlink+0x457/0x5e0
[    0.661831] Code: ff ff 89 c3 48 83 c4 38 e8 76 44 fe ff 85 db 48 8b 7c 24 08 0f 84 2c 01 00 00 48 89 fe ba 02 00 00 00 31 ff e8 4a b7 fb ff 90 <0f> 0b 90 b8 a6 ff ff ff 49 8b 94 24 40 05 00 00 65 ff 0a 80 7c 24
[    0.661928] RSP: 0018:ff87a370c027b7a8 EFLAGS: 00010296
[    0.661956] RAX: 0000000000000010 RBX: 00000000ffffffa6 RCX: ff368f1541d3ef00
[    0.661998] RDX: ff368f157edadda0 RSI: 0000000000000011 RDI: ff368f15411ffa00
[    0.662041] RBP: ff368f1541e60b00 R08: ff368f1541845810 R09: ffffffff9ec3bbe6
[    0.662076] R10: ffd7c3a340079800 R11: ff368f15411ffa00 R12: ff368f1541e31000
[    0.662126] R13: ffffffff9fe4f700 R14: 0000000000000009 R15: ffffffff9fe4f700
[    0.662176] FS:  00007fa9d67e0600(0000) GS:ff368f15df00c000(0000) knlGS:0000000000000000
[    0.662219] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.662253] CR2: 00007fff3c059c78 CR3: 000000000190f005 CR4: 0000000000771ef0
[    0.662294] PKRU: 55555554
[    0.662307] Call Trace:
[    0.662319]  <TASK>
[    0.662338]  ? rtnl_fill_ifinfo.isra.0+0x1670/0x1670
[    0.662366]  rtnetlink_rcv_msg+0x39f/0x460
[    0.662390]  ? rtnl_calcit.isra.0+0x160/0x160
[    0.662420]  netlink_rcv_skb+0xca/0x140
[    0.662445]  netlink_unicast+0x26b/0x3a0
[    0.662467]  netlink_sendmsg+0x1e2/0x430
[    0.662489]  ____sys_sendmsg+0x14c/0x2b0
[    0.662511]  ___sys_sendmsg+0xe1/0x120
[    0.662539]  __sys_sendmsg+0xad/0x100
[    0.662560]  do_syscall_64+0x104/0xfc0
[    0.662585]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
[    0.662609] RIP: 0033:0x7fa9d6a1808e
[    0.662631] Code: 4d 89 d8 e8 94 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 03 ff ff ff 0f 1f 00 f3 0f 1e fa
[    0.662733] RSP: 002b:00007fff3c059b50 EFLAGS: 00000202 ORIG_RAX: 000000000000002e
[    0.662775] RAX: ffffffffffffffda RBX: 00007fff3c05ce1d RCX: 00007fa9d6a1808e
[    0.662823] RDX: 0000000000000000 RSI: 00007fff3c059c00 RDI: 0000000000000004
[    0.662864] RBP: 00007fff3c059b60 R08: 0000000000000000 R09: 0000000000000000
[    0.662907] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
[    0.662947] R13: 000000006a10c531 R14: 00007fff3c059ca0 R15: 00007fff3c05ce1d
[    0.662982]  </TASK>
[    0.662998] ---[ end trace 0000000000000000 ]---
[    0.663079] ------------[ cut here ]------------
[    0.663110] WARNING: net/core/rtnetlink.c:4523 at rtmsg_ifinfo_build_skb+0xc8/0x110, CPU#3: ip/71
[    0.663162] Modules linked in:
[    0.663186] CPU: 3 UID: 0 PID: 71 Comm: ip Tainted: G        W           7.1.0-rc4-virtme #1 PREEMPT(lazy) 
[    0.663235] Tainted: [W]=WARN
[    0.663256] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.663289] RIP: 0010:rtmsg_ifinfo_build_skb+0xc8/0x110
[    0.663319] Code: 80 00 00 00 e8 59 d9 ff ff 48 83 c4 38 85 c0 75 18 48 83 c4 08 4c 89 f8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 44 8b 48 08 eb b4 90 <0f> 0b 90 ba 02 00 00 00 4c 89 fe 31 ff e8 36 ab fb ff b9 a6 ff ff
[    0.663414] RSP: 0018:ff87a370c027b720 EFLAGS: 00010286
[    0.663439] RAX: 00000000ffffffa6 RBX: 0000000000000001 RCX: 0000000000000000
[    0.663485] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ff368f1541e60700
[    0.663527] RBP: 0000000000000000 R08: ff368f1541845810 R09: ff368f154298f02c
[    0.663569] R10: ff368f1541e31120 R11: fefefefefefefeff R12: 0000000000000000
[    0.663612] R13: 0000000000000010 R14: ff368f1541e31000 R15: ff368f1541e60700
[    0.663655] FS:  00007fa9d67e0600(0000) GS:ff368f15df00c000(0000) knlGS:0000000000000000
[    0.663699] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.663730] CR2: 000055ed56288988 CR3: 000000000190f005 CR4: 0000000000771ef0
[    0.663774] PKRU: 55555554
[    0.663787] Call Trace:
[    0.663803]  <TASK>
[    0.663821]  rtmsg_ifinfo+0x3c/0xa0
[    0.663845]  __dev_notify_flags+0xb1/0xf0
[    0.663867]  ? rtnl_getlink+0x456/0x5e0
[    0.663887]  netif_change_flags+0x54/0x70
[    0.663913]  do_setlink.isra.0+0x3a2/0x1500
[    0.663939]  ? __nla_validate_parse+0x76/0xf20
[    0.663970]  rtnl_newlink+0x9d3/0xd90
[    0.663993]  ? do_setlink.isra.0+0x1500/0x1500
[    0.664015]  rtnetlink_rcv_msg+0x39f/0x460
[    0.664035]  ? get_page_from_freelist+0x157a/0x16a0
[    0.664068]  ? rtnl_calcit.isra.0+0x160/0x160
[    0.664091]  netlink_rcv_skb+0xca/0x140
[    0.664118]  netlink_unicast+0x26b/0x3a0
[    0.664140]  netlink_sendmsg+0x1e2/0x430
[    0.664162]  ____sys_sendmsg+0x14c/0x2b0
[    0.664182]  ___sys_sendmsg+0xe1/0x120
[    0.664204]  __sys_sendmsg+0xad/0x100
[    0.664226]  do_syscall_64+0x104/0xfc0
[    0.664248]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
[    0.664275] RIP: 0033:0x7fa9d6a1808e
[    0.664295] Code: 4d 89 d8 e8 94 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 <c9> c3 83 e2 39 83 fa 08 75 e7 e8 03 ff ff ff 0f 1f 00 f3 0f 1e fa
[    0.664397] RSP: 002b:00007fff3c05b1b0 EFLAGS: 00000202 ORIG_RAX: 000000000000002e
[    0.664437] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa9d6a1808e
[    0.664478] RDX: 0000000000000000 RSI: 00007fff3c05b260 RDI: 0000000000000003
[    0.664520] RBP: 00007fff3c05b1c0 R08: 0000000000000000 R09: 0000000000000000
[    0.664559] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000003
[    0.664604] R13: 000000006a10c531 R14: 000055ed1cfb1040 R15: 0000000000000000
[    0.664645]  </TASK>
[    0.664658] ---[ end trace 0000000000000000 ]---

  parent reply	other threads:[~2026-05-22 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 17:29 [PATCH v4 net-next 0/5] rtnetlink: RTNL avoidance in rtnl_getlink() and rtnl_dump_ifinfo() Eric Dumazet
2026-05-22 17:29 ` [PATCH v4 net-next 1/5] rtnetlink: use nla_nest_end_safe() in rtnl_fill_prop_list() Eric Dumazet
2026-05-22 17:29 ` [PATCH v4 net-next 2/5] net: defer netdev_name_node_alt_flush() call to netdev_run_todo() Eric Dumazet
2026-05-22 17:30 ` [PATCH v4 net-next 3/5] rtnetlink: do not acquire RTNL in rtnl_getlink() with RTEXT_FILTER_NAME_ONLY Eric Dumazet
2026-05-22 17:30 ` [PATCH v4 net-next 4/5] rtnetlink: do not assume RTNL is held in link_master_filtered() Eric Dumazet
2026-05-22 17:30 ` [PATCH v4 net-next 5/5] rtnetlink: add RTEXT_FILTER_NAME_ONLY support to rtnl_dump_ifinfo() Eric Dumazet
2026-05-22 21:29 ` Jakub Kicinski [this message]
2026-05-23  4:48   ` [PATCH v4 net-next 0/5] rtnetlink: RTNL avoidance in rtnl_getlink() and rtnl_dump_ifinfo() Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260522142942.36973ef6@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox