aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:16:38 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:16:38 -0500
commitc1605eb37aa658b810a5a7080412d656ddce2f76 (patch)
treec91f8a06afd19cf67cba40f687d4f662f79d8055 /drivers/net/e1000/e1000_ethtool.c
parent2ade43618b0aee83a50b344171d33d85c73d01b1 (diff)
e1000: Remove Multiqueue code until we have support for MSI-X in our hardware
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 5cedc81786e3..c7b47911f003 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -97,14 +97,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
97 { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, 97 { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) },
98}; 98};
99 99
100#ifdef CONFIG_E1000_MQ
101#define E1000_QUEUE_STATS_LEN \
102 (((struct e1000_adapter *)netdev->priv)->num_tx_queues + \
103 ((struct e1000_adapter *)netdev->priv)->num_rx_queues) \
104 * (sizeof(struct e1000_queue_stats) / sizeof(uint64_t))
105#else
106#define E1000_QUEUE_STATS_LEN 0 100#define E1000_QUEUE_STATS_LEN 0
107#endif
108#define E1000_GLOBAL_STATS_LEN \ 101#define E1000_GLOBAL_STATS_LEN \
109 sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) 102 sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats)
110#define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN + E1000_QUEUE_STATS_LEN) 103#define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN + E1000_QUEUE_STATS_LEN)
@@ -1799,11 +1792,6 @@ e1000_get_ethtool_stats(struct net_device *netdev,
1799 struct ethtool_stats *stats, uint64_t *data) 1792 struct ethtool_stats *stats, uint64_t *data)
1800{ 1793{
1801 struct e1000_adapter *adapter = netdev_priv(netdev); 1794 struct e1000_adapter *adapter = netdev_priv(netdev);
1802#ifdef CONFIG_E1000_MQ
1803 uint64_t *queue_stat;
1804 int stat_count = sizeof(struct e1000_queue_stats) / sizeof(uint64_t);
1805 int j, k;
1806#endif
1807 int i; 1795 int i;
1808 1796
1809 e1000_update_stats(adapter); 1797 e1000_update_stats(adapter);
@@ -1812,29 +1800,12 @@ e1000_get_ethtool_stats(struct net_device *netdev,
1812 data[i] = (e1000_gstrings_stats[i].sizeof_stat == 1800 data[i] = (e1000_gstrings_stats[i].sizeof_stat ==
1813 sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; 1801 sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
1814 } 1802 }
1815#ifdef CONFIG_E1000_MQ
1816 for (j = 0; j < adapter->num_tx_queues; j++) {
1817 queue_stat = (uint64_t *)&adapter->tx_ring[j].tx_stats;
1818 for (k = 0; k < stat_count; k++)
1819 data[i + k] = queue_stat[k];
1820 i += k;
1821 }
1822 for (j = 0; j < adapter->num_rx_queues; j++) {
1823 queue_stat = (uint64_t *)&adapter->rx_ring[j].rx_stats;
1824 for (k = 0; k < stat_count; k++)
1825 data[i + k] = queue_stat[k];
1826 i += k;
1827 }
1828#endif
1829/* BUG_ON(i != E1000_STATS_LEN); */ 1803/* BUG_ON(i != E1000_STATS_LEN); */
1830} 1804}
1831 1805
1832static void 1806static void
1833e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) 1807e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data)
1834{ 1808{
1835#ifdef CONFIG_E1000_MQ
1836 struct e1000_adapter *adapter = netdev_priv(netdev);
1837#endif
1838 uint8_t *p = data; 1809 uint8_t *p = data;
1839 int i; 1810 int i;
1840 1811
@@ -1849,20 +1820,6 @@ e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data)
1849 ETH_GSTRING_LEN); 1820 ETH_GSTRING_LEN);
1850 p += ETH_GSTRING_LEN; 1821 p += ETH_GSTRING_LEN;
1851 } 1822 }
1852#ifdef CONFIG_E1000_MQ
1853 for (i = 0; i < adapter->num_tx_queues; i++) {
1854 sprintf(p, "tx_queue_%u_packets", i);
1855 p += ETH_GSTRING_LEN;
1856 sprintf(p, "tx_queue_%u_bytes", i);
1857 p += ETH_GSTRING_LEN;
1858 }
1859 for (i = 0; i < adapter->num_rx_queues; i++) {
1860 sprintf(p, "rx_queue_%u_packets", i);
1861 p += ETH_GSTRING_LEN;
1862 sprintf(p, "rx_queue_%u_bytes", i);
1863 p += ETH_GSTRING_LEN;
1864 }
1865#endif
1866/* BUG_ON(p - data != E1000_STATS_LEN * ETH_GSTRING_LEN); */ 1823/* BUG_ON(p - data != E1000_STATS_LEN * ETH_GSTRING_LEN); */
1867 break; 1824 break;
1868 } 1825 }