I can't assign traffic to queues using u32 match. With the script I've used: -------- tc qdisc add dev eth0 root handle 1: htb default 12 tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps tc class add dev eth0 parent 1:1 classid 1:10 htb rate 50kbps ceil 50kbps tc class add dev eth0 parent 1:1 classid 1:12 htb rate 30kbps ceil 30kbps tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 classid 1:10 match ip src 192.168.0.193/32 tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5 tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10 -------- All traffic is assigned to default 1:12 class, even from 192.168.0.193. The same happens when I use 'match ip src 192.168.0.0/22' (internal network address), 'match ip dport' or 'match u32 0xc0a800c1 0xffffffff at 12'. The only case I found it to work is when I specify mask of 0, i.e. 'match ip src 0/0'. The problem is present on two gentoo boxes with 2.6.30 and 31 kernels. Is anyone else experiencing it? Do I need some specific kernel configuration? Reproducible: Always Steps to Reproduce: 1. Execute the commands in bug description. Actual Results: Trafic from 192.168.0.193 goes to class 1:12 Expected Results: Trafic from 192.168.0.193 goes to class 1:10 emerge --info: Portage 2.1.7.16 (default/linux/x86/10.0/server, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r10-beju i686) ================================================================= System uname: Linux-2.6.31-gentoo-r10-beju-i686-AMD_Sempron-tm-_2400+-with-gentoo-1.12.13 Timestamp of tree: Wed, 24 Feb 2010 21:00:01 +0000 app-shells/bash: 4.0_p35 dev-lang/python: 2.6.4 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.10.2, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.3.4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://ftp.vectranet.pl/gentoo/ http://gentoo.prz.rzeszow.pl ftp://gentoo.po.opole.pl http://mirror.lug.udel.edu/pub/gentoo/ " LANG="pl_PL.UTF-8" LC_ALL="pl_PL.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl apache2 bash-completion bzip2 cli cracklib crypt cscope cups cxx doc dri examples fortran gdbm gpm iconv ldap modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection samba session snmp spl ssl symlink sysfs tcpd truetype unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 223321 [details] 2.6.31 kernel config
iproute2-2.6.33 is in the tree ... i would try that and if it still fails, try e-mailing the list at netdev@vger.kernel.org. i'm not sure how many people here are actually familiar with the lower net internals.
Thanks, I'll try that tomorrow, although I have already tried with iproute-2.6.33 compiled manually from source - it doesn't work. The worst thing is that I don't know if it's a kernel problem, iproute2 problem or maybe I've messed up with my script, because I cannot imagine how would all these network routers work if such a major feature would be broken, and google says nothing about the problem.
i noticed that iproute2 has been mishandling iptables for a while ... could you try the new iproute2-2.6.35-r3 ebuild ?