lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Feb 2012 11:05:22 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Simon Wunderlich <simon.wunderlich@...03.tu-chemnitz.de>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] skbuff: Add new tc classify variable

On Tue,  7 Feb 2012 19:39:08 +0100
Simon Wunderlich <simon.wunderlich@...03.tu-chemnitz.de> wrote:

> The linux traffic control mechanism has different ways to select the
> correct class of a qdisc. A common way to do this is to use tc filters
> that are directly attached to a qdisc. Another approach is to use the
> iptables classify module. The latter one can reduce the amount of work
> necessary to process a packet when iptables is already involved in the
> packet classification.
> 
> The iptables module can be used in the postrouting chain of the mangle
> table.
> 
> # iptables -F -t mangle
> # iptables -X -t mangle
> # iptables -t mangle -I POSTROUTING -j CLASSIFY --set-class 1:1337
> 
> A simple qdisc with two classes will now route the traffic to 1:1337
> 
> # tc qdisc del dev eth0 root
> # tc qdisc add dev eth0 root handle 1: htb default 1
> # tc class add dev eth0 parent 1: classid 1:1 htb rate 15kbit burst 0kbit
> # tc class add dev eth0 parent 1: classid 1:1337 htb rate 250kbit burst 0kbit
> # tc -s class show dev eth0
> 
> A similar test with an ath9k device will show a complete different
> behavior. The default class 1:1 will be used and data is sent through.
> This problem seems to be related to the fact that the shared member
> variable sk_buff::priority is used to store the tc class id of an
> outgoing packet. This variable is also used in other places for
> different purposes. An example is the ieee80211_select_queue function
> which always overwrites the priority of an outgoing skb.
> 
> This conflict can be resolved by an additional member variable
> sk_buff::tc_class that is only used for the traffic control
> classification.
> 
> Signed-off-by: Simon Wunderlich <siwu@....tu-chemnitz.de>
> Cc: Pablo Neira Ayuso <pablo@...filter.org>
> Cc: Patrick McHardy <kaber@...sh.net>
> Cc: Jamal Hadi Salim <hadi@...erus.ca>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Johannes Berg <johannes@...solutions.net>
> Cc: "John W. Linville" <linville@...driver.com>
> Cc: Marek Lindner <lindner_marek@...oo.de>
> Cc: Sven Eckelmann <sven@...fation.org>
> Cc: netfilter-devel@...r.kernel.org
> Cc: netfilter@...r.kernel.org
> Cc: coreteam@...filter.org
> Cc: netdev@...r.kernel.org
> Cc: linux-wireless@...r.kernel.org

I don't understand why this is better, we already have mark to do this.
Your method saves adding a tc filter to map mark to classid, but that is hardly
a huge burden.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ