New trafgen syntax and some ICMP examples

134 views
Skip to first unread message

Jesper Dangaard Brouer

unread,
Jan 5, 2017, 10:20:33 AM1/5/17
to Vadim Kochan, bro...@redhat.com, Tobias Klauser, Daniel Borkmann, netsn...@googlegroups.com
Hi Vadim,

I just noticed the new trafgen syntax, I really like it.

I was playing with testing the kernels ICMP handling code and
validating some change to the icmp rate-limiting, and wrote an trafgen
conf for generating a "big" enough ping flood (as hping was not fast
enough, and ping ratelimit itself).

Old syntax here[1] and new[2].
[1] https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp01_ping_flood.trafgen
[2] https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp02_ping_flood.trafgen

With the old syntax I could not express the seq number increment
correctly (only 1 byte updated), with the new syntax I can. The old
dinc() is sort of "broken" IHMO.

Commits[3] showing the transformation:
[3] https://github.com/netoptimizer/network-testing/commits/2b26ad7e66

Thanks!
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer

Vadim Kochan

unread,
Jan 5, 2017, 11:59:35 AM1/5/17
to Jesper Dangaard Brouer, Vadim Kochan, Tobias Klauser, Daniel Borkmann, netsn...@googlegroups.com
Hi Jesper,

Yes, while introducing these proto dynamic functions I realized that
logic for the old/low-level "dinc" does not work well, and I tried add
separate implementation for new "dinc", I will try to unify them to use
only one logic.

Thanks!

Jesper Dangaard Brouer

unread,
Jan 7, 2017, 4:36:14 AM1/7/17
to Vadim Kochan, Tobias Klauser, Daniel Borkmann, netsn...@googlegroups.com, bro...@redhat.com
That sounds like a good idea to me :-)
In the code the two variants of dinc() are quite different.

Another thing, I would like to assign "csum" the value/result of e.g.
csumip(14, 33) by the syntax don't allow this. Example see[1]. I
tried to add it to the syntax myself, but it has been too long since I
used bison/yacc (approx 20 years ;-)).

[1] https://github.com/netoptimizer/network-testing/commit/e9d41df6493000348

Thanks for working trafgen :-)
Reply all
Reply to author
Forward
0 new messages