Skip to content

Commit 7c29451

Browse files
stefanchulskidavem330
authored andcommitted
net: mvpp2: reduce tx-fifo for loopback port
1KB is enough for loopback port, so 2KB can be distributed between other ports. Signed-off-by: Stefan Chulski <stefanc@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8841f6e commit 7c29451

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,9 @@
763763
#define MVPP2_RX_FIFO_PORT_MIN_PKT 0x80
764764

765765
/* TX FIFO constants */
766-
#define MVPP22_TX_FIFO_DATA_SIZE_16KB 16
766+
#define MVPP22_TX_FIFO_DATA_SIZE_18KB 18
767767
#define MVPP22_TX_FIFO_DATA_SIZE_10KB 10
768-
#define MVPP22_TX_FIFO_DATA_SIZE_3KB 3
768+
#define MVPP22_TX_FIFO_DATA_SIZE_1KB 1
769769
#define MVPP2_TX_FIFO_THRESHOLD_MIN 256 /* Bytes */
770770
#define MVPP2_TX_FIFO_THRESHOLD(kb) \
771771
((kb) * 1024 - MVPP2_TX_FIFO_THRESHOLD_MIN)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7093,8 +7093,8 @@ static void mvpp22_tx_fifo_set_hw(struct mvpp2 *priv, int port, int size)
70937093
}
70947094

70957095
/* Initialize TX FIFO's: the total FIFO size is 19kB on PPv2.2 and PPv2.3.
7096-
* 3kB fixed space must be assigned for the loopback port.
7097-
* Redistribute remaining avialable 16kB space among all active ports.
7096+
* 1kB fixed space must be assigned for the loopback port.
7097+
* Redistribute remaining avialable 18kB space among all active ports.
70987098
* The 10G interface should use 10kB (which is maximum possible size
70997099
* per single port).
71007100
*/
@@ -7105,17 +7105,17 @@ static void mvpp22_tx_fifo_init(struct mvpp2 *priv)
71057105
int size_remainder;
71067106
int port, size;
71077107

7108-
/* The loopback requires fixed 3kB of the FIFO space assignment. */
7108+
/* The loopback requires fixed 1kB of the FIFO space assignment. */
71097109
mvpp22_tx_fifo_set_hw(priv, MVPP2_LOOPBACK_PORT_INDEX,
7110-
MVPP22_TX_FIFO_DATA_SIZE_3KB);
7110+
MVPP22_TX_FIFO_DATA_SIZE_1KB);
71117111
port_map = priv->port_map & ~BIT(MVPP2_LOOPBACK_PORT_INDEX);
71127112

71137113
/* Set TX FIFO size to 0 for inactive ports. */
71147114
for_each_clear_bit(port, &port_map, MVPP2_LOOPBACK_PORT_INDEX)
71157115
mvpp22_tx_fifo_set_hw(priv, port, 0);
71167116

71177117
/* Assign remaining TX FIFO space among all active ports. */
7118-
size_remainder = MVPP22_TX_FIFO_DATA_SIZE_16KB;
7118+
size_remainder = MVPP22_TX_FIFO_DATA_SIZE_18KB;
71197119
remaining_ports_count = hweight_long(port_map);
71207120

71217121
for_each_set_bit(port, &port_map, MVPP2_LOOPBACK_PORT_INDEX) {

0 commit comments

Comments
 (0)