Commit 0a5f14ce67a6e093e651d3cd75e6ac281123d93a
Committed by
David S. Miller
1 parent
60724d4bae
net: dsa: tag_brcm: Indicate to master netdevice port + queue
We need to tell the DSA master network device doing the actual transmission what the desired switch port and queue number is for it to resolve that to the internal transmit queue it is mapped to. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 11 additions and 0 deletions Side-by-side Diff
include/net/dsa.h
... | ... | @@ -516,5 +516,10 @@ |
516 | 516 | } |
517 | 517 | #endif |
518 | 518 | |
519 | +/* Broadcom tag specific helpers to insert and extract queue/port number */ | |
520 | +#define BRCM_TAG_SET_PORT_QUEUE(p, q) ((p) << 8 | q) | |
521 | +#define BRCM_TAG_GET_PORT(v) ((v) >> 8) | |
522 | +#define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff) | |
523 | + | |
519 | 524 | #endif |
net/dsa/tag_brcm.c
... | ... | @@ -86,6 +86,12 @@ |
86 | 86 | brcm_tag[2] = BRCM_IG_DSTMAP2_MASK; |
87 | 87 | brcm_tag[3] = (1 << p->dp->index) & BRCM_IG_DSTMAP1_MASK; |
88 | 88 | |
89 | + /* Now tell the master network device about the desired output queue | |
90 | + * as well | |
91 | + */ | |
92 | + skb_set_queue_mapping(skb, BRCM_TAG_SET_PORT_QUEUE(p->dp->index, | |
93 | + queue)); | |
94 | + | |
89 | 95 | return skb; |
90 | 96 | } |
91 | 97 |