Thread (44 messages) 44 messages, 6 authors, 2008-08-19

Re: [PATCH] net_sched: Add qdisc __NET_XMIT_STOLEN flag

From: Patrick McHardy <hidden>
Date: 2008-08-01 06:15:53

Jarek Poplawski wrote:
Hi,

Here is a complete, I hope,  version of the patch to not linger this
all to much, but of course any redoing is possible.
This looks good to me. Just one suggestion:
quoted hunk ↗ jump to hunk
+#ifdef CONFIG_NET_CLS_ACT
+/* additional qdisc xmit flags */
+enum net_xmit_qdisc_t {
+	__NET_XMIT_STOLEN = NET_XMIT_MASK + 1,
+};
+
+#define net_xmit_drop_count(e)	((e) & __NET_XMIT_STOLEN ? 0 : 1)
+
+#else
+#define net_xmit_drop_count(e)	(1)
+#endif
+
 static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
 #ifdef CONFIG_NET_SCHED
@@ -343,7 +355,7 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch)
 {
 	qdisc_skb_cb(skb)->pkt_len = skb->len;
-	return qdisc_enqueue(skb, sch);
+	return qdisc_enqueue(skb, sch) & NET_XMIT_MASK;
It would be nice to handle NET_XMIT_BYPASS similar, currently its
mapped to NET_XMIT_SUCCESS by dev_queue_xmit(). Simply adding it
to net_xmit_qdisc_t as

__NET_XMIT_BYPASS = NET_XMIT_MASK + 0x2

and removing the mapping from dev_queue_xmit() should work I think.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help