summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2016-02-26 12:00:03 +0300
committerDavid S. Miller <davem@davemloft.net>2016-03-01 23:37:01 +0300
commitdfc9c94a83909f4be80e5d0c67e79793830aa312 (patch)
treee1aac9ac68c08a8f5ff6aa9ed4d6fdade6a537f7 /drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
parentbb053f52a54d66a6057c2220458349f7d39ce0d2 (diff)
downloadlinux-dfc9c94a83909f4be80e5d0c67e79793830aa312.tar.xz
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 <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c10
1 files changed, 10 insertions, 0 deletions
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);