[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small bug in the ingress qdisc?



jamal wrote:
> It is an acceptable patch. Thanks.

I'd rather leave the assignment in unconditionally. Reasons:
 - skb->tc_index is always there if we have CONFIG_NET_SCHED
 - there may be uses of skb->tc_index even without cls_tcindex
   (example: you could go directly from sch_dsmask to sch_gred)

However, it seems to me that there could be a similar problem in
net/sched/sch_generic.c

Untested patch for both problems for 2.4.0-test3-pre5 attached.

- Werner

---------------------------------- cut here -----------------------------------

--- ref/net/sched/sch_generic.c	Wed May  3 01:48:16 2000
+++ work/net/sched/sch_generic.c	Fri Jul  7 23:45:07 2000
@@ -506,7 +506,7 @@ void dev_shutdown(struct net_device *dev
 	dev->qdisc = &noop_qdisc;
 	dev->qdisc_sleeping = &noop_qdisc;
 	qdisc_destroy(qdisc);
-#ifdef CONFIG_NET_SCH_INGRESS
+#if defined(CONFIG_NET_SCH_INGRESS) || defined(CONFIG_NET_SCH_INGRESS_MODULE)
         if ((qdisc = dev->qdisc_ingress) != NULL) {
 		dev->qdisc_ingress = NULL;
 		qdisc_destroy(qdisc);
--- ref/net/sched/sch_ingress.c	Fri Mar 17 19:56:20 2000
+++ work/net/sched/sch_ingress.c	Fri Jul  7 23:52:22 2000
@@ -157,9 +157,7 @@ static int ingress_enqueue(struct sk_buf
 #endif
 	};
 
-#ifdef CONFIG_NET_CLS_TCINDEX
-         skb->tc_index = TC_H_MIN(res.classid);
-#endif
+	skb->tc_index = TC_H_MIN(res.classid);
 	return result;
 }
 
-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/