]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i40e: clean up throttle rate code
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Sat, 25 Oct 2014 03:24:32 +0000 (03:24 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 11 Nov 2014 14:01:48 +0000 (06:01 -0800)
The interrupt throttle rate minimum is actually 2us, so
fix that define and while we are there, remove some unused defines.

Change some strings in the function to be a bit less wrappy, and
express the correct limits.

Change-ID: I96829bbc77935e0b57c6f0fc1439fb4152b2960a
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Patrick Lu <patrick.lu@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_txrx.h
drivers/net/ethernet/intel/i40evf/i40e_txrx.h

index b6e745f277cc09be93eb6cf1060fefcab71d5557..afad5aa5a12b5efc4ac392940044242215f4473a 100644 (file)
@@ -1575,11 +1575,9 @@ static int i40e_set_coalesce(struct net_device *netdev,
        } else if (ec->rx_coalesce_usecs == 0) {
                vsi->rx_itr_setting = ec->rx_coalesce_usecs;
                if (ec->use_adaptive_rx_coalesce)
        } else if (ec->rx_coalesce_usecs == 0) {
                vsi->rx_itr_setting = ec->rx_coalesce_usecs;
                if (ec->use_adaptive_rx_coalesce)
-                       netif_info(pf, drv, netdev,
-                                  "Rx-secs=0, need to disable adaptive-Rx for a complete disable\n");
+                       netif_info(pf, drv, netdev, "rx-usecs=0, need to disable adaptive-rx for a complete disable\n");
        } else {
        } else {
-               netif_info(pf, drv, netdev,
-                          "Invalid value, Rx-usecs range is 0, 8-8160\n");
+               netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n");
                return -EINVAL;
        }
 
                return -EINVAL;
        }
 
@@ -1589,11 +1587,10 @@ static int i40e_set_coalesce(struct net_device *netdev,
        } else if (ec->tx_coalesce_usecs == 0) {
                vsi->tx_itr_setting = ec->tx_coalesce_usecs;
                if (ec->use_adaptive_tx_coalesce)
        } else if (ec->tx_coalesce_usecs == 0) {
                vsi->tx_itr_setting = ec->tx_coalesce_usecs;
                if (ec->use_adaptive_tx_coalesce)
-                       netif_info(pf, drv, netdev,
-                                  "Tx-secs=0, need to disable adaptive-Tx for a complete disable\n");
+                       netif_info(pf, drv, netdev, "tx-usecs=0, need to disable adaptive-tx for a complete disable\n");
        } else {
                netif_info(pf, drv, netdev,
        } else {
                netif_info(pf, drv, netdev,
-                          "Invalid value, Tx-usecs range is 0, 8-8160\n");
+                          "Invalid value, tx-usecs range is 0-8160\n");
                return -EINVAL;
        }
 
                return -EINVAL;
        }
 
index d7a625a6a14f54fa1b79456df9de7d14f9ff1809..e60d3accb2e2ec3f2992b056da718d633b978157 100644 (file)
 /* Interrupt Throttling and Rate Limiting Goodies */
 
 #define I40E_MAX_ITR               0x0FF0  /* reg uses 2 usec resolution */
 /* Interrupt Throttling and Rate Limiting Goodies */
 
 #define I40E_MAX_ITR               0x0FF0  /* reg uses 2 usec resolution */
-#define I40E_MIN_ITR               0x0004  /* reg uses 2 usec resolution */
-#define I40E_MAX_IRATE             0x03F
-#define I40E_MIN_IRATE             0x001
-#define I40E_IRATE_USEC_RESOLUTION 4
+#define I40E_MIN_ITR               0x0001  /* reg uses 2 usec resolution */
 #define I40E_ITR_100K              0x0005
 #define I40E_ITR_20K               0x0019
 #define I40E_ITR_8K                0x003E
 #define I40E_ITR_100K              0x0005
 #define I40E_ITR_20K               0x0019
 #define I40E_ITR_8K                0x003E
index f6dcf9dd9290d95554c7505f4bbd9f5832185597..c7f29626eada77ea577dadcf9cf8d23ffef0fe69 100644 (file)
 /* Interrupt Throttling and Rate Limiting Goodies */
 
 #define I40E_MAX_ITR               0x0FF0  /* reg uses 2 usec resolution */
 /* Interrupt Throttling and Rate Limiting Goodies */
 
 #define I40E_MAX_ITR               0x0FF0  /* reg uses 2 usec resolution */
-#define I40E_MIN_ITR               0x0004  /* reg uses 2 usec resolution */
-#define I40E_MAX_IRATE             0x03F
-#define I40E_MIN_IRATE             0x001
-#define I40E_IRATE_USEC_RESOLUTION 4
+#define I40E_MIN_ITR               0x0001  /* reg uses 2 usec resolution */
 #define I40E_ITR_100K              0x0005
 #define I40E_ITR_20K               0x0019
 #define I40E_ITR_8K                0x003E
 #define I40E_ITR_100K              0x0005
 #define I40E_ITR_20K               0x0019
 #define I40E_ITR_8K                0x003E