X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fnet%2Fsched%2Fsch_plug.c;fp=kernel%2Fnet%2Fsched%2Fsch_plug.c;h=5abfe44678d4a1ecda495bf9e00879c649c63cdb;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hp=89f8fcf73f18f6e091881cc829861285c0c8f8b7;hpb=f93b97fd65072de626c074dbe099a1fff05ce060;p=kvmfornfv.git diff --git a/kernel/net/sched/sch_plug.c b/kernel/net/sched/sch_plug.c index 89f8fcf73..5abfe4467 100644 --- a/kernel/net/sched/sch_plug.c +++ b/kernel/net/sched/sch_plug.c @@ -130,12 +130,8 @@ static int plug_init(struct Qdisc *sch, struct nlattr *opt) q->unplug_indefinite = false; if (opt == NULL) { - /* We will set a default limit of 100 pkts (~150kB) - * in case tx_queue_len is not available. The - * default value is completely arbitrary. - */ - u32 pkt_limit = qdisc_dev(sch)->tx_queue_len ? : 100; - q->limit = pkt_limit * psched_mtu(qdisc_dev(sch)); + q->limit = qdisc_dev(sch)->tx_queue_len + * psched_mtu(qdisc_dev(sch)); } else { struct tc_plug_qopt *ctl = nla_data(opt); @@ -216,6 +212,7 @@ static struct Qdisc_ops plug_qdisc_ops __read_mostly = { .peek = qdisc_peek_head, .init = plug_init, .change = plug_change, + .reset = qdisc_reset_queue, .owner = THIS_MODULE, };