[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240731171518.3cbfc83b@kernel.org>
Date: Wed, 31 Jul 2024 17:15:18 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Shradha Gupta <shradhagupta@...ux.microsoft.com>
Cc: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org, "K. Y.
Srinivasan" <kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
Abeni <pabeni@...hat.com>, Long Li <longli@...rosoft.com>, Ajay Sharma
<sharmaajay@...rosoft.com>, Simon Horman <horms@...nel.org>, Konstantin
Taranov <kotaranov@...rosoft.com>, Souradeep Chakrabarti
<schakrabarti@...ux.microsoft.com>, Erick Archer
<erick.archer@...look.com>, Pavan Chebbi <pavan.chebbi@...adcom.com>, Ahmed
Zaki <ahmed.zaki@...el.com>, Colin Ian King <colin.i.king@...il.com>
Subject: Re: [PATCH net-next v2] net: mana: Implement
get_ringparam/set_ringparam for mana
On Tue, 30 Jul 2024 10:01:35 -0700 Shradha Gupta wrote:
> + err1 = mana_detach(ndev, false);
> + if (err1) {
> + netdev_err(ndev, "mana_detach failed: %d\n", err1);
> + return err1;
> + }
> +
> + apc->tx_queue_size = new_tx;
> + apc->rx_queue_size = new_rx;
> + err1 = mana_attach(ndev);
> + if (!err1)
> + return 0;
> +
> + netdev_err(ndev, "mana_attach failed: %d\n", err1);
> +
> + /* Try rolling back to the older values */
> + apc->tx_queue_size = old_tx;
> + apc->rx_queue_size = old_rx;
> + err2 = mana_attach(ndev);
If system is under memory pressure there's no guarantee you'll get
the memory back, even if you revert to the old counts.
We strongly recommend you refactor the code to hold onto the old memory
until you're sure new config works.
--
pw-bot: cr
Powered by blists - more mailing lists