Skip to content

Commit

Permalink
net: sched: gred/red: remove unused variables in struct red_stats
Browse files Browse the repository at this point in the history
The variable "other" in the struct red_stats is not used. Remove it.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Zhengchao Shao authored and Jakub Kicinski committed Sep 1, 2022
1 parent 38af117 commit 4516c87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/net/red.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ struct red_stats {
u32 forced_drop; /* Forced drops, qavg > max_thresh */
u32 forced_mark; /* Forced marks, qavg > max_thresh */
u32 pdrop; /* Drops due to queue limits */
u32 other; /* Drops due to drop() calls */
};

struct red_parms {
Expand Down
3 changes: 0 additions & 3 deletions net/sched/sch_gred.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
opt.Wlog = q->parms.Wlog;
opt.Plog = q->parms.Plog;
opt.Scell_log = q->parms.Scell_log;
opt.other = q->stats.other;
opt.early = q->stats.prob_drop;
opt.forced = q->stats.forced_drop;
opt.pdrop = q->stats.pdrop;
Expand Down Expand Up @@ -895,8 +894,6 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
goto nla_put_failure;
if (nla_put_u32(skb, TCA_GRED_VQ_STAT_PDROP, q->stats.pdrop))
goto nla_put_failure;
if (nla_put_u32(skb, TCA_GRED_VQ_STAT_OTHER, q->stats.other))
goto nla_put_failure;

nla_nest_end(skb, vq);
}
Expand Down
1 change: 0 additions & 1 deletion net/sched/sch_red.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
}
st.early = q->stats.prob_drop + q->stats.forced_drop;
st.pdrop = q->stats.pdrop;
st.other = q->stats.other;
st.marked = q->stats.prob_mark + q->stats.forced_mark;

return gnet_stats_copy_app(d, &st, sizeof(st));
Expand Down

0 comments on commit 4516c87

Please sign in to comment.