public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: mpm@selenic.com
Subject: [PATCH 5/21] KGDB: Pass skb via NET_POLL rx routine
Date: Mon, 15 Oct 2007 13:32:49 -0500	[thread overview]
Message-ID: <4713B251.7000400@windriver.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 57 bytes --]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

[-- Attachment #2: netpoll_pass_skb_to_rx_hook.patch --]
[-- Type: text/x-patch, Size: 1505 bytes --]

netpoll_pass_skb_to_rx_hook.patch

From: Jason Wessel <jason.wessel@windriver.com>
CC: mpm@selenic.com
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.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

---
 include/linux/netpoll.h |    2 +-
 net/core/netpoll.c      |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.21.1/include/linux/netpoll.h
===================================================================
--- linux-2.6.21.1.orig/include/linux/netpoll.h
+++ 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;
Index: linux-2.6.21.1/net/core/netpoll.c
===================================================================
--- linux-2.6.21.1.orig/net/core/netpoll.c
+++ 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;

             reply	other threads:[~2007-10-15 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 18:32 Jason Wessel [this message]
2007-10-15 19:51 ` [PATCH 5/21] KGDB: Pass skb via NET_POLL rx routine Matt Mackall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4713B251.7000400@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox