Skip to content

Commit

Permalink
ml/cnxk: fix fast-path synchronization
Browse files Browse the repository at this point in the history
Segfaults are reported with TVM/LLVM models as NULL value
is read by dequeue thread for the op handle. This is due
synchronization issue between enqueue and dequeue threads.

This fix ensures the op handle written to internal request
structure is committed before the dequeue threads read the
handle value.

Fixes: 88001b4 ("ml/cnxk: update fast path functions")

Signed-off-by: Srikanth Yalavarthi <[email protected]>
  • Loading branch information
syalavarthi authored and jerinjacobk committed Nov 13, 2023
1 parent e43dc93 commit 737faa1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ml/cnxk/cnxk_ml_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,7 @@ cnxk_ml_enqueue_burst(struct rte_ml_dev *dev, uint16_t qp_id, struct rte_ml_op *
jcmdq_full:
queue->head = head;
qp->stats.enqueued_count += count;
rte_wmb();

return count;
}
Expand Down

0 comments on commit 737faa1

Please sign in to comment.