Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135199
b: refs/heads/master
c: 9a1a69a
h: refs/heads/master
i:
  135197: 00ae13d
  135195: 35e6e93
  135191: 314c981
  135183: 9556e8e
  135167: 2e3fa83
v: v3
  • Loading branch information
Jesse Brandeburg authored and David S. Miller committed Mar 14, 2009
1 parent dd2cf10 commit 5eedcbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dd64df8954cc6d485f7c98ab18e0480f0c7d865
refs/heads/master: 9a1a69adad69ce4e85c9cbb40a3f960a7cb015cf
19 changes: 10 additions & 9 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ static void ixgbe_tx_timeout(struct net_device *netdev);
* ixgbe_clean_tx_irq - Reclaim resources after transmit completes
* @adapter: board private structure
* @tx_ring: tx ring to clean
*
* returns true if transmit work is done
**/
static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring)
Expand All @@ -266,7 +268,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
eop_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop);

while ((eop_desc->wb.status & cpu_to_le32(IXGBE_TXD_STAT_DD)) &&
(count < tx_ring->count)) {
(count < tx_ring->work_limit)) {
bool cleaned = false;
for ( ; !cleaned; count++) {
struct sk_buff *skb;
Expand Down Expand Up @@ -328,8 +330,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
}

/* re-arm the interrupt */
if ((total_packets >= tx_ring->work_limit) ||
(count == tx_ring->count))
if (count >= tx_ring->work_limit)
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, tx_ring->v_idx);

tx_ring->total_bytes += total_bytes;
Expand All @@ -338,7 +339,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
tx_ring->stats.bytes += total_bytes;
adapter->net_stats.tx_bytes += total_bytes;
adapter->net_stats.tx_packets += total_packets;
return (total_packets ? true : false);
return (count < tx_ring->work_limit);
}

#ifdef CONFIG_IXGBE_DCA
Expand Down Expand Up @@ -2590,10 +2591,10 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
**/
static int ixgbe_poll(struct napi_struct *napi, int budget)
{
struct ixgbe_q_vector *q_vector = container_of(napi,
struct ixgbe_q_vector, napi);
struct ixgbe_q_vector *q_vector =
container_of(napi, struct ixgbe_q_vector, napi);
struct ixgbe_adapter *adapter = q_vector->adapter;
int tx_cleaned, work_done = 0;
int tx_clean_complete, work_done = 0;

#ifdef CONFIG_IXGBE_DCA
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
Expand All @@ -2602,10 +2603,10 @@ static int ixgbe_poll(struct napi_struct *napi, int budget)
}
#endif

tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
tx_clean_complete = ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
ixgbe_clean_rx_irq(q_vector, adapter->rx_ring, &work_done, budget);

if (tx_cleaned)
if (!tx_clean_complete)
work_done = budget;

/* If budget not fully consumed, exit the polling mode */
Expand Down

0 comments on commit 5eedcbf

Please sign in to comment.