From: David Miller <davem@davemloft.net>
To: robert.w.love@intel.com
Cc: hadi@cyberus.ca, netdev@vger.kernel.org, jeffrey.t.kirsher@intel.com
Subject: Re: [RFC PATCH] qos: Limit a filter's priority to a 16 bit value
Date: Fri, 01 May 2009 15:51:55 -0700 (PDT) [thread overview]
Message-ID: <20090501.155155.58484825.davem@davemloft.net> (raw)
In-Reply-To: <20090501184242.12714.2663.stgit@fritz>
From: Robert Love <robert.w.love@intel.com>
Date: Fri, 01 May 2009 11:42:42 -0700
> Currently the kernel is storing the priority value for
> a filter as a 32 bit value. However, the netlink messages
> between the kernel and userspace are passing only 16 bits
> for the priority. This means that the kernel will always
> try to compare the passed down filter's priority using the
> correct upper 16 bits, but all 0s for the lower 16 bits.
>
> Most comparisons will fail when checking against the filter
> chain unless the actual filter has a priority with all 0s
> for the last 16 bits.
>
> The fallout is that users cannot modify or delete most
> filters that are added.
Really?
I'm looking at the code and I don't see this failure case.
Can you describe the problem with specific examples?
All of the code I see either 1) uses u32's to store the
priorities and just compares them (cls_u32.c) or 2)
always uses TC_H_MAJ() of the user's provided value
and uses that to compare with tp->prio values.
Both of which should always just work.
We're just wasting the low 16-bits, but that shouldn't
cause problems like the one you're describing as long
as everyone extracts and compares the top bits properly
which as far as I can tell is the case.
next prev parent reply other threads:[~2009-05-01 22:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-01 18:42 [RFC PATCH] qos: Limit a filter's priority to a 16 bit value Robert Love
2009-05-01 22:51 ` David Miller [this message]
2009-05-01 23:30 ` Love, Robert W
2009-05-02 1:52 ` jamal
2009-05-02 2:10 ` Love, Robert W
2009-05-02 2:18 ` David Miller
2009-05-02 2:35 ` jamal
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=20090501.155155.58484825.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=robert.w.love@intel.com \
/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).