-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
src/core/lookup.c
Outdated
CxPlatListPopEntry(&CID->HashEntries), | ||
QUIC_CID_HASH_ENTRY, | ||
Link); | ||
QuicLookupRemoveLocalCidInt(&CID1->Binding->Lookup, CID1); |
There was a problem hiding this comment.
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?
src/core/connection.h
Outdated
CXPLAT_LIST_ENTRY Link; | ||
QUIC_CONNECTION *Connection; | ||
} QUIC_CONNECTION_LIST_ENTRY; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This struct not necessary.
src/core/connection.c
Outdated
CXPLAT_FREE(SourceCid, QUIC_POOL_CIDHASH); | ||
|
||
BOOLEAN Collision = FALSE; | ||
|
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
src/core/connection.c
Outdated
for (uint8_t i = 0; i < Connection->PathsCount; ++i) { | ||
if (Connection->Paths[i].Binding != NULL) { | ||
QuicBindingAddSourceConnectionID(Connection->Paths[i].Binding, SourceCid); | ||
} | ||
} |
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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; | ||
} | ||
} |
There was a problem hiding this comment.
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.
if (!Collision) { | ||
for (uint8_t i = 0; i < Connection->PathsCount; ++i) { | ||
if (Connection->Paths[i].Binding != NULL) { | ||
QuicBindingAddSourceConnectionID(Connection->Paths[i].Binding, SourceCid); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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.
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