Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UPG proxy race conditions for multi core setup #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sergeymatov
Copy link
Contributor

  • If UPF session is already deleted by PFCP server, packets should not invoke proxy connection.
  • if UPF session is in a deletion process (disabled, but not yet deleted), it will have no active rules. Prevent crash and don't connect proxy session in this case.

fixes #185 and #186

@sergeymatov sergeymatov linked an issue Oct 29, 2021 that may be closed by this pull request
@@ -364,6 +364,12 @@ proxy_start_connect_fn (const u32 * session_index)

/* TODO: RACE: should not access the flow on the main thread */
flow = pool_elt_at_index (fm->flows, ps->flow_index);
if (pool_is_free_index (gtm->sessions, flow->session_index))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look exactly like a fix, isn't that more of a workaround? The idea which was mentioned in the comment above is that with a separate single worker thread, we should only access the flowable from that worker thread. With multiple workers, things become harder as we have concurrent access to the flowtable from multiple workers. So perhaps we should add a comment that we still have a race here, and create a follow-up issue for proper multithreaded flowtable handling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UPG Crash on multi-core setup if Proxy is enabled UPG crash on multi-core setup in proxy mode
2 participants