All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Furniss <adf.lists@gmail.com>
To: lartc@vger.kernel.org
Subject: Re: tc filter fw flowid and masks
Date: Tue, 28 Mar 2017 09:24:58 +0000	[thread overview]
Message-ID: <c2d79955-c4cd-e557-be14-a88be45675f4@gmail.com> (raw)
In-Reply-To: <CAGmni9ontC=uz=ZbrgjG4z0KzLLy5mBQB9pnfStBNoxpyESP3w@mail.gmail.com>

Salatiel Filho wrote:
> Hi guys, when i mark a packet using, for example,
> # iptables ...  -j MARK --set-mark 10
> i can match it using
> #tc filter add dev ... handle 10 fw flowid 1:10
>
> But how can i match it using tc filter if the mark using iptables has a mask?
> # iptables ... -j MARK --set-mark 10/0xff
>
> The mark is needed because there are a few QOS scripts that set marks
> using masks 0xff00.
>
> When using maks i am always getting in to the default tc class.

Maybe you need to put 0x everywhere you can.

Like Marco I would have said use u32 mark match, but I
have seen router setups that seem to use fw with masks.

untested but maybe something like -

iptables ... -j MARK --set-mark 0x10/0xff

tc filter add dev ... handle 0x10/0xff fw flowid 1:10

  parent reply	other threads:[~2017-03-28  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  7:19 tc filter fw flowid and masks Salatiel Filho
2017-03-28  7:27 ` Marco Gaiarin
2017-03-28  9:24 ` Andy Furniss [this message]
2017-03-28  9:33 ` Phil Sutter
2017-03-29 16:13 ` Marco Gaiarin
2017-03-29 16:58 ` Phil Sutter

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=c2d79955-c4cd-e557-be14-a88be45675f4@gmail.com \
    --to=adf.lists@gmail.com \
    --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.