All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Milata <b42-ml@srck.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tc filter using MASKs in mark
Date: Fri, 24 Aug 2007 08:51:49 +0000	[thread overview]
Message-ID: <20070824085149.GC15726@nyx> (raw)
In-Reply-To: <56909.84.123.239.158.1187910696.squirrel@www.arcoscom.com>

On Fri, Aug 24, 2007 at 01:11:35AM +0200, ArcosCom Linux User wrote:
> Hi,
>    I'm having a problem with filtering marked packet with tc.
> 
>    I'm trying to run this:
> 
> /sbin/tc filter add dev imq0 parent 1:0 protocol ip prio 8 handle
> 0x7/0x000f fw classid 1:8
> 
> But the response is:
> 
> Illegal "handle"
> 
> 
> Typing the handle without masked mark is working, but I have a
> configuration were I need 2 mark types and I'm using masks:
>    Multiple outgoing interfaces (using 0xf000 mask to know the ip route
> filter to allow specific interface for the outcoming traffic).
>    QoS (using 0x000f) to know the destination class for the flow.
> 
> Perhaps I have an incorrect syntax typing the masked handle, but I don't
> find any information about how to type correctly the masked handle with
> "tc filter" and I'm trying an "ip analogous" syntax.
> 
> The ip/tc utils versions I'm using are 2.6.20.
> 
> Anybody could help me with this "syntax problem"?
> 
> Thanks

I think the fw classifier does not support masks. However, you can also
use u32 filter to match marks, and it does support matching with mask.
AFAIK, the support for matching marks have to be enabled in the kernel.

 CONFIG_CLS_U32_MARK=y

And the syntax is like this:

 tc filter add dev imq0 protocol ip prio 8 parent 1:0 u32 match mark \
 0x7 0x000f flowid 1:8

Regards,
 -MM
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  reply	other threads:[~2007-08-24  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 23:11 [LARTC] tc filter using MASKs in mark ArcosCom Linux User
2007-08-24  8:51 ` Martin Milata [this message]
2007-08-24  9:23 ` ArcosCom Linux User
2007-08-24  9:28 ` ArcosCom Linux User

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=20070824085149.GC15726@nyx \
    --to=b42-ml@srck.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.