From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: John Fastabend <john.r.fastabend@intel.com>,
John Fastabend <john.fastabend@gmail.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: tc rsvp filter show broke
Date: Sun, 28 Sep 2014 10:15:17 -0700 [thread overview]
Message-ID: <CAM_iQpXzXHc7o1WOtkNnF+io_WZFP+DP4zWm8PZbwX7SC38=Pw@mail.gmail.com> (raw)
In-Reply-To: <542823CE.9020301@mojatatu.com>
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
On Sun, Sep 28, 2014 at 8:05 AM, Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> On 09/26/14 19:25, John Fastabend wrote:
>>
>> On 09/26/2014 03:48 PM, Jamal Hadi Salim wrote:
>
>
>>> Hrm - poking inside there and this seems to be one of those
>>> classifiers that hasnt been getting a lot of love. Doesnt
>>> support actions well for example.
>>>
>>> It seems to work for me:
>>
>>
>> This works for me as well try adding two or more policers and
>> check if they all get printed.
>>
>
> Multiple actions wont work for this classifier. I have time,
> will send patch.
>
Hmm, looks like there is a bug in police dump. Please
try the attached patch.
Thanks.
[-- Attachment #2: cls-fix.diff --]
[-- Type: text/plain, Size: 949 bytes --]
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index c28b0d3..1218900 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -576,16 +576,18 @@ int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts)
if (tcf_action_dump(skb, &exts->actions, 0, 0) < 0)
goto nla_put_failure;
nla_nest_end(skb, nest);
- } else if (exts->police) {
- struct tc_action *act = tcf_exts_first_act(exts);
- nest = nla_nest_start(skb, exts->police);
- if (nest == NULL || !act)
- goto nla_put_failure;
- if (tcf_action_dump_old(skb, act, 0, 0) < 0)
- goto nla_put_failure;
- nla_nest_end(skb, nest);
}
}
+
+ if (exts->police) {
+ struct tc_action *act = tcf_exts_first_act(exts);
+ nest = nla_nest_start(skb, exts->police);
+ if (nest == NULL || !act)
+ goto nla_put_failure;
+ if (tcf_action_dump_old(skb, act, 0, 0) < 0)
+ goto nla_put_failure;
+ nla_nest_end(skb, nest);
+ }
return 0;
nla_put_failure:
next prev parent reply other threads:[~2014-09-28 17:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 17:41 tc rsvp filter show broke John Fastabend
2014-09-26 22:48 ` Jamal Hadi Salim
2014-09-26 23:25 ` John Fastabend
2014-09-28 15:05 ` Jamal Hadi Salim
2014-09-28 17:15 ` Cong Wang [this message]
2014-09-28 17:50 ` John Fastabend
2014-09-28 18:48 ` Jamal Hadi Salim
2014-09-29 1:40 ` Cong Wang
2014-09-29 5:34 ` John Fastabend
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='CAM_iQpXzXHc7o1WOtkNnF+io_WZFP+DP4zWm8PZbwX7SC38=Pw@mail.gmail.com' \
--to=xiyou.wangcong@gmail.com \
--cc=jhs@mojatatu.com \
--cc=john.fastabend@gmail.com \
--cc=john.r.fastabend@intel.com \
--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).