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
|