public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <fmancera@suse.de>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, horms@kernel.org, pabeni@redhat.com,
	kuba@kernel.org, davem@davemloft.net, dsahern@kernel.org,
	Yiming Qian <yimingqian591@gmail.com>
Subject: Re: [PATCH net] ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop()
Date: Tue, 31 Mar 2026 14:50:16 +0200	[thread overview]
Message-ID: <9aaf6dc6-3c21-4cec-9f16-5d76cb40dc80@suse.de> (raw)
In-Reply-To: <CANn89iLJUi+cA4fFr7XQESkT+5ckY6+MGg7QEM-G123RzuD5RQ@mail.gmail.com>

On 3/31/26 2:13 PM, Eric Dumazet wrote:
> On Tue, Mar 31, 2026 at 5:00 AM Fernando Fernandez Mancera
> <fmancera@suse.de> wrote:
>>
>> When querying a nexthop object via RTM_GETNEXTHOP, the kernel currently
>> allocates a fixed-size skb using NLMSG_GOODSIZE. While sufficient for
>> single nexthops and small Equal-Cost Multi-Path groups, this fixed
>> allocation fails for large nexthop groups like 512+ nexthops.
>>
>> This results in the following warning splat:
>>
>>   WARNING: net/ipv4/nexthop.c:3395 at rtm_get_nexthop+0x176/0x1c0, CPU#19: rep/9282
>>   [...]
>>   RIP: 0010:rtm_get_nexthop+0x176/0x1c0
>>   [...]
>>   Call Trace:
>>    <TASK>
>>    rtnetlink_rcv_msg+0x168/0x670
>>    netlink_rcv_skb+0x5c/0x110
>>    netlink_unicast+0x203/0x2e0
>>    netlink_sendmsg+0x222/0x460
>>    ____sys_sendmsg+0x35a/0x380
>>    ___sys_sendmsg+0x99/0xe0
>>    __sys_sendmsg+0x8a/0xf0
>>    do_syscall_64+0x12f/0x1590
>>    entry_SYSCALL_64_after_hwframe+0x76/0x7e
>>    </TASK>
>
> I find these stack traces without symbols not very useful.

Hi Eric,

sure, here is the decoded trace:

  WARNING: net/ipv4/nexthop.c:3395 at rtm_get_nexthop+0x176/0x1c0, 
CPU#20: rep/4608
  RIP: 0010:rtm_get_nexthop (net/ipv4/nexthop.c:3395 (discriminator 2))
  Call Trace:
   <TASK>
   rtnetlink_rcv_msg (net/core/rtnetlink.c:6989)
   netlink_rcv_skb (net/netlink/af_netlink.c:2550)
   netlink_unicast (net/netlink/af_netlink.c:1319 
net/netlink/af_netlink.c:1344)
   netlink_sendmsg (net/netlink/af_netlink.c:1894)
   ____sys_sendmsg (net/socket.c:721 (discriminator 16) net/socket.c:736 
(discriminator 16) net/socket.c:2585 (discriminator 16))
   ___sys_sendmsg (net/socket.c:2641)
   __sys_sendmsg (net/socket.c:2671 (discriminator 1))
   do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) 
arch/x86/entry/syscall_64.c:94 (discriminator 1))
   entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
   </TASK>

> 
> Any reason you have not used scripts/decode_stacktrace.sh ?
> 

Not really, in the past I checked other commits with `git log --grep 
"Call Trace"` and found out that most of the traces did not have symbols 
so I decided to attach the raw trace.

I do not really have a personal preference here. If trace with symbols 
is preferred I will do it like that in the future. I could also send a 
V2 of this patch if needed.

Thanks!
Fernando.

  reply	other threads:[~2026-03-31 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 11:59 [PATCH net] ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop() Fernando Fernandez Mancera
2026-03-31 12:13 ` Eric Dumazet
2026-03-31 12:50   ` Fernando Fernandez Mancera [this message]
2026-03-31 13:38     ` Eric Dumazet
2026-03-31 14:38       ` Fernando Fernandez Mancera
2026-03-31 17:35 ` Jakub Kicinski
2026-03-31 17:40   ` Fernando Fernandez Mancera
2026-03-31 22:41     ` Jakub Kicinski
2026-04-01  7:18       ` Fernando Fernandez Mancera

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=9aaf6dc6-3c21-4cec-9f16-5d76cb40dc80@suse.de \
    --to=fmancera@suse.de \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yimingqian591@gmail.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