| To: | "'netdev@xxxxxxxxxxx'" <netdev@xxxxxxxxxxx> |
|---|---|
| Subject: | Pktgen receive hook in dev.c? |
| From: | Ben Greear <greearb@xxxxxxxxxxxxxxx> |
| Date: | Fri, 29 Apr 2005 16:30:12 -0700 |
| Organization: | Candela Technologies |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.7) Gecko/20050417 Fedora/1.7.7-1.3.1 |
I am curious if there is any interest in adding a hook in the netif_receive_skb
method to allow receiving (and consuming) pktgen packets. This gives the
ability
to get some good packet receive & latency stats using pktgen.
I asked this a year or so ago and was told no, but since then the netpoll and
TC_NCLS hooks have been added.... so maybe hooks are OK again?
The hook would look something like:
#if defined(CONFIG_NET_PKTGEN) || defined(CONFIG_NET_PKTGEN_MODULE)
if ((skb->dev->priv_flags & IFF_PKTGEN_RCV) &&
(handle_pktgen_rcv(skb) >= 0)) {
/* Pktgen may consume the packet, no need to send
* to further protocols.
*/
goto out;
}
#endif
type = skb->protocol;
list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type)&15], list) {
....
Take it easy,
Ben
--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: patch2: del/get byid, jamal |
|---|---|
| Next by Date: | Re: [PATCH] net: Disable queueing when carrier is lost, Herbert Xu |
| Previous by Thread: | [PATCH 2.6.12-rc3] pcnet32: fix resource leak with loopback test (with Signed-off-by), Don Fry |
| Next by Thread: | Re: Pktgen receive hook in dev.c?, jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |