On Fri, Feb 18, 2011 at 11:06:12PM +0000, Ben Hutchings wrote:
On Fri, 2011-02-18 at 17:49 -0500, Andy Gospodarek wrote:
quoted
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2194,6 +2194,21 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb)
return skb->queue_mapping != 0;
}
+static inline void skb_record_tx_queue(struct sk_buff *skb, u16 tx_queue)
+{
+ skb->queue_mapping = tx_queue + 1;
+}
+
+static inline u16 skb_get_tx_queue(const struct sk_buff *skb)
+{
+ return skb->queue_mapping - 1;
+}
+
+static inline bool skb_tx_queue_recorded(const struct sk_buff *skb)
+{
+ return skb->queue_mapping != 0;
+}
+
[...]
This is nonsense. After the TX queue has been selected, it's recorded
in queue_mapping *without* the offset (skb_set_queue_mapping()).
I see that now. Yay for symmetry! :)
I'm actually looking over this now and will post a tested patch to
address the original reporter's problem.