[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0f78b99-29ce-5565-b0ae-d2e45fce07bd@linux.vnet.ibm.com>
Date: Wed, 1 Dec 2021 10:18:11 -0800
From: Rick Lindsley <ricklind@...ux.vnet.ibm.com>
To: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>, netdev@...r.kernel.org
Cc: Brian King <brking@...ux.ibm.com>, Dany Madden <drt@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>
Subject: Re: [PATCH net 1/2] ibmvnic: drop bad optimization in
reuse_rx_pools()
On 11/30/21 21:48, Sukadev Bhattiprolu wrote:
> When trying to decide whether or not reuse existing rx/tx pools
> we tried to allow a range of values for the pool parameters rather
> than exact matches. This was intended to reuse the resources for
> instance when switching between two VIO servers with different
> default parameters.
>
> But this optimization is incomplete and breaks when we try to
> change the number of queues for instance. The optimization needs
> to be updated, so drop it for now and simplify the code.
>
> Fixes: 489de956e7a2 ("ibmvnic: Reuse rx pools when possible")
> Reported-by: Dany Madden <drt@...ux.ibm.com>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
Reviewed-by: Rick Lindsley <ricklind@...ux.ibm.com>
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index 3cca51735421..6df92a872f0f 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -628,17 +628,9 @@ static bool reuse_rx_pools(struct ibmvnic_adapter *adapter)
> old_buff_size = adapter->prev_rx_buf_sz;
> new_buff_size = adapter->cur_rx_buf_sz;
>
> - /* Require buff size to be exactly same for now */
> - if (old_buff_size != new_buff_size)
> - return false;
> -
> - if (old_num_pools == new_num_pools && old_pool_size == new_pool_size)
> - return true;
> -
> - if (old_num_pools < adapter->min_rx_queues ||
> - old_num_pools > adapter->max_rx_queues ||
> - old_pool_size < adapter->min_rx_add_entries_per_subcrq ||
> - old_pool_size > adapter->max_rx_add_entries_per_subcrq)
> + if (old_buff_size != new_buff_size ||
> + old_num_pools != new_num_pools ||
> + old_pool_size != new_pool_size)
> return false;
>
> return true;
>
Powered by blists - more mailing lists