From: Rick Lindsley <ricklind@linux.vnet.ibm.com>
To: Sukadev Bhattiprolu <sukadev@linux.ibm.com>, netdev@vger.kernel.org
Cc: Brian King <brking@linux.ibm.com>,
Dany Madden <drt@linux.ibm.com>,
Rick Lindsley <ricklind@linux.ibm.com>
Subject: Re: [PATCH net 2/2] ibmvnic: drop bad optimization in reuse_tx_pools()
Date: Wed, 1 Dec 2021 10:18:16 -0800 [thread overview]
Message-ID: <49f778db-0aee-f401-456d-3112045aaeaa@linux.vnet.ibm.com> (raw)
In-Reply-To: <20211201054836.3488211-2-sukadev@linux.ibm.com>
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: bbd809305bc7 ("ibmvnic: Reuse tx pools when possible")
> Reported-by: Dany Madden <drt@linux.ibm.com>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Reviewed-by: Rick Lindsley <ricklind@linux.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 6df92a872f0f..0bb3911dd014 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -866,17 +866,9 @@ static bool reuse_tx_pools(struct ibmvnic_adapter *adapter)
> old_mtu = adapter->prev_mtu;
> new_mtu = adapter->req_mtu;
>
> - /* Require MTU to be exactly same to reuse pools for now */
> - if (old_mtu != new_mtu)
> - return false;
> -
> - if (old_num_pools == new_num_pools && old_pool_size == new_pool_size)
> - return true;
> -
> - if (old_num_pools < adapter->min_tx_queues ||
> - old_num_pools > adapter->max_tx_queues ||
> - old_pool_size < adapter->min_tx_entries_per_subcrq ||
> - old_pool_size > adapter->max_tx_entries_per_subcrq)
> + if (old_mtu != new_mtu ||
> + old_num_pools != new_num_pools ||
> + old_pool_size != new_pool_size)
> return false;
>
> return true;
>
next prev parent reply other threads:[~2021-12-01 18:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 5:48 [PATCH net 1/2] ibmvnic: drop bad optimization in reuse_rx_pools() Sukadev Bhattiprolu
2021-12-01 5:48 ` [PATCH net 2/2] ibmvnic: drop bad optimization in reuse_tx_pools() Sukadev Bhattiprolu
2021-12-01 18:13 ` Dany Madden
2021-12-01 18:18 ` Rick Lindsley [this message]
2021-12-01 18:12 ` [PATCH net 1/2] ibmvnic: drop bad optimization in reuse_rx_pools() Dany Madden
2021-12-01 18:18 ` Rick Lindsley
2021-12-02 12:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49f778db-0aee-f401-456d-3112045aaeaa@linux.vnet.ibm.com \
--to=ricklind@linux.vnet.ibm.com \
--cc=brking@linux.ibm.com \
--cc=drt@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ricklind@linux.ibm.com \
--cc=sukadev@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.