From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: netdev@vger.kernel.org
Cc: brking@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com,
muvic@linux.vnet.ibm.com, tlfalcon@linux.vnet.ibm.com
Subject: [PATCH net-next 11/11] ibmvnic: Move queue restart
Date: Sat, 29 Apr 2017 04:16:35 -0400 [thread overview]
Message-ID: <20170429081634.13438.38831.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com> (raw)
In-Reply-To: <20170429080710.13438.39798.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4a2b99f..12536ba 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1776,6 +1776,7 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
struct device *dev = &adapter->vdev->dev;
struct ibmvnic_tx_buff *txbuff;
union sub_crq *next;
+ struct sk_buff *skb;
int index;
int i, j;
u8 first;
@@ -1808,20 +1809,10 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
DMA_TO_DEVICE);
}
+ skb = txbuff->skb;
if (txbuff->last_frag) {
- if (atomic_sub_return(next->tx_comp.num_comps,
- &scrq->used) <=
- (adapter->req_tx_entries_per_subcrq / 2) &&
- netif_subqueue_stopped(adapter->netdev,
- txbuff->skb)) {
- netif_wake_subqueue(adapter->netdev,
- scrq->pool_index);
- netdev_dbg(adapter->netdev,
- "Started queue %d\n",
- scrq->pool_index);
- }
-
dev_kfree_skb_any(txbuff->skb);
+ txbuff->skb = NULL;
}
adapter->tx_pool[pool].free_map[adapter->tx_pool[pool].
@@ -1832,6 +1823,14 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
}
/* remove tx_comp scrq*/
next->tx_comp.first = 0;
+
+ if (atomic_sub_return(next->tx_comp.num_comps, &scrq->used) <=
+ (adapter->req_tx_entries_per_subcrq / 2) &&
+ netif_subqueue_stopped(adapter->netdev, skb)) {
+ netif_wake_subqueue(adapter->netdev, scrq->pool_index);
+ netdev_info(adapter->netdev, "Started queue %d\n",
+ scrq->pool_index);
+ }
}
enable_scrq_irq(adapter, scrq);
next prev parent reply other threads:[~2017-04-29 4:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 8:15 [PATCH net-next 00/11] ibmvnic: Updated reset handler and code fixes Nathan Fontenot
2017-04-29 8:15 ` [PATCH net-next 01/11] ibmvnic: Move resource initialization to its own routine Nathan Fontenot
2017-04-29 8:15 ` [PATCH net-next 02/11] ibmvnic: Replace is_closed with state field Nathan Fontenot
2017-04-29 8:15 ` [PATCH net-next 03/11] ibmvnic: Updated reset handling Nathan Fontenot
2017-04-29 8:15 ` [PATCH net-next 04/11] ibmvnic: Delete napi's when releasing driver resources Nathan Fontenot
2017-04-29 8:15 ` [PATCH net-next 05/11] ibmvnic: Whitespace correction in release_rx_pools Nathan Fontenot
2017-04-29 8:16 ` [PATCH net-next 06/11] ibmvnic: Clean up tx pools when closing Nathan Fontenot
2017-04-29 8:16 ` [PATCH net-next 07/11] ibmvnic: Wait for any pending scrqs entries at driver close Nathan Fontenot
2017-04-29 8:16 ` [PATCH net-next 08/11] ibmvnic: Check for driver reset first in ibmvnic_xmit Nathan Fontenot
2017-04-29 8:16 ` [PATCH net-next 09/11] ibmvnic: Continue skb processing after skb completion error Nathan Fontenot
2017-04-29 8:16 ` [PATCH net-next 10/11] From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Nathan Fontenot
2017-04-29 8:16 ` Nathan Fontenot [this message]
2017-04-29 17:18 ` [PATCH net-next 11/11] ibmvnic: Move queue restart kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170429081634.13438.38831.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com \
--to=nfont@linux.vnet.ibm.com \
--cc=brking@linux.vnet.ibm.com \
--cc=jallen@linux.vnet.ibm.com \
--cc=muvic@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=tlfalcon@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox