Skip to contentSkip to conversation

KGDB: Pass skb via NET_POLL rx routine

PATCH In review Jason Wessel 2 participants 2 messages Oct 15, 2007 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 5/21 KGDB: Pass skb via NET_POLL rx routine

netpoll_pass_skb_to_rx_hook.patch

From: Jason Wessel <[email protected]>
CC: [email protected]
Subject: [PATCH] Pass skb via NET_POLL rx routine

This patch is a chane to the NET POLL api so that the MAC address or IP frame information can be parsed by the driver that wishes to use it. Speficially for kgdboe, it is used to automatically collect the MAC address of the GDB host.

---
 include/linux/netpoll.h |    2 +-
 net/core/netpoll.c      |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
include/linux/netpoll.h +1 -1
Index: linux-2.6.21.1/include/linux/netpoll.h
===================================================================
@@ -16,7 +16,7 @@ struct netpoll {
 	struct net_device *dev;
 	char dev_name[IFNAMSIZ];
 	const char *name;
-	void (*rx_hook)(struct netpoll *, int, char *, int);
+	void (*rx_hook)(struct netpoll *, int, char *, int, struct sk_buff *);
 
 	u32 local_ip, remote_ip;
 	u16 local_port, remote_port;
net/core/netpoll.c +2 -1
Index: linux-2.6.21.1/net/core/netpoll.c
===================================================================
@@ -498,7 +498,8 @@ int __netpoll_rx(struct sk_buff *skb)
 
 	np->rx_hook(np, ntohs(uh->source),
 		    (char *)(uh+1),
-		    ulen - sizeof(struct udphdr));
+		    ulen - sizeof(struct udphdr),
+		    skb);
 
 	kfree_skb(skb);
 	return 1;
Acked-by on v1 5/21
#1 lore raw
Quoted 8 lines · Jason Wessel

netpoll_pass_skb_to_rx_hook.patch

From: Jason Wessel <[email protected]>
CC: [email protected]
Subject: [PATCH] Pass skb via NET_POLL rx routine

Quoted 6 lines

This patch is a chane to the NET POLL api so that the MAC address or IP frame information can be parsed by the driver that wishes to use it. Speficially for kgdboe, it is used to automatically collect the MAC address of the GDB host.

Looks great.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.