netpoll: Make netpoll_send_udp return status instead of void
authorMaksym Kutsevol <max@kutsevol.com>
Mon, 2 Dec 2024 19:55:07 +0000 (11:55 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Dec 2024 03:15:38 +0000 (19:15 -0800)
commita61b19f4a6586590a9ae6baf2ac4a25a852e547f
treead7b48d126b35a7c93ece51477853a8c32ad700a
parenta9ab02ed97c654a9ea09afb3e6294cea3768c388
netpoll: Make netpoll_send_udp return status instead of void

netpoll_send_udp can return if send was successful.
It will allow client code to be aware of the send status.

Possible return values are the result of __netpoll_send_skb (cast to int)
and -ENOMEM. This doesn't cover the case when TX was not successful
instantaneously and was scheduled for later, __netpoll__send_skb returns
success in that case.

Signed-off-by: Maksym Kutsevol <max@kutsevol.com>
Link: https://patch.msgid.link/20241202-netcons-add-udp-send-fail-statistics-to-netconsole-v5-1-70e82239f922@kutsevol.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netpoll.h
net/core/netpoll.c