summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40evf/i40evf.h
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2015-10-26 19:44:40 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-12-01 22:56:30 -0800
commit0dd438d8ad5db85c1a805ce2244252e37d5586a0 (patch)
tree1f1934e9de8a4ae53c58a55ab5ab93cf71a88d0d /drivers/net/ethernet/intel/i40evf/i40evf.h
parent7d96ba1a8b7c36d1f4a04dc40e031b6f8c677496 (diff)
downloadlinux-0dd438d8ad5db85c1a805ce2244252e37d5586a0.tar.gz
i40evf: allocate ring structs dynamically
Instead of awkwardly keeping a fixed array of pointers in the adapter struct and then allocating ring structs individually, just keep a single pointer and allocate a single blob for the arrays. This simplifies code, shrinks the adapter structure, and future-proofs the driver by not limiting the number of rings we can handle. Change-ID: I31334ff911a6474954232cfe4bc98ccca3c769ff Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40evf.h')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index bd185add7948..a6318c421695 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -196,13 +196,13 @@ struct i40evf_adapter {
int num_active_queues;
/* TX */
- struct i40e_ring *tx_rings[I40E_MAX_VSI_QP];
+ struct i40e_ring *tx_rings;
u32 tx_timeout_count;
struct list_head mac_filter_list;
u32 tx_desc_count;
/* RX */
- struct i40e_ring *rx_rings[I40E_MAX_VSI_QP];
+ struct i40e_ring *rx_rings;
u64 hw_csum_rx_error;
u32 rx_desc_count;
int num_msix_vectors;