From: Dave Jones <davej@codemonkey.org.uk>
To: netdev@vger.kernel.org
Subject: Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly
Date: Wed, 21 May 2008 17:45:23 -0400 [thread overview]
Message-ID: <20080521214523.GB22591@codemonkey.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 34 bytes --]
--
http://www.codemonkey.org.uk
[-- Attachment #2: Type: message/rfc822, Size: 6335 bytes --]
From: bugzilla@redhat.com
To: davej@codemonkey.org.uk
Subject: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly
Date: Wed, 21 May 2008 17:38:25 -0400
Message-ID: <bug-447812-263030@bugzilla.redhat.com>
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=447812
Summary: Netlink messages from "tc" to sch_netem module are not
interpreted correctly
Product: Fedora
Version: rawhide
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: medium
Priority: low
Component: kernel
AssignedTo: kernel-maint@redhat.com
ReportedBy: karl@iwl.com
QAContact: extras-qa@fedoraproject.org
CC: nhorman@redhat.com
>From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.14) Gecko/20080416 Fedora/2.0.0.14-1.fc8 Firefox/2.0.0.14
Description of problem:
When using the tc command to send netem settings to the netem module, the messages cause a kernel error to be emitted into dmesg and part of the data in the netlink message may be lost.
This makes the netem mechanism quietly unreliable when used on a 2.6.25 kernel.
I have tried this on all of the 2.6.25.X kernels and the results are the same.
This problem did not occur with the2.6.24 kernels.
The problem is the same on x86_64 and i386 architectures.
Version-Release number of selected component (if applicable):
2.6.25.3-18.fc9.x86_64
How reproducible:
Always
Steps to Reproduce:
Here is a shell script (needs to be run as root):
#!/bin/bash
DEV=eth0
TC=/sbin/tc
# Clean out any prior settings.
# This may generate some messages of the form:
# RTNETLINK answers: No such file or directory
${TC} qdisc del dev ${DEV} root > /dev/null 2>&1
${TC} qdisc del dev ${DEV} ingress > /dev/null 2>&1
${TC} qdisc add dev ${DEV} root handle 1: prio bands 5 priomap 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
${TC} qdisc add dev ${DEV} parent 1:1 handle 10: netem
# If the kernel is acting up this will cause a kernel
# message of the following form to be emitted and visible
# via dmesg | tail
# netlink: 12 bytes leftover after parsing attributes.
${TC} qdisc change dev ${DEV} parent 1:1 handle 10: netem delay 50ms 5ms 10% corrupt 8%
echo
echo
echo "Does the following contain a netlink message about leftover bytes?"
echo "If so, the the kernel code in .../net/netlink/attr.c"
echo "is unhappy with the netlink messages from the tc command."
dmesg | tail -3
# Take a look at the netem status and see whether a corruption
# value has been established or not.
echo
echo
echo "Does the following show a corruption setting or not?"
echo "If not then the kernel module .../net/sched/sch_netem.c"
echo "did not pick up all the pieces from the netlink message"
echo "complained of by .../net/netlink/attr.c"
echo "A GOOD response should look like this:"
echo " qdisc prio 1: root bands 5 priomap 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4"
echo " qdisc netem 10: parent 1:1 limit 1000 delay 50.0ms 5.0ms 10% corrupt 8%"
${TC} qdisc show dev ${DEV}
${TC} qdisc show dev ${DEV} | grep netem | grep -q corrupt > /dev/null
RC=$?
if [ "${RC}" != 0 ] ; then
echo
echo "I did not see any corruption setting, did you?"
echo "Seems like there is a bug in the tc-to-netem module netlink."
fi
# Clean up after ourselves.
# This may generate some messages of the form:
# RTNETLINK answers: No such file or directory
${TC} qdisc del dev ${DEV} root > /dev/null 2>&1
${TC} qdisc del dev ${DEV} ingress > /dev/null 2>&1
Actual Results:
On all 2.6.25 kernels, whether i386 or x86_64, this causes a kernel message to be emitted about unused bytes. In addition, the netem module does not pick up all of the data that was sent to it, such as the corruption settings.
All of this stuff worked in the 2.6.24 kernels.
Expected Results:
No kernel message should have been emitted.
The data sent by the user via the "tc" command should have been received by the netem module.
Additional info:
I tried to figure out whether the problem is in "tc" or in the kernel.
So I ran some old "tc" binaries on new kernels. The result was the same as if I had run current "tc" binaries. This suggests that the problem is in the kernel rather than in the "tc" command.
I also did some simple printk debugging on the way that .../net/netlink/attr.c was parsing the netlink messages. The number of bytes that it reported unused always was the sizeof the first chunk of netem data that was lost in the netlink message.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
next reply other threads:[~2008-05-21 21:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 21:45 Dave Jones [this message]
2008-05-21 22:10 ` Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly Stephen Hemminger
2008-05-22 0:21 ` Thomas Graf
2008-05-22 0:57 ` Rick Jones
2008-05-22 11:18 ` Thomas Graf
2008-05-22 16:32 ` Rick Jones
2008-05-22 11:37 ` [NETLINK]: Fix nla_parse_nested_compat() to call nla_parse() directly Thomas Graf
2008-05-22 12:45 ` Patrick McHardy
2008-05-22 17:49 ` David Miller
2008-05-22 18:02 ` Stephen Hemminger
2008-05-22 18:11 ` David Miller
2008-05-21 22:16 ` Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly Rick Jones
2008-05-21 22:36 ` Rick Jones
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=20080521214523.GB22591@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).