summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-06-09 13:42:22 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-06-09 13:42:22 +0300
commit193b76eb109ed3ed77400c6d493b2f495ca64d9e (patch)
tree3556494521f91c61a8a59959b10f4cc80da7e297 /include
parent69a4e74e4cc46bdc65586f600b8552cc10a2811a (diff)
parent0360976d7ed5c69484d873afa34a22db4d04996f (diff)
downloadlinux-193b76eb109ed3ed77400c6d493b2f495ca64d9e.tar.xz
Merge branch 'netconsole-fix-reported-problems'
Breno Leitao says: ==================== netconsole: Fix reported problems These are some of the issues that LLM reported to netconsole, and they are being addressed here before big refactors. I was doing some big refactors, and got some "pre-existent-issues" during LLM review of the refactor, that make them hard to guarantee that refactor is not introducing any bug, so, let's clean these pre-existent bugs first, and then submit the refactor. The issues fixed in this patchset were reported during the review of https://lore.kernel.org/all/20260524-netconsole_move_more-v1-0-909d1ab398b4@debian.org/ Not all of them got fixed, but, those that were easy to reason about. Why net-next and not 'net' tree. Most of the functions that are being fixed here moved from netpoll to netconsole, thus, fixing this on net will cause merge conflicts from 'net' to 'net-next', thus I decided to fix it on 'net-next', given we are on 7.1-rc6 already. Sorry if that is not the right approach. ==================== Link: https://patch.msgid.link/20260604-netcons_fix_before_move-v3-0-ab055b3a6aa5@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netpoll.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index e4b8f1f91e54..88f7daa8560e 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -13,12 +13,28 @@
#include <linux/rcupdate.h>
#include <linux/list.h>
#include <linux/refcount.h>
+#include <linux/ip.h>
+#include <linux/udp.h>
union inet_addr {
__be32 ip;
struct in6_addr in6;
};
+/*
+ * Maximum payload netpoll's preallocated skb pool can carry. Keep this in
+ * sync with the buffer size used by refill_skbs() in net/core/netpoll.c;
+ * callers (e.g. netconsole) use it to detect requests the pool can never
+ * satisfy and avoid dequeuing a pooled skb that would later trip
+ * skb_over_panic() in skb_put().
+ */
+#define MAX_UDP_CHUNK 1460
+#define MAX_SKB_SIZE \
+ (sizeof(struct ethhdr) + \
+ sizeof(struct iphdr) + \
+ sizeof(struct udphdr) + \
+ MAX_UDP_CHUNK)
+
struct netpoll {
struct net_device *dev;
netdevice_tracker dev_tracker;