* [net] Unexpected -EMSGSIZE returned by tcf_fill_node
@ 2026-03-12 14:01 Harshal Gohel
0 siblings, 0 replies; only message in thread
From: Harshal Gohel @ 2026-03-12 14:01 UTC (permalink / raw)
To: netdev, Jiri Pirko, Jamal Hadi Salim
Cc: Simon Wunderlich, Sven Eckelmann, linux-kernel, Jakub Kicinski,
Paolo Abeni, Simon Horman, Eric Dumazet, David S. Miller
Dear Kernel developers and maintainers,
While playing around with tc and iproute2 we discovered that dumping
filters with tc filter show dev eth0 fails because kernel returns
-EMSGSIZE (-90). We were able to reproduce this on an amd64 machine
running debian:trixie, debian:buster and nixos:stable, kernel 6.18, 6.12
and 6.1 and on rpi4b running RaspberryPi OS 64 bit.
To reproduce add dummy interface, add htb qdisc and add tc filter for
all protocols with firewall mark.
```
sudo ip link add type dummy
sudo tc qdisc add dev dummy0 root handle ffe: htb default 0x0000 r2q 1
sudo tc filter add dev dummy0 parent ffe: protocol all fw
```
then try to dump filters for dummy0 device with
`sudo tc filter show dev dummy0`
This results in
```
filter parent ffe: protocol all pref 49152 fw chain 0
Error: Buffer too small for object.
Dump terminated
```
strace also reveals the return code (-EMSGSIZE)
```
...
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=20,
nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1773323104,
nlmsg_pid=50516}, -90], iov_len=32768}], msg_iovlen=1, msg_controllen=0,
msg_flags=0}, 0) = 20
```
I am not sure if this should be handled by iproute2/libmnl or in kernel.
This error is only visible after this commit in iproute2:
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=05a14fc1218885ba6236b409fbf6b89976b8636e
--
Regards,
Harshal
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-12 14:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 14:01 [net] Unexpected -EMSGSIZE returned by tcf_fill_node Harshal Gohel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®