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 19:18:54 -0700 (PDT) [thread overview]
Message-ID: <20090501.191854.218400455.davem@davemloft.net> (raw)
In-Reply-To: <273D38FBE7C6FE46A1689FCD014A0B8B495C01C0@azsmsx505.amr.corp.intel.com>
From: "Love, Robert W" <robert.w.love@intel.com>
Date: Fri, 1 May 2009 19:10:36 -0700
> jamal wrote:
>> On Fri, 2009-05-01 at 16:30 -0700, Love, Robert W wrote:
>>
>>> I should be more clear by saying that this should only
>>> fail with filter priorities assigned by the kernel.
>>> I think if the user passes down the priority when
>>> creating the filter it should always be 16bits and it's fine.
>>>
>>> However, when the kernel is assigning priorities, the
>>> first assigned priority for a filter is 0xC0000000,
>>> the second is "the lowest priority - 1" so 0xBFFFFFFF.
>>>
>>> It will assign this value in tcf_auto_prio() which will
>>> directly assign the 32bit value to to tp->prio with-
>>>
>>> tp->prio = nprio ? : tcf_auto_prio(*back);
>>
>> I think the above should read:
>> tp->prio = nprio ? : TC_H_MAJ(tcf_auto_prio(*back));
>>
> I think you might be right, although, I don't see why
> we use a u32 when we're always storing a u16.
That's irrelevant.
You've essentially found what turned out to be a one-line bug, and
fixed it by changing and rearranging a lot of things.
So could I just get that one-liner fix patch from somebody?
Thanks :-)
Meanwhile, on the issue of how this value is stored, perhaps someone
intended to support "classful" filter priorities, just as we support
classful qdiscs. Or perhaps someone had the idea to store the
protocol in there as well, who knows :-)
next prev parent reply other threads:[~2009-05-02 2:19 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
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 [this message]
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.191854.218400455.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).