aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2014-01-17 21:30:01 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-17 22:15:10 -0500
commit9703192219f3687547dd4196b0df29dc66966721 (patch)
tree71e2668a15e0bc239a75c75ad49ab9c058c3cd5f /drivers/net/ethernet/intel/ixgbevf
parent095e2617cee0e0d94040c2eb7af1598429e20661 (diff)
ixgbevf: remove counters for Tx/Rx checksum offload
This patch removes the Tx/Rx counters for checksum offload. The Tx counter was never updated and the Rx counter is of limited use. This is in effort to clean up the counters and make them consistent with the counters shown by ixgbe. Also this patch removes some members of the adapter structure that were never used and shuffles others to reduce number of holes. before: /* size: 1568, cachelines: 25, members: 48 */ /* sum members: 1519, holes: 10, sum holes: 43 */ /* padding: 6 */ /* last cacheline: 32 bytes */ after: /* size: 1480, cachelines: 24, members: 43 */ /* sum members: 1479, holes: 1, sum holes: 1 */ /* last cacheline: 8 bytes */ Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ethtool.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf.h23
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c4
3 files changed, 9 insertions, 20 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index 0769306641bc..b48df7802208 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -79,9 +79,7 @@ static const struct ixgbe_stats ixgbe_gstrings_stats[] = {
79 {"tx_busy", IXGBEVF_ZSTAT(tx_busy)}, 79 {"tx_busy", IXGBEVF_ZSTAT(tx_busy)},
80 {"multicast", IXGBEVF_STAT(stats.vfmprc, stats.base_vfmprc, 80 {"multicast", IXGBEVF_STAT(stats.vfmprc, stats.base_vfmprc,
81 stats.saved_reset_vfmprc)}, 81 stats.saved_reset_vfmprc)},
82 {"rx_csum_offload_good", IXGBEVF_ZSTAT(hw_csum_rx_good)},
83 {"rx_csum_offload_errors", IXGBEVF_ZSTAT(hw_csum_rx_error)}, 82 {"rx_csum_offload_errors", IXGBEVF_ZSTAT(hw_csum_rx_error)},
84 {"tx_csum_offload_ctxt", IXGBEVF_ZSTAT(hw_csum_tx_good)},
85#ifdef BP_EXTENDED_STATS 83#ifdef BP_EXTENDED_STATS
86 {"rx_bp_poll_yield", IXGBEVF_ZSTAT(bp_rx_yields)}, 84 {"rx_bp_poll_yield", IXGBEVF_ZSTAT(bp_rx_yields)},
87 {"rx_bp_cleaned", IXGBEVF_ZSTAT(bp_rx_cleaned)}, 85 {"rx_bp_cleaned", IXGBEVF_ZSTAT(bp_rx_cleaned)},
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 0642bd20b892..006842813640 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -106,7 +106,6 @@ struct ixgbevf_ring {
106 }; 106 };
107 107
108 u64 hw_csum_rx_error; 108 u64 hw_csum_rx_error;
109 u64 hw_csum_rx_good;
110 u8 __iomem *tail; 109 u8 __iomem *tail;
111 110
112 u16 reg_idx; /* holds the special value that gets the hardware register 111 u16 reg_idx; /* holds the special value that gets the hardware register
@@ -336,7 +335,6 @@ static inline u16 ixgbevf_desc_unused(struct ixgbevf_ring *ring)
336struct ixgbevf_adapter { 335struct ixgbevf_adapter {
337 struct timer_list watchdog_timer; 336 struct timer_list watchdog_timer;
338 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; 337 unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
339 u16 bd_number;
340 struct work_struct reset_task; 338 struct work_struct reset_task;
341 struct ixgbevf_q_vector *q_vector[MAX_MSIX_Q_VECTORS]; 339 struct ixgbevf_q_vector *q_vector[MAX_MSIX_Q_VECTORS];
342 340
@@ -349,25 +347,18 @@ struct ixgbevf_adapter {
349 u32 eims_other; 347 u32 eims_other;
350 348
351 /* TX */ 349 /* TX */
352 struct ixgbevf_ring *tx_ring[MAX_TX_QUEUES]; /* One per active queue */
353 int num_tx_queues; 350 int num_tx_queues;
351 struct ixgbevf_ring *tx_ring[MAX_TX_QUEUES]; /* One per active queue */
354 u64 restart_queue; 352 u64 restart_queue;
355 u64 hw_csum_tx_good;
356 u64 lsc_int;
357 u64 hw_tso_ctxt;
358 u64 hw_tso6_ctxt;
359 u32 tx_timeout_count; 353 u32 tx_timeout_count;
360 354
361 /* RX */ 355 /* RX */
362 struct ixgbevf_ring *rx_ring[MAX_TX_QUEUES]; /* One per active queue */
363 int num_rx_queues; 356 int num_rx_queues;
357 struct ixgbevf_ring *rx_ring[MAX_TX_QUEUES]; /* One per active queue */
364 u64 hw_csum_rx_error; 358 u64 hw_csum_rx_error;
365 u64 hw_rx_no_dma_resources; 359 u64 hw_rx_no_dma_resources;
366 u64 hw_csum_rx_good;
367 u64 non_eop_descs; 360 u64 non_eop_descs;
368 int num_msix_vectors; 361 int num_msix_vectors;
369 struct msix_entry *msix_entries;
370
371 u32 alloc_rx_page_failed; 362 u32 alloc_rx_page_failed;
372 u32 alloc_rx_buff_failed; 363 u32 alloc_rx_buff_failed;
373 364
@@ -379,6 +370,8 @@ struct ixgbevf_adapter {
379#define IXGBE_FLAG_IN_NETPOLL (u32)(1 << 1) 370#define IXGBE_FLAG_IN_NETPOLL (u32)(1 << 1)
380#define IXGBEVF_FLAG_QUEUE_RESET_REQUESTED (u32)(1 << 2) 371#define IXGBEVF_FLAG_QUEUE_RESET_REQUESTED (u32)(1 << 2)
381 372
373 struct msix_entry *msix_entries;
374
382 /* OS defined structs */ 375 /* OS defined structs */
383 struct net_device *netdev; 376 struct net_device *netdev;
384 struct pci_dev *pdev; 377 struct pci_dev *pdev;
@@ -386,10 +379,12 @@ struct ixgbevf_adapter {
386 /* structs defined in ixgbe_vf.h */ 379 /* structs defined in ixgbe_vf.h */
387 struct ixgbe_hw hw; 380 struct ixgbe_hw hw;
388 u16 msg_enable; 381 u16 msg_enable;
389 struct ixgbevf_hw_stats stats; 382 u16 bd_number;
390 /* Interrupt Throttle Rate */ 383 /* Interrupt Throttle Rate */
391 u32 eitr_param; 384 u32 eitr_param;
392 385
386 struct ixgbevf_hw_stats stats;
387
393 unsigned long state; 388 unsigned long state;
394 u64 tx_busy; 389 u64 tx_busy;
395 unsigned int tx_ring_count; 390 unsigned int tx_ring_count;
@@ -408,9 +403,9 @@ struct ixgbevf_adapter {
408 u32 link_speed; 403 u32 link_speed;
409 bool link_up; 404 bool link_up;
410 405
411 struct work_struct watchdog_task;
412
413 spinlock_t mbx_lock; 406 spinlock_t mbx_lock;
407
408 struct work_struct watchdog_task;
414}; 409};
415 410
416enum ixbgevf_state_t { 411enum ixbgevf_state_t {
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 69e6d278480f..c2e1ef648137 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -357,7 +357,6 @@ static inline void ixgbevf_rx_checksum(struct ixgbevf_ring *ring,
357 357
358 /* It must be a TCP or UDP packet with a valid checksum */ 358 /* It must be a TCP or UDP packet with a valid checksum */
359 skb->ip_summed = CHECKSUM_UNNECESSARY; 359 skb->ip_summed = CHECKSUM_UNNECESSARY;
360 ring->hw_csum_rx_good++;
361} 360}
362 361
363/** 362/**
@@ -2263,10 +2262,7 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)
2263 for (i = 0; i < adapter->num_rx_queues; i++) { 2262 for (i = 0; i < adapter->num_rx_queues; i++) {
2264 adapter->hw_csum_rx_error += 2263 adapter->hw_csum_rx_error +=
2265 adapter->rx_ring[i]->hw_csum_rx_error; 2264 adapter->rx_ring[i]->hw_csum_rx_error;
2266 adapter->hw_csum_rx_good +=
2267 adapter->rx_ring[i]->hw_csum_rx_good;
2268 adapter->rx_ring[i]->hw_csum_rx_error = 0; 2265 adapter->rx_ring[i]->hw_csum_rx_error = 0;
2269 adapter->rx_ring[i]->hw_csum_rx_good = 0;
2270 } 2266 }
2271} 2267}
2272 2268