All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] sch_netem: replace magic numbers with enumerate in get_loss_clg
@ 2014-02-17  8:48 Yang Yingliang
  2014-02-17 21:56 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2014-02-17  8:48 UTC (permalink / raw)
  To: netdev; +Cc: davem, stephen

Replace two magic numbers which intialize clgstate::state.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/sched/sch_netem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 4fced67..f1669a00 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -752,7 +752,7 @@ static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr)
 
 			q->loss_model = CLG_4_STATES;
 
-			q->clg.state = 1;
+			q->clg.state = TX_IN_GAP_PERIOD;
 			q->clg.a1 = gi->p13;
 			q->clg.a2 = gi->p31;
 			q->clg.a3 = gi->p32;
@@ -770,7 +770,7 @@ static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr)
 			}
 
 			q->loss_model = CLG_GILB_ELL;
-			q->clg.state = 1;
+			q->clg.state = GOOD_STATE;
 			q->clg.a1 = ge->p;
 			q->clg.a2 = ge->r;
 			q->clg.a3 = ge->h;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] sch_netem: replace magic numbers with enumerate in get_loss_clg
  2014-02-17  8:48 [PATCH net-next] sch_netem: replace magic numbers with enumerate in get_loss_clg Yang Yingliang
@ 2014-02-17 21:56 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-02-17 21:56 UTC (permalink / raw)
  To: yangyingliang; +Cc: netdev, stephen

From: Yang Yingliang <yangyingliang@huawei.com>
Date: Mon, 17 Feb 2014 16:48:21 +0800

> Replace two magic numbers which intialize clgstate::state.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-17 21:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17  8:48 [PATCH net-next] sch_netem: replace magic numbers with enumerate in get_loss_clg Yang Yingliang
2014-02-17 21:56 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.