Skip to content

Commit

Permalink
ixgbevf: Move Tx clean-up into NAPI context
Browse files Browse the repository at this point in the history
Currently the VF driver is processing all of the transmits in interrupt
context.  This can be messy since the Rx is all handled in NAPI and this
may result in interrupts being disabled.  In order to resolve this move all
of the Tx packet processing into NAPI and combine all of the interrupt and
polling routines into just a pair of functions.

Signed-off-by: Alexander Duyck <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
Tested-by: Sibai Li <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 17, 2012
1 parent 6b43c44 commit fa71ae2
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 182 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/intel/ixgbevf/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
}
goto err_tx_ring_setup;
}
tx_ring[i].v_idx = adapter->tx_ring[i].v_idx;
}

memcpy(rx_ring, adapter->rx_ring,
Expand All @@ -380,7 +379,6 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
}
goto err_rx_ring_setup;
}
rx_ring[i].v_idx = adapter->rx_ring[i].v_idx;
}

/*
Expand Down
12 changes: 4 additions & 8 deletions drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ struct ixgbevf_ring {
* offset associated with this ring, which is different
* for DCB and RSS modes */

u64 v_idx; /* maps directly to the index for this ring in the hardware
* vector array, can also be used for finding the bit in EICR
* and friends that represents the vector for this ring */

u16 work_limit; /* max work per interrupt */
u16 rx_buf_len;
};

Expand Down Expand Up @@ -140,6 +135,7 @@ struct ixgbevf_q_vector {
struct ixgbevf_ring_container rx, tx;
u32 eitr;
int v_idx; /* vector index in list */
char name[IFNAMSIZ + 9];
};

/* Helper macros to switch between ints/sec and what the register uses.
Expand Down Expand Up @@ -167,9 +163,8 @@ struct ixgbevf_q_vector {
#define NON_Q_VECTORS (OTHER_VECTOR)

#define MAX_MSIX_Q_VECTORS 2
#define MAX_MSIX_COUNT 2

#define MIN_MSIX_Q_VECTORS 2
#define MIN_MSIX_Q_VECTORS 1
#define MIN_MSIX_COUNT (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)

/* board specific private data structure */
Expand All @@ -179,14 +174,14 @@ struct ixgbevf_adapter {
u16 bd_number;
struct work_struct reset_task;
struct ixgbevf_q_vector *q_vector[MAX_MSIX_Q_VECTORS];
char name[MAX_MSIX_COUNT][IFNAMSIZ + 9];

/* Interrupt Throttle Rate */
u32 itr_setting;

/* TX */
struct ixgbevf_ring *tx_ring; /* One per active queue */
int num_tx_queues;
u16 tx_itr_setting;
u64 restart_queue;
u64 hw_csum_tx_good;
u64 lsc_int;
Expand All @@ -197,6 +192,7 @@ struct ixgbevf_adapter {
/* RX */
struct ixgbevf_ring *rx_ring; /* One per active queue */
int num_rx_queues;
u16 rx_itr_setting;
u64 hw_csum_rx_error;
u64 hw_rx_no_dma_resources;
u64 hw_csum_rx_good;
Expand Down
Loading

0 comments on commit fa71ae2

Please sign in to comment.