aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2010-11-16 22:26:51 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-11-16 22:26:51 -0500
commitfc77dc3cc15144bbaf18203e9ef7a3e1beedfc3f (patch)
treea37368f47699db69cae50da83d8fdcdd05c15b8b /drivers/net/ixgbe/ixgbe.h
parent5b7da51547cc3ab5461e45a8ee0ca73051416fda (diff)
ixgbe: add a netdev pointer to the ring structure
This change places a netdev pointer directly into the ring structure. This way we can avoid having to determine which netdev we are supposed to be using and can just access the one on the ring directly. As a result of this change further collapse of the code is possible by dropping the adapter from ixgbe_alloc_rx_buffers, and the netdev pointer from ixgbe_xmit_frame_ring_adv and ixgbe_maybe_stop_tx. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 3c63ee6be2e..dc4b97e5777 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -162,6 +162,7 @@ struct ixgbe_rx_queue_stats {
162struct ixgbe_ring { 162struct ixgbe_ring {
163 void *desc; /* descriptor ring memory */ 163 void *desc; /* descriptor ring memory */
164 struct device *dev; /* device for DMA mapping */ 164 struct device *dev; /* device for DMA mapping */
165 struct net_device *netdev; /* netdev ring belongs to */
165 union { 166 union {
166 struct ixgbe_tx_buffer *tx_buffer_info; 167 struct ixgbe_tx_buffer *tx_buffer_info;
167 struct ixgbe_rx_buffer *rx_buffer_info; 168 struct ixgbe_rx_buffer *rx_buffer_info;
@@ -477,14 +478,11 @@ extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
477extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter); 478extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter);
478extern void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter); 479extern void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter);
479extern netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *, 480extern netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *,
480 struct net_device *,
481 struct ixgbe_adapter *, 481 struct ixgbe_adapter *,
482 struct ixgbe_ring *); 482 struct ixgbe_ring *);
483extern void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *, 483extern void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *,
484 struct ixgbe_tx_buffer *); 484 struct ixgbe_tx_buffer *);
485extern void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter, 485extern void ixgbe_alloc_rx_buffers(struct ixgbe_ring *, u16);
486 struct ixgbe_ring *rx_ring,
487 u16 cleaned_count);
488extern void ixgbe_write_eitr(struct ixgbe_q_vector *); 486extern void ixgbe_write_eitr(struct ixgbe_q_vector *);
489extern int ethtool_ioctl(struct ifreq *ifr); 487extern int ethtool_ioctl(struct ifreq *ifr);
490extern s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 488extern s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw);