Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "Roy" <roy@xxx.lt>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] imq crash investigation
Date: Wed, 17 Dec 2003 15:16:10 +0000	[thread overview]
Message-ID: <marc-lartc-107167585707903@msgid-missing> (raw)
In-Reply-To: <marc-lartc-107165245312033@msgid-missing>

Now I am continuing imq development, but seems it is hopeless, no mater what
i do it crashes when qdisc are used
seems that it can be not imq problem but somthing wrong with htb.
I completely rewrote imq driver, only device registration left. I checked
many diferent variants of code, and no mater what, it crashes as allways
I even made that packets are never dropped but still  it crashes completely
with no reason, probability to crash increases with load.

here is new imq code:

int wequeue=stats->rx_packets-stats->tx_packets;
stats->rx_dropped=wequeue;
if (wequeue >70){
nf_reinject(skb, info, NF_ACCEPT);  //not alow to fill queue full so htb
wont drop packets
stats->tx_dropped++;
return 0;
}
stats->rx_packets++;
//--------  the main part of the driver ( packets are newer dropped)
skb->destructor = imq_skb_destructor; // not used this time
skb->real_dev=skb->dev; //not used
skb->dev=imq_dev; //not used also
if (dev_queue_xmit(skb)){
skb->dev=skb->real_dev;
printk("cant queue %p \n",skb);  // if this occurs then queue is full. what
never happens
}
//-----------------------------------
As you see it is so simple that there is no space for bugs.
now kernel do not crash, it just hags completely with no output.

so I suspect that there is problem with shaper itself or netfilter, or linux
dont like when packets are reordered.

Now I am going to try completely diferent idea, I thing I should name it not
INQ but  NFD because it will be netfilter interface( the part of netfilter
core itself) so EVERYTHING will pass this interface.





> Hello.
>
> As you know Patrick McHardy stopped to support IMQ. As for now, this
> stuff has an annoying problem and I've made a little investigation of
> it. So, maybe it will be useful for someone.
>
> First, pass all traffic of the interface (as in, as out) though imq
> device. Something like:
>
> iptables -t mangle -I PREROUTING -i $DEV -j IMQ
> iptables -t mangle -I POSTROUTING -o $DEV -j IMQ
>
> This works ok. At least, after a day of running this setup seems to be
> stable. Now, lets attach a qdisc to imq:
>
> RATE\x187
> tc qdisc add dev imq0 handle 1: root tbf rate ${RATE}kbit \
>      burst 15kb/8 limit 15kb
>
> Ok, here it is. After some time (minutes,hours) I get a kernel panic.
>
> As far as I know, IMQ is the _only_ way for now in Linux to limit the
> total bandwidth of the link (in+out). It would be excellent if somebody,
>   enough expirenced in kernel hacking, will be so kind to fix that
problem.
>
> Best regards,
>    Ivan Pesin
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2003-12-17 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-17  8:40 [LARTC] imq crash investigation Ivan Pesin
2003-12-17 15:16 ` Roy [this message]
2003-12-17 16:43 ` Ivan Pesin
2003-12-17 21:32 ` Roy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-107167585707903@msgid-missing \
    --to=roy@xxx.lt \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox