[Drbd-dev] Proposed update to packet dumping code

Graham, Simon Simon.Graham at stratus.com
Thu Aug 10 00:50:56 CEST 2006


I'm trying to track down a problem where I really need to get a dump of
the packets sent back and forth and I also need to be able to control
the output at run time - the attached is a proposed patch to the
DUMP_EACH_PACKET code in trunk that does the following:

1. I've fixed the code so it compiles and runs and updated it to include
(some of) the new messages in drbd-8

2. When you build with DUMP_EACH_PACKET defined, a module parameter
dump_packets is added that can be set via sysfs. Values
   are:

	0 - no tracing of packets
	1 - summary tracing of key packets - no file/line # and no
tracing of Ping packets
	2 - full tracing - trace includes file/line# and all packets are
traced
	3 - max tracing -- info on set-in-sync and set-out-of-sync calls
also included (this set-in-sync was in
		 the existing code, so I left it there but it's annoying
in general!)

3. I've split the code into an inline that does a quick check to see if
the tracing is enabled and a global function
   that does the work.

At the moment, this is still not on by default but my intention would be
that you could use a driver with this turned on in production (and
therefore be able to debug problems in the field).

Let me know what you think and if anything else should be done.
Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-dump-packet.patch
Type: application/octet-stream
Size: 9545 bytes
Desc: drbd-dump-packet.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20060809/5073126f/drbd-dump-packet.obj


More information about the drbd-dev mailing list