Skip to content

Commit faefaa9

Browse files
tlfalcondavem330
authored andcommitted
ibmvnic: Reset long term map ID counter
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 437a4db commit faefaa9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
16441644
return rc;
16451645
} else if (adapter->req_rx_queues != old_num_rx_queues ||
16461646
adapter->req_tx_queues != old_num_tx_queues) {
1647+
adapter->map_id = 1;
16471648
release_rx_pools(adapter);
16481649
release_tx_pools(adapter);
16491650
init_rx_pools(netdev);

0 commit comments

Comments
 (0)