Skip to contentSkip to conversation

netem/iproute2 solving correlated loss issues [0/5]

PATCH In review Stefano Salsano 3 participants 4 messages Dec 18, 2009 – Dec 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netem/iproute2 solving correlated loss issues [0/5]

Dear all,

we are going to send a patch that enhances netem module and the iproute2 utilities.

Our aim is to fix the problems with correlated loss generation in netem (as for example described in
https://lists.linux-foundation.org/pipermail/netem/2007-September/001156.html)

We have now included a more general loss model, as described in:
http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetEm2

The patch is backward compatible, we have not removed the previous correlated loss generated approach (though its use should be deprecated), nor we have changed anything else in the existing netem module.

Within our patch for iproute2 we also added a man page for netem (it was missing) in which we have pasted the existing documentation for netem and the usage of our model.

We had posted this work on the netem mailing list some months ago as a separate netem2 module... we received some feedback and made some bug fix since then. We believe the work is now ready to be inserted in the main netem/iproute2 development.

We will post in next messages the patches to netem module for 2.6.32 kernel and to 2.6.29 iproute2 (find below the list)

Comments are welcome.
Best regards,
Stefano and Fabio

netem kernel module patches:

patch 1/5 : linux-2.6.32/include/linux/pkt_sched.h patch 2/5 : net/sched/sch_netem.c

iproute2 utilities patches:

patch 3/5 : iproute2-2.6.29-1/include/linux/pkt_sched.h patch 4/5 : iproute2-2.6.29-1/man/man8/tc-netem.8 patch 5/5 : iproute2-2.6.29-1/tc/q_netem.c

Signature · 12 lines
*******************************************************************
Stefano Salsano
Dipartimento Ingegneria Elettronica
Universita' di Roma "Tor Vergata"
Via del Politecnico, 1 - 00133 Roma - ITALY

http://netgroup.uniroma2.it/Stefano_Salsano/

E-mail  : [email protected]
Cell.   : +39 320 4307310
Office  : (Tel.) +39 06 72597770  (Fax.) +39 06 72597435
*******************************************************************
#1 lore raw

patch 1/5 : linux-2.6.32/include/linux/pkt_sched.h

include/linux/pkt_sched.h +15 -0
diff -uNr linux-2.6.32/include/linux/pkt_sched.h linux-2.6.32-netem/include/linux/pkt_sched.h
@@ -479,6 +479,21 @@
 	__u32	gap;		/* re-ordering gap (0 for none) */
 	__u32   duplicate;	/* random packet dup  (0=none ~0=100%) */
 	__u32	jitter;		/* random jitter in latency (us) */
+	__u32	p13;		/* GI loss model-state 1 to 3 transition probability */
+	__u32	p31;		/* GI loss model-state 3 to 1 transition probability */
+	__u32	p32;		/* GI loss model-state 3 to 2 transition probability */
+	__u32	p23;		/* GI loss model-state 2 to 3 transition probability */
+	__u32   p14;		/* GI loss model-state 1 to 4 transition probability */
+	__u32	gilb_p;		/* Gilbert-Elliot model-state good-bad transition probability */
+	__u32	gilb_r;		/* Gilbert-Elliot model-state bad-good transition probability */
+	__u32	gilb_h;		/* Gilbert-Elliot-loss model loss probability in bad state */
+	__u32	gilb_k;		/* Gilbert-Elliot-loss model loss probability in good state */
+	__u32   algorithm;	/* loss model algorithm selection */
+	__u32 	logging;  	/* loss logging mode selector */
+	__u32   query;		/* loss query mode selector */
+	__u16   pattern_length; /* deterministic loss pattern length */
+	__u32   pattern_repetitions; /* deterministc loss pattern repetitions */
+	__u16   *user_pattern; /* determinist loss pattern elements */
 };
 
 struct tc_netem_corr
maintainer
#2 lore raw
In reply to Stefano Salsano

From: Stefano Salsano <[email protected]>
Date: Fri, 18 Dec 2009 11:39:13 +0100

Quoted 4 lines

The patch is backward compatible, we have not removed the previous correlated loss generated approach (though its use should be deprecated), nor we have changed anything else in the existing netem module.

To heck it is!

The changed version of iproute2 will not work without the kernel changes installed. The kernel validates the size of the structures passed in, you can't change the user visible interface like this.

Add new netlink attributes to extend things, that's the "real" backwards compatible way to make changes to netlink interfaces.

#3 lore raw
Quoted 6 lines · David Miller
Quoted 1 line

The patch is backward compatible, we have not removed the previous...

To heck it is!
The changed version of iproute2 will not work without the kernel changes installed. The kernel validates the size of the structures passed in, you can't change the user visible interface like this.

Quoted 5 lines · David Miller

Furthermore it is fundamentally flawed in it's implementation in that the user exported data structures cannot be changed, you cannot change the layout and you absolutely cannot change the size of these things or else various tool and kernel combinations stop working.

thank you for raising these fundamental issues ! we will address them and resubmit the patch when done...

Quoted 2 lines

Add new netlink attributes to extend things, that's the "real" backwards compatible way to make changes to netlink interfaces.

point taken

Signature · 12 lines
*******************************************************************
Stefano Salsano
Dipartimento Ingegneria Elettronica
Universita' di Roma "Tor Vergata"
Via del Politecnico, 1 - 00133 Roma - ITALY

http://netgroup.uniroma2.it/Stefano_Salsano/

E-mail  : [email protected]
Cell.   : +39 320 4307310
Office  : (Tel.) +39 06 72597770  (Fax.) +39 06 72597435
*******************************************************************