lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20170429081634.13438.38831.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com> Date: Sat, 29 Apr 2017 04:16:35 -0400 From: Nathan Fontenot <nfont@...ux.vnet.ibm.com> To: netdev@...r.kernel.org Cc: brking@...ux.vnet.ibm.com, jallen@...ux.vnet.ibm.com, muvic@...ux.vnet.ibm.com, tlfalcon@...ux.vnet.ibm.com Subject: [PATCH net-next 11/11] ibmvnic: Move queue restart --- 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);
Powered by blists - more mailing lists