From e1c55cfe13e830d2769acc2b694f2af42af0daa4 Mon Sep 17 00:00:00 2001 From: Alexia Ingerson Date: Tue, 10 Feb 2026 17:27:07 -0800 Subject: [PATCH] prov/lnx: FI_CLAIM and FI_DISCARD fixes When discarding or claiming a message, the entry should get removed from the unexpected queue so it can't be matched in the future. LNX has two paths for discarding - one with FI_PEEK and one with FI_CLAIM. The message needs to be discarded with the peer provider in both of these cases but discard_tag() was only getting called in one path. This adds the call to discard in the missing path Signed-off-by: Alexia Ingerson --- prov/lnx/src/lnx_ops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prov/lnx/src/lnx_ops.c b/prov/lnx/src/lnx_ops.c index 6c1e5f758e0..f3babf37859 100644 --- a/prov/lnx/src/lnx_ops.c +++ b/prov/lnx/src/lnx_ops.c @@ -284,6 +284,7 @@ lnx_discard(struct lnx_ep *lep, struct lnx_rx_entry *rx_entry, void *context) rx_entry->rx_entry.cq_data, rx_entry->rx_entry.tag); + dlist_remove(&rx_entry->entry); lnx_free_entry(&rx_entry->rx_entry); return rc; @@ -315,12 +316,17 @@ lnx_peek(struct lnx_ep *lep, struct lnx_match_attr *match_attr, void *context, rx_entry->rx_entry.tag); if (flags & FI_DISCARD) { + rc = rx_entry->rx_cep->cep_srx.peer_ops->discard_tag( + &rx_entry->rx_entry); + dlist_remove(&rx_entry->entry); lnx_free_entry(&rx_entry->rx_entry); goto out; } - if (flags & FI_CLAIM) + if (flags & FI_CLAIM) { + dlist_remove(&rx_entry->entry); ((struct fi_context *)context)->internal[0] = rx_entry; + } out: return rc;