Skip to content

Commit 4251ea5

Browse files
minimaxwelldavem330
authored andcommitted
net: mvpp2: use round-robin scheduling for TX queues on the same CPU
This commit allows each TXQ to be picked in a round-robin fashion by the PPv2 transmit scheduling mechanism. This is opposed to the default behaviour that prioritizes the highest numbered queues. Suggested-by: Yan Markman <ymarkman@marvell.com> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0d283ab commit 4251ea5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/net/ethernet/marvell/mvpp2/mvpp2.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@
331331
#define MVPP2_TXP_SCHED_ENQ_MASK 0xff
332332
#define MVPP2_TXP_SCHED_DISQ_OFFSET 8
333333
#define MVPP2_TXP_SCHED_CMD_1_REG 0x8010
334+
#define MVPP2_TXP_SCHED_FIXED_PRIO_REG 0x8014
334335
#define MVPP2_TXP_SCHED_PERIOD_REG 0x8018
335336
#define MVPP2_TXP_SCHED_MTU_REG 0x801c
336337
#define MVPP2_TXP_MTU_MAX 0x7FFFF

‎drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,9 @@ static void mvpp2_defaults_set(struct mvpp2_port *port)
14481448
tx_port_num);
14491449
mvpp2_write(port->priv, MVPP2_TXP_SCHED_CMD_1_REG, 0);
14501450

1451+
/* Set TXQ scheduling to Round-Robin */
1452+
mvpp2_write(port->priv, MVPP2_TXP_SCHED_FIXED_PRIO_REG, 0);
1453+
14511454
/* Close bandwidth for all queues */
14521455
for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) {
14531456
ptxq = mvpp2_txq_phys(port->id, queue);

0 commit comments

Comments
 (0)