From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akshat Kakkar Subject: Re: [fw filter]: Broken! fw mark based tc class selection not working Date: Sat, 12 Sep 2015 03:54:25 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: netdev , Cong Wang , Stephen Hemminger To: Cong Wang Return-path: Received: from mail-ob0-f169.google.com ([209.85.214.169]:34542 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbbIKWY0 (ORCPT ); Fri, 11 Sep 2015 18:24:26 -0400 Received: by obbda8 with SMTP id da8so71560434obb.1 for ; Fri, 11 Sep 2015 15:24:26 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: There is no handle with fw filter. That's the whole point is. If handle and class (flow id) is not specified, then whatever be the mark on the packet, its automatically set as flowid. So if mark is 0x10003, then this fw filter tc filter add dev eth0 parent 1:0 protocol ip fw will cause 0x10003 being set as classid I.e. 1:3. tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:a htb rate 1mbit tc class add dev eth0 parent 1: classid 1:b htb rate 1mbit tc class add dev eth0 parent 1: classid 1:c htb rate 1mbit tc filter add dev eth0 parent 1:0 protocol ip fw iptables -t mangle -I OUTPUT -o eth0 -p tcp -j MARK --set-mark 0x1000a iptables -t mangle -I OUTPUT -o eth0 -p icmp -j MARK --set-mark 0x1000b iptables -t mangle -I OUTPUT -o eth0 -p udp -j MARK --set-mark 0x1000c