Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210262
b: refs/heads/master
c: 0f04cfd
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and David S. Miller committed Sep 1, 2010
1 parent 954140d commit 9cfff68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78b620ce9e168d08ecfac2f4bb056c511b0601ec
refs/heads/master: 0f04cfd098fb81fded74e78ea1a1b86cc6c6c31e
21 changes: 9 additions & 12 deletions trunk/net/sched/act_police.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,22 +350,19 @@ tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
{
unsigned char *b = skb_tail_pointer(skb);
struct tcf_police *police = a->priv;
struct tc_police opt;

opt.index = police->tcf_index;
opt.action = police->tcf_action;
opt.mtu = police->tcfp_mtu;
opt.burst = police->tcfp_burst;
opt.refcnt = police->tcf_refcnt - ref;
opt.bindcnt = police->tcf_bindcnt - bind;
struct tc_police opt = {
.index = police->tcf_index,
.action = police->tcf_action,
.mtu = police->tcfp_mtu,
.burst = police->tcfp_burst,
.refcnt = police->tcf_refcnt - ref,
.bindcnt = police->tcf_bindcnt - bind,
};

if (police->tcfp_R_tab)
opt.rate = police->tcfp_R_tab->rate;
else
memset(&opt.rate, 0, sizeof(opt.rate));
if (police->tcfp_P_tab)
opt.peakrate = police->tcfp_P_tab->rate;
else
memset(&opt.peakrate, 0, sizeof(opt.peakrate));
NLA_PUT(skb, TCA_POLICE_TBF, sizeof(opt), &opt);
if (police->tcfp_result)
NLA_PUT_U32(skb, TCA_POLICE_RESULT, police->tcfp_result);
Expand Down

0 comments on commit 9cfff68

Please sign in to comment.