Skip to content

Commit 4516c87

Browse files
zhengchaoshaokuba-moo
authored andcommitted
net: sched: gred/red: remove unused variables in struct red_stats
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>
1 parent 38af117 commit 4516c87

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

include/net/red.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ struct red_stats {
122122
u32 forced_drop; /* Forced drops, qavg > max_thresh */
123123
u32 forced_mark; /* Forced marks, qavg > max_thresh */
124124
u32 pdrop; /* Drops due to queue limits */
125-
u32 other; /* Drops due to drop() calls */
126125
};
127126

128127
struct red_parms {

net/sched/sch_gred.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
829829
opt.Wlog = q->parms.Wlog;
830830
opt.Plog = q->parms.Plog;
831831
opt.Scell_log = q->parms.Scell_log;
832-
opt.other = q->stats.other;
833832
opt.early = q->stats.prob_drop;
834833
opt.forced = q->stats.forced_drop;
835834
opt.pdrop = q->stats.pdrop;
@@ -895,8 +894,6 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
895894
goto nla_put_failure;
896895
if (nla_put_u32(skb, TCA_GRED_VQ_STAT_PDROP, q->stats.pdrop))
897896
goto nla_put_failure;
898-
if (nla_put_u32(skb, TCA_GRED_VQ_STAT_OTHER, q->stats.other))
899-
goto nla_put_failure;
900897

901898
nla_nest_end(skb, vq);
902899
}

net/sched/sch_red.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
461461
}
462462
st.early = q->stats.prob_drop + q->stats.forced_drop;
463463
st.pdrop = q->stats.pdrop;
464-
st.other = q->stats.other;
465464
st.marked = q->stats.prob_mark + q->stats.forced_mark;
466465

467466
return gnet_stats_copy_app(d, &st, sizeof(st));

0 commit comments

Comments
 (0)