From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Tue, 28 Mar 2017 09:24:58 +0000 Subject: Re: tc filter fw flowid and masks Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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