🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Nicolai Buchwitz Thu, 19 Nov 2026 11:54
Re: [PATCH net-next v7 2/3] net: macb: implement ethtool_ops.get|set_channels()
#19131
Author: Nicolai Buchwitz
Date: Thu, 19 Nov 2026 11:54
50 lines
10021 bytes
Hi Théo

On 18.11.2026 21:53, Théo Lebrun wrote:

> [...]

> @@ -3376,7 +3398,7 @@ static void macb_context_swap_start(struct macb 
> *bp)

> [...]

> +	if (new_ctx) {
> +		old_ctx = bp->ctx;
> +		WRITE_ONCE(bp->ctx, new_ctx);
> +		wmb(); /* ensure IRQ enabled below read the new context */
> +
> +		macb_init_buffers(bp);
> +
> +		/* Clear DQL (only on successful context swap). */
> +		for (q = 0; q < bp->ctx->num_queues; ++q)
> +			netdev_tx_reset_queue(netdev_get_tx_queue(bp->netdev,
> +								  q));
> +	}

The queues we just dropped never get their BQL reset, not on close or
open either. So after shrinking and growing again they can stay stuck.

Maybe just reset all max_num_queues here and in macb_close()?

> [...]

> +static int macb_set_channels(struct net_device *netdev,

> [...]

> +	ret = netif_set_real_num_queues(bp->netdev, num_queues, num_queues);
> +	if (ret) {
> +		if (running) {
> +			macb_free(new_ctx);
> +			kfree(new_ctx);
> +			macb_context_swap_end(bp, NULL);

swap_start() cleared TE, so HW is back at the ring start. Doesn't this
needs a gem_shuffle_tx_rings() like link_up does, otherwise Tx stalls?

> [...]

Regards,
Nicolai
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads