mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
Merge branch 'ibmvnic-Fix-queue-and-buffer-accounting-errors'
Thomas Falcon says: ==================== ibmvnic: Fix queue and buffer accounting errors This series includes two small fixes. The first resolves a typo bug in the code to clean up unused RX buffers during device queue removal. The second ensures that device queue memory is updated to reflect new supported queue ring sizes after migration to other backing hardware. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
039e70a70c
@ -485,8 +485,8 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter)
|
||||
|
||||
for (j = 0; j < rx_pool->size; j++) {
|
||||
if (rx_pool->rx_buff[j].skb) {
|
||||
dev_kfree_skb_any(rx_pool->rx_buff[i].skb);
|
||||
rx_pool->rx_buff[i].skb = NULL;
|
||||
dev_kfree_skb_any(rx_pool->rx_buff[j].skb);
|
||||
rx_pool->rx_buff[j].skb = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1737,6 +1737,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||
struct ibmvnic_rwi *rwi, u32 reset_state)
|
||||
{
|
||||
u64 old_num_rx_queues, old_num_tx_queues;
|
||||
u64 old_num_rx_slots, old_num_tx_slots;
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
int i, rc;
|
||||
|
||||
@ -1748,6 +1749,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||
|
||||
old_num_rx_queues = adapter->req_rx_queues;
|
||||
old_num_tx_queues = adapter->req_tx_queues;
|
||||
old_num_rx_slots = adapter->req_rx_add_entries_per_subcrq;
|
||||
old_num_tx_slots = adapter->req_tx_entries_per_subcrq;
|
||||
|
||||
ibmvnic_cleanup(netdev);
|
||||
|
||||
@ -1810,7 +1813,11 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||
if (rc)
|
||||
return rc;
|
||||
} else if (adapter->req_rx_queues != old_num_rx_queues ||
|
||||
adapter->req_tx_queues != old_num_tx_queues) {
|
||||
adapter->req_tx_queues != old_num_tx_queues ||
|
||||
adapter->req_rx_add_entries_per_subcrq !=
|
||||
old_num_rx_slots ||
|
||||
adapter->req_tx_entries_per_subcrq !=
|
||||
old_num_tx_slots) {
|
||||
release_rx_pools(adapter);
|
||||
release_tx_pools(adapter);
|
||||
release_napi(adapter);
|
||||
|
Loading…
Reference in New Issue
Block a user