Loading net/sched/sch_plug.c +8 −6 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ struct plug_sched_data { */ bool unplug_indefinite; bool throttled; /* Queue Limit in bytes */ u32 limit; Loading Loading @@ -103,7 +105,7 @@ static struct sk_buff *plug_dequeue(struct Qdisc *sch) { struct plug_sched_data *q = qdisc_priv(sch); if (qdisc_is_throttled(sch)) if (q->throttled) return NULL; if (!q->unplug_indefinite) { Loading @@ -111,7 +113,7 @@ static struct sk_buff *plug_dequeue(struct Qdisc *sch) /* No more packets to dequeue. Block the queue * and wait for the next release command. */ qdisc_throttled(sch); q->throttled = true; return NULL; } q->pkts_to_release--; Loading Loading @@ -141,7 +143,7 @@ static int plug_init(struct Qdisc *sch, struct nlattr *opt) q->limit = ctl->limit; } qdisc_throttled(sch); q->throttled = true; return 0; } Loading Loading @@ -173,7 +175,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) q->pkts_last_epoch = q->pkts_current_epoch; q->pkts_current_epoch = 0; if (q->unplug_indefinite) qdisc_throttled(sch); q->throttled = true; q->unplug_indefinite = false; break; case TCQ_PLUG_RELEASE_ONE: Loading @@ -182,7 +184,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) */ q->pkts_to_release += q->pkts_last_epoch; q->pkts_last_epoch = 0; qdisc_unthrottled(sch); q->throttled = false; netif_schedule_queue(sch->dev_queue); break; case TCQ_PLUG_RELEASE_INDEFINITE: Loading @@ -190,7 +192,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) q->pkts_to_release = 0; q->pkts_last_epoch = 0; q->pkts_current_epoch = 0; qdisc_unthrottled(sch); q->throttled = false; netif_schedule_queue(sch->dev_queue); break; case TCQ_PLUG_LIMIT: Loading Loading
net/sched/sch_plug.c +8 −6 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ struct plug_sched_data { */ bool unplug_indefinite; bool throttled; /* Queue Limit in bytes */ u32 limit; Loading Loading @@ -103,7 +105,7 @@ static struct sk_buff *plug_dequeue(struct Qdisc *sch) { struct plug_sched_data *q = qdisc_priv(sch); if (qdisc_is_throttled(sch)) if (q->throttled) return NULL; if (!q->unplug_indefinite) { Loading @@ -111,7 +113,7 @@ static struct sk_buff *plug_dequeue(struct Qdisc *sch) /* No more packets to dequeue. Block the queue * and wait for the next release command. */ qdisc_throttled(sch); q->throttled = true; return NULL; } q->pkts_to_release--; Loading Loading @@ -141,7 +143,7 @@ static int plug_init(struct Qdisc *sch, struct nlattr *opt) q->limit = ctl->limit; } qdisc_throttled(sch); q->throttled = true; return 0; } Loading Loading @@ -173,7 +175,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) q->pkts_last_epoch = q->pkts_current_epoch; q->pkts_current_epoch = 0; if (q->unplug_indefinite) qdisc_throttled(sch); q->throttled = true; q->unplug_indefinite = false; break; case TCQ_PLUG_RELEASE_ONE: Loading @@ -182,7 +184,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) */ q->pkts_to_release += q->pkts_last_epoch; q->pkts_last_epoch = 0; qdisc_unthrottled(sch); q->throttled = false; netif_schedule_queue(sch->dev_queue); break; case TCQ_PLUG_RELEASE_INDEFINITE: Loading @@ -190,7 +192,7 @@ static int plug_change(struct Qdisc *sch, struct nlattr *opt) q->pkts_to_release = 0; q->pkts_last_epoch = 0; q->pkts_current_epoch = 0; qdisc_unthrottled(sch); q->throttled = false; netif_schedule_queue(sch->dev_queue); break; case TCQ_PLUG_LIMIT: Loading