Thread (18 messages) 18 messages, 2 authors, 2026-02-02

Re: [net-next,v7,09/13] octeontx2-af: npc: cn20k: virtual index support

From: Ratheesh Kannoth <hidden>
Date: 2026-02-02 04:37:11
Also in: lkml

On 2026-01-31 at 09:03:22, Jakub Kicinski (kuba@kernel.org) wrote:
quoted
+fail1:
+	if (xa_insert(&npc_priv.xa_idx2vidx_map, old_midx,
+		      xa_mk_value(vidx), GFP_KERNEL))
+		dev_err(rvu->dev,
+			"%s: Faled to roll back vidx2idx to old_midx=%u, vidx=%u\n",
+			__func__, old_midx, vidx);
+
+	return rc;
+}
When we jump to fail1, it's because the xa_insert() into xa_vidx2idx_map
failed (around line 352). At that point, xa_idx2vidx_map hasn't been touched
yet - only xa_vidx2idx_map had the vidx erased. The rollback here tries to
insert into xa_idx2vidx_map, but shouldn't this restore vidx -> old_midx
in xa_vidx2idx_map instead? This appears to be operating on the wrong xarray
and would leave the mapping inconsistent on error.

This was also raised in lore review feedback:
https://lore.kernel.org/all/20260129051307.376632-1-kuba@kernel.org/ (local)
Label fall1: is modifying vidx2idx_map in V7. Am i missing anything here ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help