Thread (6 messages) flat view 6 messages, 4 authors, 2011-02-21

Re: [PATCH] bonding: bond_select_queue off by one

From: Andy Gospodarek <andy@greyhouse.net>
Date: 2011-02-21 18:13:52

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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help