From dfc9c94a83909f4be80e5d0c67e79793830aa312 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Fri, 26 Feb 2016 04:00:03 -0500 Subject: bnxt_en: Add coalescing support for tx rings. When tx and rx rings don't share the same completion ring, tx coalescing parameters can be set differently from the rx coalescing parameters. Otherwise, use rx coalescing parameters on shared completion rings. Adjust rx coalescing default values to lower interrupt rate. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c') diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index d18a97727394..a2d25499a73c 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -47,6 +47,11 @@ static int bnxt_get_coalesce(struct net_device *dev, coal->rx_coalesce_usecs_irq = bp->rx_coal_ticks_irq; coal->rx_max_coalesced_frames_irq = bp->rx_coal_bufs_irq / 2; + coal->tx_coalesce_usecs = bp->tx_coal_ticks; + coal->tx_max_coalesced_frames = bp->tx_coal_bufs; + coal->tx_coalesce_usecs_irq = bp->tx_coal_ticks_irq; + coal->tx_max_coalesced_frames_irq = bp->tx_coal_bufs_irq; + return 0; } @@ -62,6 +67,11 @@ static int bnxt_set_coalesce(struct net_device *dev, bp->rx_coal_ticks_irq = coal->rx_coalesce_usecs_irq; bp->rx_coal_bufs_irq = coal->rx_max_coalesced_frames_irq * 2; + bp->tx_coal_ticks = coal->tx_coalesce_usecs; + bp->tx_coal_bufs = coal->tx_max_coalesced_frames; + bp->tx_coal_ticks_irq = coal->tx_coalesce_usecs_irq; + bp->tx_coal_bufs_irq = coal->tx_max_coalesced_frames_irq; + if (netif_running(dev)) rc = bnxt_hwrm_set_coal(bp); -- cgit v1.2.3