netdev
[Top] [All Lists]

Re: Pktgen receive hook in dev.c?

To: hadi@xxxxxxxxxx
Subject: Re: Pktgen receive hook in dev.c?
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Fri, 29 Apr 2005 17:28:35 -0700
Cc: "'netdev@xxxxxxxxxxx'" <netdev@xxxxxxxxxxx>
In-reply-to: <1114820059.8929.17.camel@xxxxxxxxxxxxxxxxxxxxx>
Organization: Candela Technologies
References: <4272C384.50901@xxxxxxxxxxxxxxx> <1114820059.8929.17.camel@xxxxxxxxxxxxxxxxxxxxx>
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
jamal wrote:
On Fri, 2005-29-04 at 16:30 -0700, Ben Greear wrote:

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?



Write an action. It should be trivial to consume pktgen. Infact if all
you wanted was to count, use the gact action.

I want a lot more than count, including timestamp, sequence number, etc.

In order to know it's a pktgen packet, I check for a magic value at the 
beginning
of the UDP header.  Since this could potentially collide with some 'real' 
packet,
I also check a flag to see if the net_device has a particular flag set 
indicating
it is actively accepting pktgen packets...

I assume this means I'd need a custom match function in the kernel.  Is there
an example of how to do something like this using your framework?

Thanks,
Ben


cheers,
jamal



--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com


<Prev in Thread] Current Thread [Next in Thread>