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

[WIP] API for probing a new path. #1

Closed
wants to merge 8 commits into from
Closed

[WIP] API for probing a new path. #1

wants to merge 8 commits into from

Conversation

masa-koz
Copy link
Owner

Description

I'm trying to add an API for probing a new path (QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS).

Testing

I've added a new test ("Basic/WithProbePathArgs.ProbePath/*").

Documentation

N/A

src/core/binding.h Outdated Show resolved Hide resolved
src/core/lookup.c Fixed Show fixed Hide fixed
CxPlatListPopEntry(&CID->HashEntries),
QUIC_CID_HASH_ENTRY,
Link);
QuicLookupRemoveLocalCidInt(&CID1->Binding->Lookup, CID1);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Acquiring lock for this lookup is missing. But this function should be removed?

CXPLAT_LIST_ENTRY Link;
QUIC_CONNECTION *Connection;
} QUIC_CONNECTION_LIST_ENTRY;

Copy link
Owner Author

Choose a reason for hiding this comment

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

This struct not necessary.

CXPLAT_FREE(SourceCid, QUIC_POOL_CIDHASH);

BOOLEAN Collision = FALSE;

Copy link
Owner Author

Choose a reason for hiding this comment

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

Acquiring MsQuicLib.DatapathLock is missing.

if (Entry1->Binding == Binding) {
QuicBindingRemoveSourceConnectionID(Binding, Entry1);
*Link1 = (*Link1)->Next;
CxPlatListPushEntry(&EntriesToFree, &Entry1->Link);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Can't you free it here?

Comment on lines 997 to 1001
for (uint8_t i = 0; i < Connection->PathsCount; ++i) {
if (Connection->Paths[i].Binding != NULL) {
QuicBindingAddSourceConnectionID(Connection->Paths[i].Binding, SourceCid);
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Shouldn't you move this to the insider of lock?

@@ -6564,6 +6675,153 @@ QuicConnParamSet(
return QUIC_STATUS_SUCCESS;
}

case QUIC_PARAM_CONN_ADD_LOCAL_ADDRESS: {
Copy link
Owner Author

Choose a reason for hiding this comment

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

NEW_LOCAL_ADDRESS instead?

LocalAddress)) {
break;
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Check whether the local address already contains.

Comment on lines +950 to +956
if (!Collision) {
for (uint8_t i = 0; i < Connection->PathsCount; ++i) {
if (Connection->Paths[i].Binding != NULL) {
QuicBindingAddSourceConnectionID(Connection->Paths[i].Binding, SourceCid);
}
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Move to outer of loop.

@masa-koz masa-koz closed this Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants