]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: mvpp2: use round-robin scheduling for TX queues on the same CPU
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 24 Sep 2018 09:11:06 +0000 (11:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Sep 2018 17:01:10 +0000 (10:01 -0700)
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>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

index f5dceef60b0e561e3cc9405dcbf806b634633b22..176c6b56fdccda6bc65f9c78f2b29fa88c6ed867 100644 (file)
 #define     MVPP2_TXP_SCHED_ENQ_MASK           0xff
 #define     MVPP2_TXP_SCHED_DISQ_OFFSET                8
 #define MVPP2_TXP_SCHED_CMD_1_REG              0x8010
+#define MVPP2_TXP_SCHED_FIXED_PRIO_REG         0x8014
 #define MVPP2_TXP_SCHED_PERIOD_REG             0x8018
 #define MVPP2_TXP_SCHED_MTU_REG                        0x801c
 #define     MVPP2_TXP_MTU_MAX                  0x7FFFF
index bdacb957721630855b70d76d6df70711c7bfefa5..c2ed71788e4f10514c0303e7919f992e0588a57c 100644 (file)
@@ -1448,6 +1448,9 @@ static void mvpp2_defaults_set(struct mvpp2_port *port)
                    tx_port_num);
        mvpp2_write(port->priv, MVPP2_TXP_SCHED_CMD_1_REG, 0);
 
+       /* Set TXQ scheduling to Round-Robin */
+       mvpp2_write(port->priv, MVPP2_TXP_SCHED_FIXED_PRIO_REG, 0);
+
        /* Close bandwidth for all queues */
        for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) {
                ptxq = mvpp2_txq_phys(port->id, queue);