-
Notifications
You must be signed in to change notification settings - Fork 180
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
Need API to signal when adding a new path is possible #1835
Comments
There is another issue with The code also verifies the client address family, and check that it matches the "initial" value. But we could see the case of initiating a connection with IPv4, then switching to IPv6 if the server provides a preferred IPv6 address. |
I agree, having better API's would make this easier for user of the library. I feel like option 1 and option 2 both seem like good choices, however if we choose option 3, it feels like we will be restricting the control the user of the API has, in case they later want to not create the new path after it has been queued. In option 1 I can see how an implementation might be done, but in option 2 I have a question. Where is the client expected to call this path creation function, since the control flow would be inside the picoquic_packet_loop, and if the user needs to call the somewhere function inside the packet loop code then isn't the purpose creation of this API lost? |
I have a PR in progress to add the error codes to
The PR will also allow applications to leave the destination address parameter NULL, in which case the code will pick the default address for the server that matches the address family of the source address. The "path limit exceeded" compares the number of current paths to the compilation parameter Regarding the need for a signal that multipath is ready, we need to elements: checking whether ready, and being informed. |
Regarding the application flow, I believe that this really falls within the application callback. The current |
@sanjaybhat2004 you may want to check PR #1836 "Use path allowed API for testing multipath". |
Looks good, hopefully it makes the work of adding new paths easier for people using the library! |
When the multipath option is enabled, applications will want to create new paths based on their own logic: when they learn that a new network interface becomes available, when something goes wrong with and existing path, maybe when the load profile of the application changes. The new path should use the next available
path_id
N
, but knowing thatpath_id=N
is not sufficient. Creating a new path is only possible if both endpoints have agreed to enable that new path:max_path_id >= N
path_id = N
The implementation in
picoquic_demo
checks these conditions in the "network loop" callback, in the handling ofpicoquic_packet_loop_after_receive
, by checking:There are several issues with that:
picoquic_obtain_stashed_cnxid
is an internal API, which may well be need to be redesigned over time as we get more experience in handling multipath.1
in the line above is aunique_path_id
, but the application would need to track successive path creation attempts to track the correct value.The code would be simpler and more efficient if we had better APIs:
picoquic_probe_new_path_ex
, so the application can just try to create a new path but get informed when some condition is not met yet -- instead of adding a bunch of logic to test these conditions in the application code.picoquic_probe_new_path_ex
, such as queuing path creation until the necessary conditions are met.The text was updated successfully, but these errors were encountered: