All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] How to mark a device not to be used with IMQ?
Date: Sat, 23 Mar 2002 13:09:04 +0000	[thread overview]
Message-ID: <marc-lartc-101688903406514@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101679987821477@msgid-missing>

Nils Lichtenfeld schrieb:
> Hello Patrick!

Hi Nils,
 
> From: "Patrick McHardy" <kaber@trash.net>
> > > this is only internal mark to know whether the skb was
> > > already in IMQ. You could use it but you would have to
> > > add new user parameter to the interface structure.
> > > I didn't want to do it as I want the pach to be as simple
> > > as possible.
> > > devik
> 
> > The same problem was bugging me a couple of days ago so i wrote an
> > iptables target which
> > allows you to exclude packets from beeing enqueued to the imq device.
> > The patch is tested with iptables-1.2.6a but should work with almost any
> > recent version.
> > After applying it you have to execute a "chmod +x
> > extensions/.IMQX-test", then
> > make patch-o-matic as usual.
> 
> This sounds great and might be usefull in the future. We are still using 2.2.19
> here so no iptables atm.

I think you can easily write an ipchains modul which accomplishes the
same,
all you have to do is to set 'from_imq" to 1 in the skb.
A good start might be the MARK target, modifying (the iptables one) for
imq
took only a couple of minutes.

> By the way: Imagine the IMQ-device is allready up and a new ISDN-device is
> comming up, will the packages of the new ISDN-device automatically be send to
> IMQ or do I have to take the IMQ-device down and up again?

From net/core/core.c:
int dev_queue_xmit(struct sk_buff *skb)
...
#ifdef CONFIG_IMQ
        /* special intermediate queue up ? */
        if (imq_dev.flags&IFF_UP && !skb->from_imq) {
            spin_lock_bh(&imq_dev.queue_lock);
            q = imq_dev.qdisc;
            if (q->enqueue) {
                int ret = q->enqueue(skb, q);

                qdisc_run(&imq_dev);
                spin_unlock_bh(&imq_dev.queue_lock);
                return ret = NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : ret;
            }
            spin_unlock_bh(&imq_dev.queue_lock);
        }
#endif
...

So i would say everything will be going to the IMQ device automatically.

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

  parent reply	other threads:[~2002-03-23 13:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-22 12:31 [LARTC] How to mark a device not to be used with IMQ? Nils Lichtenfeld
2002-03-22 14:02 ` Martin Devera
2002-03-22 14:18 ` Nils Lichtenfeld
2002-03-22 23:50 ` Martin Devera
2002-03-23  1:42 ` Patrick McHardy
2002-03-23  1:49 ` Patrick McHardy
2002-03-23 12:23 ` Nils Lichtenfeld
2002-03-23 13:09 ` Patrick McHardy [this message]
2002-03-23 15:18 ` Martin Devera
2002-03-23 15:29 ` Martin Devera
2002-03-23 15:41 ` Patrick McHardy

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-101688903406514@msgid-missing \
    --to=kaber@trash.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.