-
Notifications
You must be signed in to change notification settings - Fork 548
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
Add support for both Qtip and UDP traffic for Server Listeners. #4803
base: main
Are you sure you want to change the base?
Changes from all commits
63a4f6f
4312eea
f865630
19354ee
a2511c3
2db51dd
0a1ec39
07aedfd
ae85b9f
cf38283
1c9fa0b
93ff078
ba3c146
c7b920a
ebd9fd9
5b2de37
b590242
5486743
1495588
cae946f
6629817
1adaad5
455b833
1c0c411
0f5a6c6
a68f0f5
64a9dff
38ba016
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,8 @@ | |
#if DEBUG | ||
Connection->RefTypeCount[QUIC_CONN_REF_HANDLE_OWNER] = 1; | ||
#endif | ||
Connection->State.UseQTIP = 0; | ||
Connection->State.AppDidSetQTIP = 0; | ||
Connection->PartitionID = PartitionId; | ||
Connection->State.Allocated = TRUE; | ||
Connection->State.ShareBinding = IsServer; | ||
|
@@ -6753,6 +6755,15 @@ | |
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
#endif | ||
case QUIC_PARAM_CONN_QTIP: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These case statements should be kept ordered by value. |
||
if (BufferLength != sizeof(BOOLEAN) || Buffer == NULL) { | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
break; | ||
} | ||
Connection->State.UseQTIP = *(BOOLEAN*)Buffer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't let them change after the connection has been started. |
||
Connection->State.AppDidSetQTIP = TRUE; | ||
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
|
||
default: | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
|
@@ -7284,6 +7295,24 @@ | |
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
|
||
case QUIC_PARAM_CONN_QTIP: | ||
if (*BufferLength < sizeof(BOOLEAN)) { | ||
*BufferLength = sizeof(BOOLEAN); | ||
Status = QUIC_STATUS_BUFFER_TOO_SMALL; | ||
break; | ||
} | ||
|
||
if (Buffer == NULL) { | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
break; | ||
} | ||
|
||
*BufferLength = sizeof(BOOLEAN); | ||
*(BOOLEAN*)Buffer = Connection->State.UseQTIP; | ||
|
||
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
|
||
default: | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
break; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -769,6 +769,17 @@ | |
return QUIC_STATUS_SUCCESS; | ||
} | ||
|
||
if (Param == QUIC_PARAM_LISTENER_QTIP) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably convert this function back to using a switch statement now that there is more than one. |
||
if (BufferLength > sizeof(uint8_t)) { | ||
return QUIC_STATUS_INVALID_PARAMETER; | ||
} | ||
if (Buffer == NULL) { | ||
return QUIC_STATUS_INVALID_PARAMETER; | ||
} | ||
Listener->UseQTIP = *(uint8_t*)Buffer; | ||
return QUIC_STATUS_SUCCESS; | ||
} | ||
|
||
return QUIC_STATUS_INVALID_PARAMETER; | ||
} | ||
|
||
|
@@ -855,6 +866,25 @@ | |
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
|
||
case QUIC_PARAM_LISTENER_QTIP: | ||
|
||
if (*BufferLength < sizeof(uint8_t)) { | ||
*BufferLength = sizeof(uint8_t); | ||
Status = QUIC_STATUS_BUFFER_TOO_SMALL; | ||
break; | ||
} | ||
|
||
if (Buffer == NULL) { | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
break; | ||
} | ||
|
||
*BufferLength = sizeof(uint8_t); | ||
*(uint8_t*)Buffer = Listener->UseQTIP; | ||
|
||
Status = QUIC_STATUS_SUCCESS; | ||
break; | ||
|
||
default: | ||
Status = QUIC_STATUS_INVALID_PARAMETER; | ||
break; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,11 @@ typedef struct QUIC_LISTENER { | |
// | ||
uint8_t CibirId[2 + QUIC_MAX_CIBIR_LENGTH]; | ||
|
||
// | ||
// Whether or not this listener accepts QTIP traffic (BOOLEAN) | ||
// | ||
uint8_t UseQTIP : 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this a boolean and put it up with the others for now. |
||
|
||
} QUIC_LISTENER; | ||
|
||
#ifdef QUIC_SILO | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,6 +210,8 @@ typedef struct CXPLAT_ROUTE { | |
CXPLAT_ROUTE_STATE State; | ||
CXPLAT_RAW_TCP_STATE TcpState; | ||
|
||
uint8_t UseQTIP : 1; // TRUE if the route is using QTIP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put this after DatapathType |
||
uint8_t AppDidSetQTIP : 1; // TRUE if the app explicitly set the UseQTIP flag | ||
} CXPLAT_ROUTE; | ||
|
||
// | ||
|
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.
Unnecessary as we always zero-init the entire connection.