Skip to contentSkip to conversation

pktgen (1.6,-ben)

PATCH New Ben Greear 1 participant 1 message Sep 18, 2002

Subsystems (3)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

PATCH 1/1 pktgen (1.6,-ben)

Here is an update of my pktgen patch. This patch is against 2.4.20-pre7. (I say my, because it is significantly different from the one in the kernel, and should not be confused with Robert's more official patches, Robert still gets primary credit for the idea and original code!)

It provides traffic generation and reception features, including latency, out-of-order & dropped packet counters, and much more. This particular patch fixes a divide-by-zero bug in earlier patches I produced (only seen on machines running at less than 1Ghz).

If anyone has an Intel GigE card or two, I would be interested if it could sustain pktgen (or other high speed) traffic for more than 6 hours. My machine crashes everytime!

Enjoy,
Ben

Signature · 3 lines
Ben Greear <[email protected]>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
include/linux/if.h +6 -0
@@ -47,6 +47,12 @@
 
 /* Private (from user) interface flags (netdevice->priv_flags). */
 #define IFF_802_1Q_VLAN 0x1             /* 802.1Q VLAN device.          */
+#define IFF_PKTGEN_RCV  0x2             /* Registered to receive & consume  Pktgen skbs */
+#define IFF_ACCEPT_LOCAL_ADDRS 0x4      /**  Accept pkts even if they come from a local
+                                         * address.  This lets use send pkts to ourselves
+                                         * over external interfaces (when used in conjunction
+                                         * with SO_BINDTODEVICE
+                                         */
 
 /*
  *	Device mapping structure. I'd just gone off and designed a 
include/linux/netdevice.h +93 -4

165 lines not on this page · raw message

net/core/dev.c +225 -111

492 lines not on this page · raw message

net/core/pktgen.c +2595 -355

2,331 lines not on this page · raw message

net/core/pktgen.h +240 -0

240 lines not on this page · raw message

net/netsyms.c +17 -0

Lines of this file are not shown. View the raw message.

Documentation/networking/pktgen.txt +113 -45

158 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.