Skip to content

Commit

Permalink
examples/l2fwd-event: fix spinlock handling
Browse files Browse the repository at this point in the history
Detected by pvs-studio
Bug 89-93: very suspicious synchronization
The analyzer issued a pack of V1020 warnings that a resource
might remain blocked.

Fixes: 080f57b ("examples/l2fwd-event: add eventdev main loop")
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Hemant Agrawal <[email protected]>
  • Loading branch information
hemantagr authored and jerinjacobk committed Nov 18, 2024
1 parent 78383e9 commit 1b77005
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/l2fwd-event/l2fwd_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ l2fwd_get_free_event_port(struct l2fwd_event_resources *evt_rsrc)
rte_spinlock_lock(&evt_rsrc->evp.lock);
if (index >= evt_rsrc->evp.nb_ports) {
printf("No free event port is available\n");
rte_spinlock_unlock(&evt_rsrc->evp.lock);
return -1;
}

Expand Down

0 comments on commit 1b77005

Please sign in to comment.