netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Netem does not work with loopback
@ 2006-07-14 14:34 Guillaume Chazarain
  2006-07-14 15:38 ` Stephen Hemminger
  0 siblings, 1 reply; 19+ messages in thread
From: Guillaume Chazarain @ 2006-07-14 14:34 UTC (permalink / raw)
  To: netdev

Hello,

Is it a known problem that the Netem qdisc is very unreliable on the 
loopback (unlike on a true NIC)?

This seems to come from its usage of skb->cb which conflicts with IPCB. 
For instance, the field
IPCB(skb)->opt.optlen becomes non-null and memory corruption follows.

I ``worked around'' this conflict with the following ugly hack:

--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -79,6 +79,7 @@ struct netem_sched_data {
 
 /* Time stamp put into socket buffer control block */
 struct netem_skb_cb {
+    char padding[32]; /* to avoid stepping over IPCB when used on the 
loopback */
     psched_time_t    time_to_send;
 };


Hopefully someone has a better solution :-)

Thanks.

-- 
Guillaume


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-07-25  6:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-14 14:34 Netem does not work with loopback Guillaume Chazarain
2006-07-14 15:38 ` Stephen Hemminger
2006-07-14 17:04   ` Guillaume Chazarain
2006-07-14 18:39     ` Stephen Hemminger
2006-07-14 18:49       ` Guillaume Chazarain
2006-07-14 18:56         ` [PATCH] clear skb cb on IP input Stephen Hemminger
2006-07-14 21:48           ` David Miller
2006-07-15 13:28             ` Herbert Xu
2006-07-15 15:50               ` Stephen Hemminger
2006-07-16  1:15                 ` David Miller
2006-07-16  1:12               ` David Miller
2006-07-16 11:20                 ` chas williams - CONTRACTOR
2006-07-17  2:02                   ` David Miller
2006-07-18 18:19                   ` Guillaume Chazarain
2006-07-18 19:43                     ` Herbert Xu
2006-07-19 12:35                       ` Guillaume Chazarain
2006-07-25  6:45                         ` David Miller
2006-07-16 22:03                 ` Herbert Xu
2006-07-17  1:18                   ` David Miller

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).