All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Pktgen receive hook in dev.c?
Date: Fri, 29 Apr 2005 16:30:12 -0700	[thread overview]
Message-ID: <4272C384.50901@candelatech.com> (raw)

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@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

             reply	other threads:[~2005-04-29 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 23:30 Ben Greear [this message]
2005-04-30  0:14 ` Pktgen receive hook in dev.c? jamal
2005-04-30  0:28   ` Ben Greear
2005-04-30  0:41     ` jamal

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=4272C384.50901@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=netdev@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.