Commit 9f5e508b authored by David S. Miller's avatar David S. Miller

Merge branch 'ena-fixes-of-interrupt-moderation-bugs'

Arthur Kiyanovski says:

====================
ena: fixes of interrupt moderation bugs

Differences from V1:
1. Updated default tx interrupt moderation to 64us
2. Added "Fixes:" tags.
3. Removed cosmetic changes that are not relevant for these bug fixes

This patchset includes a couple of fixes of bugs in the implemenation of
interrupt moderation.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 28a3b840 41c53caa
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
/*****************************************************************************/ /*****************************************************************************/
/* ENA adaptive interrupt moderation settings */ /* ENA adaptive interrupt moderation settings */
#define ENA_INTR_INITIAL_TX_INTERVAL_USECS 196 #define ENA_INTR_INITIAL_TX_INTERVAL_USECS 64
#define ENA_INTR_INITIAL_RX_INTERVAL_USECS 0 #define ENA_INTR_INITIAL_RX_INTERVAL_USECS 0
#define ENA_DEFAULT_INTR_DELAY_RESOLUTION 1 #define ENA_DEFAULT_INTR_DELAY_RESOLUTION 1
......
...@@ -315,10 +315,9 @@ static int ena_get_coalesce(struct net_device *net_dev, ...@@ -315,10 +315,9 @@ static int ena_get_coalesce(struct net_device *net_dev,
ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) * ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) *
ena_dev->intr_delay_resolution; ena_dev->intr_delay_resolution;
if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) coalesce->rx_coalesce_usecs =
coalesce->rx_coalesce_usecs = ena_com_get_nonadaptive_moderation_interval_rx(ena_dev)
ena_com_get_nonadaptive_moderation_interval_rx(ena_dev) * ena_dev->intr_delay_resolution;
* ena_dev->intr_delay_resolution;
coalesce->use_adaptive_rx_coalesce = coalesce->use_adaptive_rx_coalesce =
ena_com_get_adaptive_moderation_enabled(ena_dev); ena_com_get_adaptive_moderation_enabled(ena_dev);
...@@ -367,12 +366,6 @@ static int ena_set_coalesce(struct net_device *net_dev, ...@@ -367,12 +366,6 @@ static int ena_set_coalesce(struct net_device *net_dev,
ena_update_tx_rings_intr_moderation(adapter); ena_update_tx_rings_intr_moderation(adapter);
if (coalesce->use_adaptive_rx_coalesce) {
if (!ena_com_get_adaptive_moderation_enabled(ena_dev))
ena_com_enable_adaptive_moderation(ena_dev);
return 0;
}
rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev, rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev,
coalesce->rx_coalesce_usecs); coalesce->rx_coalesce_usecs);
if (rc) if (rc)
...@@ -380,10 +373,13 @@ static int ena_set_coalesce(struct net_device *net_dev, ...@@ -380,10 +373,13 @@ static int ena_set_coalesce(struct net_device *net_dev,
ena_update_rx_rings_intr_moderation(adapter); ena_update_rx_rings_intr_moderation(adapter);
if (!coalesce->use_adaptive_rx_coalesce) { if (coalesce->use_adaptive_rx_coalesce &&
if (ena_com_get_adaptive_moderation_enabled(ena_dev)) !ena_com_get_adaptive_moderation_enabled(ena_dev))
ena_com_disable_adaptive_moderation(ena_dev); ena_com_enable_adaptive_moderation(ena_dev);
}
if (!coalesce->use_adaptive_rx_coalesce &&
ena_com_get_adaptive_moderation_enabled(ena_dev))
ena_com_disable_adaptive_moderation(ena_dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment