From: Patrick McHardy <kaber@trash.net>
To: fdelawarde@wirelessmundi.com
Cc: netfilter@vger.kernel.org
Subject: Re: 64bit MARK
Date: Fri, 30 Oct 2009 10:20:23 +0100 [thread overview]
Message-ID: <4AEAAFD7.1070407@trash.net> (raw)
In-Reply-To: <1256893245.1254.66.camel@francois.tc.commsmundi.com>
Fran����������������������������������������������� wrote:
> On Thu, 2009-10-29 at 23:30 +0100, Patrick McHardy wrote:
>>> Would it be possible to have 64bit MARKs with 64bit architectures?
>>>
>>> Apparently they are defined as "unsigned long" in linux headers, but
>>> iptables limits them to 32bit.
>> Thats from far far back. The unsigned long only exists in compatibility
>> structures, all new revisions use 32 bit. This is deliberate to make
>> sure they're same-sized on all architectures and rulesets don't behave
>> differently.
>
> It might be an uncommon case, but many things I do need MARKs and 32bits
> is just not enough!
>
> For example, for input traffic I do marking for:
> - ip rules (sometimes A LOT of rules)
> - tc filters (sometimes A LOT of filters)
> - gateway selection (ip rules for multipath)
> - marking input interface to use in IMQ
>
> Any ideas then for someone needing more than 32bits MARK? I could use
> TOS bits (usable with ip rules and tc filters), but it's just so ugly,
> and would screw in any network using it...
>
> Could the other 32 bits be used as a MARK "category" feature available
> only for 64bit arch?
No, as I said, rulesets are supposed to behave similar on all
architectures. Since neither routing rules nor TC classifiers
support more than 32 bit, it would be useless anyways. But you
can usually deal with this by organizing your marking rules
properly.
First, all of the above support using masks for mark values,
which might be helpful. For routing and gateway selection you
only need the mark values at PREROUTING and OUTPUT, so you
can reuse them afterwards. TC marking is best done in
POSTROUTING since that doesn't interfere with routing. If
for some reason you want to do TC classification earlier than
that, you can use the CLASSIFY target, which doesn't use
mark values but priority values.
next prev parent reply other threads:[~2009-10-30 9:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 17:05 64bit MARK François Delawarde
2009-10-29 20:39 ` John A. Sullivan III
2009-10-29 22:33 ` Patrick McHardy
2009-10-30 1:21 ` John A. Sullivan III
2009-10-29 22:30 ` Patrick McHardy
2009-10-30 9:00 ` François Delawarde
2009-10-30 9:20 ` Patrick McHardy [this message]
2009-10-30 9:52 ` François Delawarde
2009-10-30 9:55 ` Patrick McHardy
2009-10-30 10:15 ` François Delawarde
2009-10-30 10:17 ` Patrick McHardy
2009-10-30 10:22 ` François Delawarde
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=4AEAAFD7.1070407@trash.net \
--to=kaber@trash.net \
--cc=fdelawarde@wirelessmundi.com \
--cc=netfilter@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.