netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] netlink: handle EMSGSIZE errors in the core
@ 2024-03-03  5:24 Jakub Kicinski
  2024-03-03  5:24 ` [PATCH net-next v2 1/3] " Jakub Kicinski
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Jakub Kicinski @ 2024-03-03  5:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, jiri, idosch, johannes, fw, pablo,
	Jakub Kicinski

Ido discovered some time back that we usually force NLMSG_DONE
to be delivered in a separate recv() syscall, even if it would
fit into the same skb as data messages. He made nexthop try
to fit DONE with data in commit 8743aeff5bc4 ("nexthop: Fix
infinite nexthop bucket dump when using maximum nexthop ID"),
and nobody has complained so far.

We have since also tried to follow the same pattern in new
genetlink families, but explaining to people, or even remembering
the correct handling ourselves is tedious.

Let the netlink socket layer consume -EMSGSIZE errors.
Practically speaking most families use this error code
as "dump needs more space", anyway.

v2:
 - init err to 0 in last patch
v1: https://lore.kernel.org/all/20240301012845.2951053-1-kuba@kernel.org/

Jakub Kicinski (3):
  netlink: handle EMSGSIZE errors in the core
  netdev: let netlink core handle -EMSGSIZE errors
  genetlink: fit NLMSG_DONE into same read() as families

 net/core/netdev-genl.c    | 15 +++------------
 net/core/page_pool_user.c |  2 --
 net/netlink/af_netlink.c  |  9 +++++++++
 net/netlink/genetlink.c   | 12 +++++++-----
 4 files changed, 19 insertions(+), 19 deletions(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-04-11 18:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-03  5:24 [PATCH net-next v2 0/3] netlink: handle EMSGSIZE errors in the core Jakub Kicinski
2024-03-03  5:24 ` [PATCH net-next v2 1/3] " Jakub Kicinski
2024-03-03 15:01   ` Ido Schimmel
2024-03-03  5:24 ` [PATCH net-next v2 2/3] netdev: let netlink core handle -EMSGSIZE errors Jakub Kicinski
2024-03-03 15:08   ` Ido Schimmel
2024-03-03  5:24 ` [PATCH net-next v2 3/3] genetlink: fit NLMSG_DONE into same read() as families Jakub Kicinski
2024-03-03 15:10   ` Ido Schimmel
2024-03-15 11:48   ` Stefano Brivio
2024-03-19 15:55     ` Jakub Kicinski
2024-03-19 17:17       ` Eric Dumazet
2024-03-19 17:40         ` Jakub Kicinski
2024-03-21 12:56           ` Gal Pressman
2024-03-21 13:51             ` Ido Schimmel
2024-03-21 15:03               ` Gal Pressman
2024-03-21 17:26               ` Eric Dumazet
2024-03-21 17:41                 ` Ido Schimmel
2024-04-03 22:52           ` Ilya Maximets
2024-04-11 15:16             ` Jakub Kicinski
2024-04-11 15:39               ` Ilya Maximets
2024-04-11 15:52                 ` Jakub Kicinski
2024-04-11 16:38                   ` Ilya Maximets
2024-04-11 18:03                     ` Jakub Kicinski
2024-04-11 18:04                       ` Jakub Kicinski
2024-03-19 23:36       ` David Gibson
2024-03-06  8:10 ` [PATCH net-next v2 0/3] netlink: handle EMSGSIZE errors in the core patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).