Skip to content

Commit f02e49f

Browse files
aingersonj-xiong
authored andcommitted
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 <alexia.ingerson@intel.com>
1 parent 81e66c8 commit f02e49f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

prov/lnx/src/lnx_ops.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ lnx_discard(struct lnx_ep *lep, struct lnx_rx_entry *rx_entry, void *context)
284284
rx_entry->rx_entry.cq_data,
285285
rx_entry->rx_entry.tag);
286286

287+
dlist_remove(&rx_entry->entry);
287288
lnx_free_entry(&rx_entry->rx_entry);
288289

289290
return rc;
@@ -315,12 +316,17 @@ lnx_peek(struct lnx_ep *lep, struct lnx_match_attr *match_attr, void *context,
315316
rx_entry->rx_entry.tag);
316317

317318
if (flags & FI_DISCARD) {
319+
rc = rx_entry->rx_cep->cep_srx.peer_ops->discard_tag(
320+
&rx_entry->rx_entry);
321+
dlist_remove(&rx_entry->entry);
318322
lnx_free_entry(&rx_entry->rx_entry);
319323
goto out;
320324
}
321325

322-
if (flags & FI_CLAIM)
326+
if (flags & FI_CLAIM) {
327+
dlist_remove(&rx_entry->entry);
323328
((struct fi_context *)context)->internal[0] = rx_entry;
329+
}
324330

325331
out:
326332
return rc;

0 commit comments

Comments
 (0)