Skip to content

Commit

Permalink
net: ti: prueth: switch uses 4 egress queues
Browse files Browse the repository at this point in the history
In current version of switch firmware, host uses 4 egress queues
instead of 2.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
  • Loading branch information
wingmankwok committed Dec 17, 2019
1 parent 32c264e commit b1da5ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/ethernet/ti/prueth.c
Original file line number Diff line number Diff line change
Expand Up @@ -4558,10 +4558,11 @@ static u16 prueth_get_tx_queue_id(struct prueth *prueth, struct sk_buff *skb)
pcp = 0;
else
pcp = (vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
/* For switch, we use only QUEUE4 and QUEUE3 at the egress. QUEUE2 and
* QUEUE1 are used for port to port traffic
/* For HSR/PRP, we use only QUEUE4 and QUEUE3 at the egress. QUEUE2 and
* QUEUE1 are used for port to port traffic. Current version of SWITCH
* firmware uses 4 egress queues.
*/
if (PRUETH_HAS_SWITCH(prueth))
if (PRUETH_HAS_RED(prueth))
pcp >>= 1;

return emac_pcp_tx_priority_queue_map[pcp];
Expand Down

0 comments on commit b1da5ce

Please sign in to comment.