* [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors @ 2018-11-21 17:17 Thomas Falcon 2018-11-21 17:17 ` [PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup Thomas Falcon ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Thomas Falcon @ 2018-11-21 17:17 UTC (permalink / raw) To: netdev, linuxppc-dev; +Cc: tyreld, Thomas Falcon, mwb, julietk 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. Thomas Falcon (2): ibmvnic: Fix RX queue buffer cleanup ibmvnic: Update driver queues after change in ring size support drivers/net/ethernet/ibm/ibmvnic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup 2018-11-21 17:17 [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors Thomas Falcon @ 2018-11-21 17:17 ` Thomas Falcon 2018-11-21 17:17 ` [PATCH net 2/2] ibmvnic: Update driver queues after change in ring size support Thomas Falcon 2018-11-22 19:53 ` [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors David Miller 2 siblings, 0 replies; 4+ messages in thread From: Thomas Falcon @ 2018-11-21 17:17 UTC (permalink / raw) To: netdev, linuxppc-dev; +Cc: tyreld, Thomas Falcon, mwb, julietk The wrong index is used when cleaning up RX buffer objects during release of RX queues. Update to use the correct index counter. Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 27a6df3..066897a 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -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; } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] ibmvnic: Update driver queues after change in ring size support 2018-11-21 17:17 [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors Thomas Falcon 2018-11-21 17:17 ` [PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup Thomas Falcon @ 2018-11-21 17:17 ` Thomas Falcon 2018-11-22 19:53 ` [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors David Miller 2 siblings, 0 replies; 4+ messages in thread From: Thomas Falcon @ 2018-11-21 17:17 UTC (permalink / raw) To: netdev, linuxppc-dev; +Cc: tyreld, Thomas Falcon, mwb, julietk During device reset, queue memory is not being updated to accommodate changes in ring buffer sizes supported by backing hardware. Track any differences in ring buffer sizes following the reset and update queue memory when possible. Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 066897a..c0203a0 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -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); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors 2018-11-21 17:17 [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors Thomas Falcon 2018-11-21 17:17 ` [PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup Thomas Falcon 2018-11-21 17:17 ` [PATCH net 2/2] ibmvnic: Update driver queues after change in ring size support Thomas Falcon @ 2018-11-22 19:53 ` David Miller 2 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2018-11-22 19:53 UTC (permalink / raw) To: tlfalcon; +Cc: netdev, linuxppc-dev, mwb, julietk, tyreld From: Thomas Falcon <tlfalcon@linux.ibm.com> Date: Wed, 21 Nov 2018 11:17:57 -0600 > 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. Series applied. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-22 20:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-11-21 17:17 [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors Thomas Falcon 2018-11-21 17:17 ` [PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup Thomas Falcon 2018-11-21 17:17 ` [PATCH net 2/2] ibmvnic: Update driver queues after change in ring size support Thomas Falcon 2018-11-22 19:53 ` [PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).