πŸš€ 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 Sat, 28 Nov 2026 12:52
Re: [PATCH net-next v9 2/3] net: macb: implement ethtool_ops.get|set_channels()
#23862
Author: Nicolai Buchwitz
Date: Sat, 28 Nov 2026 12:52
43 lines
9984 bytes
Hi ThΓ©o

> [...]

> @@ -3405,16 +3427,28 @@ static void macb_context_swap_end(struct macb 
> *bp,
> 
>  	lockdep_assert_held(&bp->mac_cfg_lock);
> 
> -	/* Swap contexts & give buffer pointers to HW. */
> +	/* Swap contexts & give buffer pointers to HW.
> +	 * !new_ctx means that the swap failed and we keep the old context.
> +	 */
> 
> -	old_ctx = bp->ctx;
> -	WRITE_ONCE(bp->ctx, new_ctx);
> -	wmb(); /* ensure IRQ enabled below read the new context */
> -	macb_init_buffers(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->max_num_queues; ++q)
> +			netdev_tx_reset_queue(netdev_get_tx_queue(bp->netdev,
> +								  q));
> +	} else {
> +		gem_shuffle_tx_rings(bp);
> +	}

Under load the frame at txq->tail can already be sent, so index 0
has TX_USED after the shuffle. Doesn't Tx stall there?

Maybe reclaim completed frames before the shuffle?

> [...]

Thanks,
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