Re: [PATCH net-next, v7] net: mana: Implement ndo_tx_timeout and serialize queue resets per port.
From: Dipayaan Roy <hidden>
Date: 2026-01-12 12:59:18
Also in:
linux-hyperv, linux-rdma, lkml
From: Dipayaan Roy <hidden>
Date: 2026-01-12 12:59:18
Also in:
linux-hyperv, linux-rdma, lkml
Fri, Jan 09, 2026 at 06:02:09PM -0800, Jakub Kicinski wrote:
On Tue, 6 Jan 2026 15:04:38 -0800 Dipayaan Roy wrote:quoted
+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);quoted
+struct mana_queue_reset_work { + /* Work structure */Not sure what value this comment adds. Looks like something AI generator would add.quoted
+ 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.
Thanks Jakub, I will remove the nesting and re-share a new patch after testing.
-- pw-bot: cr
Regards Dipayaan Roy