From: Ole Reinartz <ole.reinartz@gmx.de>
To: lartc@vger.kernel.org
Subject: [LARTC] Problem setting shift value in tcindex filter on big endian
Date: Sun, 01 Apr 2007 12:44:52 +0000 [thread overview]
Message-ID: <460FA944.40902@gmx.de> (raw)
Hi all,
I'm trying to get some DiffServ QoS shaping to work on an XScale
machine, running big endian. I'm setting it up with tc. Using the
tcindex filter I found that regardless what shift value I enter, only
'0' is returned when I list the filters afterwards. The very same rules
work fine on my (little endian) PC.
Looking at the code (iproute2-2.6.18-061002) I found that tc (in
tc/f_tcindex.c, line 72 and after) sends the shift value to the kernel
as an int. The kernel, however, expects it as a 'u16'
(net/sched/cls_tcindex.c, around line 250 depending on the exact kernel
version). I checked 2.6 kernel versions back until 2.6.11.
So... do we have a type mismatch here? As 'shift' is the last parameter
in the buffer, this works still very well on a little endian machine,
however on a big endian machine allways 0 is received in the kernel. To
check that I changed the type of the shift value to unsigned short in
tc, and that fixed it for me.
Someone interested in a patch?
Regards
Ole
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2007-04-01 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-01 12:44 Ole Reinartz [this message]
2007-04-02 12:13 ` [LARTC] Problem setting shift value in tcindex filter on big Patrick McHardy
2007-04-02 12:13 ` [LARTC] Problem setting shift value in tcindex filter on big endian machine Patrick McHardy
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=460FA944.40902@gmx.de \
--to=ole.reinartz@gmx.de \
--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.