if (delay_skb(sch, skb2)) { 
if (netem_delay(sch, skb2)) { 
static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch){	struct netem_sched_data *q = qdisc_priv(sch);	struct sk_buff *skb2;	int ret;	pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies);	/* Random packet drop 0 => none, ~0 => all */	if (q->loss && q->loss >= get_crandom(&q->loss_cor)) {		pr_debug("netem_enqueue: random loss\n");		sch->qstats.drops++;		kfree_skb(skb);		return 0;	/* lie about loss so TCP doesn't know */	}	/* Random duplication */	if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)	    && (skb2 = skb_clone(skb, GFP_ATOMIC)) != NULL) {		pr_debug("netem_enqueue: dup %p\n", skb2);		if (delay_skb(sch, skb2)) {			sch->q.qlen++;			sch->bstats.bytes += skb2->len;			sch->bstats.packets++;		} else			sch->qstats.drops++;	}	/* If doing simple delay then gap == 0 so all packets	 * go into the delayed holding queue	 * otherwise if doing out of order only "1 out of gap"	 * packets will be delayed.	 */	if (q->counter < q->gap) {		++q->counter;		ret = q->qdisc->enqueue(skb, q->qdisc);	} else {		q->counter = 0;		ret = delay_skb(sch, skb);	}	if (likely(ret == NET_XMIT_SUCCESS)) {		sch->q.qlen++;		sch->bstats.bytes += skb->len;		sch->bstats.packets++;	} else		sch->qstats.drops++;	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/771018e76aaa6474be20a53c20458bcae8b00485/sch_netem.c/buggy/net/sched/sch_netem.c