Re: [PATCH net-next, v7] net: mana: Implement ndo_tx_timeout and serialize queue resets per port.

From: Jakub Kicinski

Date: Fri Jan 09 2026 - 21:02:11 EST


On Tue, 6 Jan 2026 15:04:38 -0800 Dipayaan Roy wrote:
> +static void mana_per_port_queue_reset_work_handler(struct work_struct *work)
> +{
> + struct mana_queue_reset_work *reset_queue_work =
> + container_of(work, struct mana_queue_reset_work, work);
> +
> + struct mana_port_context *apc = container_of(reset_queue_work,
> + struct mana_port_context,
> + queue_reset_work);

> +struct mana_queue_reset_work {
> + /* Work structure */

Not sure what value this comment adds. Looks like something AI
generator would add.

> + struct work_struct work;
> +};
> +
> struct mana_port_context {
> struct mana_context *ac;
> struct net_device *ndev;
> + struct mana_queue_reset_work queue_reset_work;

Why did you wrap the work in another struct with just one member?
It forces you to work thru two layers of container of.

Either way, container_of supports nested structs so I think something
like:

struct mana_port_context *apc = container_of(work,
struct mana_port_context,
queue_reset_work.work);

should work (untested). But really, better to just delete the pointless
nesting.
--
pw-bot: cr