netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Ben Greear <greearb@candelatech.com>
Cc: "'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Re: Pktgen receive hook in dev.c?
Date: Fri, 29 Apr 2005 20:41:21 -0400	[thread overview]
Message-ID: <1114821681.8929.32.camel@localhost.localdomain> (raw)
In-Reply-To: <4272D133.4040201@candelatech.com>

On Fri, 2005-29-04 at 17:28 -0700, Ben Greear wrote:
> jamal wrote:

> > 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.
> 

Sure you can do all that good stuff in your own action.

> In order to know it's a pktgen packet, I check for a magic value at the beginning
> of the UDP header.

Use the u32 classifier like so:

on dev eth0, if you see some magic signature on udp described as ...
then action my pktgen action.

>   Since this could potentially collide with some 'real' packet,

The classifier allows you to discriminate

> I also check a flag to see if the net_device has a particular flag set indicating
> it is actively accepting pktgen packets...
> 

Thats not needed. You should be able to attach a u32 classifier to any
device of your choice.

> I assume this means I'd need a custom match function in the kernel.

Refer to above - i dont think you do need to put any flag in a device.

>   Is there
> an example of how to do something like this using your framework?

I explained a few things to you last time you showed up and tried to put
hooks. Start there then ask questions. Its pretty simple.

cheers,
jamal

      reply	other threads:[~2005-04-30  0:41 UTC|newest]

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

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=1114821681.8929.32.camel@localhost.localdomain \
    --to=hadi@cyberus.ca \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).