* [PATCH net] ibmvnic: Reset long term map ID counter
@ 2018-02-09 17:41 Thomas Falcon
2018-02-09 19:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Falcon @ 2018-02-09 17:41 UTC (permalink / raw)
To: netdev; +Cc: jallen, nfont, Thomas Falcon
When allocating RX or TX buffer pools, the driver needs to provide a
unique mapping ID to firmware for each pool. This value is assigned
using a counter which is incremented after a new pool is created. The
ID can be an integer ranging from 1-255. When migrating to a device
that requests a different number of queues, this value was not being
reset properly. As a result, after enough migrations, the counter
exceeded the upper bound and pool creation failed. This is fixed by
resetting the counter to one in this case.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index dd4a294..ce127a7 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1644,6 +1644,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
return rc;
} else if (adapter->req_rx_queues != old_num_rx_queues ||
adapter->req_tx_queues != old_num_tx_queues) {
+ adapter->map_id = 1;
release_rx_pools(adapter);
release_tx_pools(adapter);
init_rx_pools(netdev);
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ibmvnic: Reset long term map ID counter
2018-02-09 17:41 [PATCH net] ibmvnic: Reset long term map ID counter Thomas Falcon
@ 2018-02-09 19:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-02-09 19:20 UTC (permalink / raw)
To: tlfalcon; +Cc: netdev, jallen, nfont
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Fri, 9 Feb 2018 11:41:09 -0600
> When allocating RX or TX buffer pools, the driver needs to provide a
> unique mapping ID to firmware for each pool. This value is assigned
> using a counter which is incremented after a new pool is created. The
> ID can be an integer ranging from 1-255. When migrating to a device
> that requests a different number of queues, this value was not being
> reset properly. As a result, after enough migrations, the counter
> exceeded the upper bound and pool creation failed. This is fixed by
> resetting the counter to one in this case.
>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Applied, thanks Thomas.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-09 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 17:41 [PATCH net] ibmvnic: Reset long term map ID counter Thomas Falcon
2018-02-09 19:20 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.