Thread (4 messages) 4 messages, 3 authors, 2013-09-30

Re: [PATCH v1 net-next] net: pkt_sched: PIE AQM scheme

From: Eric Dumazet <hidden>
Date: 2013-09-28 17:03:44

On Fri, 2013-09-27 at 18:56 -0700, Vijay Subramanian wrote:
+static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+{
+	struct pie_sched_data *q = qdisc_priv(sch);
+
+	if (unlikely(qdisc_qlen(sch) >= sch->limit))
+		goto out;
+
...
+out:
+	q->stats.overlimit++;
+	qdisc_drop(skb, sch);
+	return NET_XMIT_CN;  /*indicate congestion*/
+}

If a Qdisc drops a packet because sch->limit is hit, you must :

return qdisc_drop(skb, sch);

So that NET_XMIT_DROP is returned, not NET_XMIT_CN.

This packet was dropped for sure.

vi +96 net/sched/sch_api.c

   ---enqueue

   enqueue returns 0, if packet was enqueued successfully.
   If packet (this one or another one) was dropped, it returns
   not zero error code.
   NET_XMIT_DROP        - this packet dropped
     Expected action: do not backoff, but wait until queue will clear.
   NET_XMIT_CN          - probably this packet enqueued, but another one dropped.
     Expected action: backoff or ignore
   NET_XMIT_POLICED     - dropped by police.
     Expected action: backoff or error to real-time apps.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help