Thread (10 messages) 10 messages, 5 authors, 2024-08-05

Re: [PATCH net-next v2] net: mana: Implement get_ringparam/set_ringparam for mana

From: Shradha Gupta <hidden>
Date: 2024-08-01 03:50:27
Also in: linux-hyperv, linux-rdma, lkml

On Wed, Jul 31, 2024 at 05:15:18PM -0700, Jakub Kicinski wrote:
On Tue, 30 Jul 2024 10:01:35 -0700 Shradha Gupta wrote:
quoted
+	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.
Okay, that makes sense. Let me try to make that change

Thanks,
Shradha.
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help