From: Ben Greear <greearb@candelatech.com>
To: hadi@cyberus.ca
Cc: Robert Olsson <Robert.Olsson@data.slu.se>,
NetDev <netdev@vger.kernel.org>
Subject: Re: pktgen patch available for perusal.
Date: Sat, 04 Nov 2006 11:12:21 -0800 [thread overview]
Message-ID: <454CE615.20208@candelatech.com> (raw)
In-Reply-To: <1162663855.6237.116.camel@jzny2>
jamal wrote:
> On Sat, 2006-04-11 at 09:29 -0800, Ben Greear wrote:
>
> You can ofcourse add many of these based on other header info.
>
> It seems to me your magic header is inside the UDP packet, correct?
> In that case you will have to play with matches since you can specify
> arbitraty offsets and values inside the packet.
>
Yes, I want to be able to randomize source/dest MAC, IP, and IP Port, so
I need to match only on the
magic cookie. I'll soon add support to deal with TCP packets as well,
but that is only going to require
calculating a different offset to look for the magic value.
> Of course you can do this from your application instead of using tc.
> I think that will be the best place to control this and sync with
> pktgen sending.
>
You mean the equiv of calling system(tc filter .....) from the app, or
do you mean something else
entirely?
>> the rest can be in a method
>> called after you match in your script?
>>
>>
>
> If the packet/byte counters that the drop action provides are not good
> enough, you can write yourself a little module that will do the
> accounting the way you want it. For example this will be necessary to
> the out-of-sequence cheques below. Timestamps are already being updated
> Look at net/sched/act_simple.c and its associated user space code in
> iproute2.
>
> Now, Ben - are you listening really this time or am i wasting my time
> for the nth time giving you all these details? ;->
>
You always give details that are pertinent to your setup and not to
mine, and you
always have some 'small' step that is 'write a kernel module and hack on
tc' if you
want it to do something other than the generic thing.
> If you are listening then start with:
>
> 1) Do a simple test with just udp traffic as above, doing simple
> accounting. This helps you to get a feel on how things work.
> 2) modify the matching rules to match your magic cookie
>
These first two do not look too difficult. I certainly need more
control/stats than
what the generic counters would be, however, so I assume I need to move
to step 3.
> 3) write a simple action invoked by your matching rules and use tc to
> add it to the policy.
>
I have exactly no idea of what you mean by this. How do I get this tc
framework to
send the packet with 32-bit value FOO at offset X to some method called
pktgen_rx_pkt(skb)
in the pktgen module? That is all I want in a hook: The ability to
match on a pkt and send it
to my kernel module and to let my kernel module and have it traverse the
stack no farther
unless my kernel module decides to re-insert it for some reason.
If this takes significant work, then please don't waste more time trying
to talk me
into this, as my small patch to dev.c already does exactly what I need
and the code
is very easy to understand.
If this is easy, how about you write the module and make the tc
changes. I'll work on any
changes needed in pktgen and polish up a nice patch for Robert et
al.... Then you can get
the latency distributions, OOO, Dup, Dropped and other counters that my
pktgen logic
provides for your own testing purposes...
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2006-11-04 19:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 23:47 pktgen patch available for perusal Ben Greear
2006-11-01 17:14 ` Robert Olsson
2006-11-01 19:11 ` Ben Greear
2006-11-03 11:13 ` Robert Olsson
2006-11-03 16:34 ` Ben Greear
2006-11-03 20:24 ` Robert Olsson
2006-11-03 20:41 ` Ben Greear
2006-11-04 12:32 ` jamal
2006-11-04 17:29 ` Ben Greear
2006-11-04 18:10 ` jamal
2006-11-04 19:12 ` Ben Greear [this message]
2006-11-06 14:06 ` Robert Olsson
2006-11-06 14:14 ` Robert Olsson
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=454CE615.20208@candelatech.com \
--to=greearb@candelatech.com \
--cc=Robert.Olsson@data.slu.se \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
/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).