Skip to content

Commit b326ce5

Browse files
Phil Elwellpopcornmix
authored andcommitted
bcmgenet: Better coalescing parameter defaults
Set defaults for TX and RX packet coalescing to be equivalent to: # ethtool -C eth0 tx-frames 10 # ethtool -C eth0 rx-usecs 50 This may be something we want to set via DT parameters in the future. Signed-off-by: Phil Elwell <[email protected]>
1 parent cb3e53f commit b326ce5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,7 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_priv *priv,
26642664

26652665
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
26662666
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
2667-
bcmgenet_tdma_ring_writel(priv, index, 1, DMA_MBUF_DONE_THRESH);
2667+
bcmgenet_tdma_ring_writel(priv, index, 10, DMA_MBUF_DONE_THRESH);
26682668
/* Disable rate control for now */
26692669
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
26702670
TDMA_FLOW_PERIOD);
@@ -4139,9 +4139,12 @@ static int bcmgenet_probe(struct platform_device *pdev)
41394139
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
41404140

41414141
/* Set default coalescing parameters */
4142-
for (i = 0; i < priv->hw_params->rx_queues; i++)
4142+
for (i = 0; i < priv->hw_params->rx_queues; i++) {
41434143
priv->rx_rings[i].rx_max_coalesced_frames = 1;
4144+
priv->rx_rings[i].rx_coalesce_usecs = 50;
4145+
}
41444146
priv->rx_rings[DESC_INDEX].rx_max_coalesced_frames = 1;
4147+
priv->rx_rings[DESC_INDEX].rx_coalesce_usecs = 50;
41454148

41464149
/* libphy will determine the link state */
41474150
netif_carrier_off(dev);

0 commit comments

Comments
 (0)