Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Dec 3, 2023
1 parent 48edd6c commit c959815
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
16 changes: 8 additions & 8 deletions scripts/RemoteTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
"Name": "ConnectionCount",
"Local": {
"1": "-conns:1 -requests:1 -runtime:30000",
"40": "-conns:40 -requests:20 -runtime:10000",
"250": "-conns:250 -requests:7500 -runtime:10000",
"40": "-conns:40 -requests:1 -runtime:10000",
"250": "-conns:250 -requests:30 -runtime:10000",
"1000": "-conns:1 -requests:1000 -runtime:10000"
},
"Default": "250"
Expand Down Expand Up @@ -264,8 +264,8 @@
"Name": "ConnectionCount",
"Local": {
"1": "-conns:1 -requests:1 -runtime:30000",
"40": "-conns:40 -requests:20 -runtime:10000",
"250": "-conns:250 -requests:7500 -runtime:10000",
"40": "-conns:40 -requests:1 -runtime:10000",
"250": "-conns:250 -requests:30 -runtime:10000",
"1000": "-conns:1 -requests:1000 -runtime:10000"
},
"Default": "250"
Expand Down Expand Up @@ -309,8 +309,8 @@
"Name": "ConnectionCount",
"Local": {
"1": "-conns:1 -requests:1 -runtime:30000",
"40": "-conns:40 -requests:20 -runtime:10000",
"250": "-conns:250 -requests:7500 -runtime:10000",
"40": "-conns:40 -requests:1 -runtime:10000",
"250": "-conns:250 -requests:30 -runtime:10000",
"1000": "-conns:1 -requests:1000 -runtime:10000"
},
"Default": "250"
Expand Down Expand Up @@ -354,8 +354,8 @@
"Name": "ConnectionCount",
"Local": {
"1": "-conns:1 -requests:1 -runtime:30000",
"40": "-conns:40 -requests:20 -runtime:10000",
"250": "-conns:250 -requests:7500 -runtime:10000",
"40": "-conns:40 -requests:1 -runtime:10000",
"250": "-conns:250 -requests:30 -runtime:10000",
"1000": "-conns:1 -requests:1000 -runtime:10000"
},
"Default": "250"
Expand Down
1 change: 1 addition & 0 deletions src/inc/msquic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct CxPlatLockDispatch {
CXPLAT_DISPATCH_LOCK Handle;
CxPlatLockDispatch() noexcept { CxPlatDispatchLockInitialize(&Handle); }
~CxPlatLockDispatch() noexcept { CxPlatDispatchLockUninitialize(&Handle); }
_IRQL_raises_(DISPATCH_LEVEL)
void Acquire() noexcept { CxPlatDispatchLockAcquire(&Handle); }
void Release() noexcept { CxPlatDispatchLockRelease(&Handle); }
};
Expand Down
13 changes: 4 additions & 9 deletions src/perf/lib/Tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ TcpEngine::~TcpEngine() noexcept
// Loop over all connections and shut them down.
ConnectionLock.Acquire();
while (!CxPlatListIsEmpty(&Connections)) {
auto Connection =
CXPLAT_CONTAINING_RECORD(
CxPlatListRemoveHead(&Connections),
TcpConnection,
EngineEntry);
auto Connection = (TcpConnection*)CxPlatListRemoveHead(&Connections);
Connection->EngineEntry.Flink = NULL;
Connection->Shutdown = true;
Connection->TotalSendCompleteOffset = UINT64_MAX;
Expand Down Expand Up @@ -364,7 +360,7 @@ TcpConnection::TcpConnection(
}
}
QuicAddrSetPort(&Route.RemoteAddress, ServerPort);
Engine->AddConnection(this, 0); // TODO - Correct index
Engine->AddConnection(this, (uint16_t)CxPlatProcCurrentNumber());
Initialized = true;
if (QUIC_FAILED(
CxPlatSocketCreateTcp(
Expand Down Expand Up @@ -396,7 +392,7 @@ TcpConnection::TcpConnection(
this);
Initialized = true;
IndicateAccept = true;
Engine->AddConnection(this, 0); // TODO - Correct index
Engine->AddConnection(this, (uint16_t)CxPlatProcCurrentNumber());
Queue();
}

Expand Down Expand Up @@ -1070,8 +1066,7 @@ void TcpConnection::Close()
PerfTcpAppClose,
"[perf][tcp][%p] App Close",
this);
BOOLEAN IsWorkerThread = WorkerThreadID == CxPlatCurThreadID();
if (IsWorkerThread) {
if (WorkerThreadID == CxPlatCurThreadID()) {
ClosedByApp = true;
Shutdown = true;
TotalSendCompleteOffset = UINT64_MAX;
Expand Down
2 changes: 1 addition & 1 deletion src/perf/lib/Tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class TcpConnection {
friend class TcpEngine;
friend class TcpWorker;
friend class TcpServer;
CXPLAT_LIST_ENTRY EngineEntry; // Must be first
bool IsServer;
bool Initialized{false};
bool Shutdown{false};
Expand All @@ -176,7 +177,6 @@ class TcpConnection {
bool IndicateConnect{false};
bool IndicateSendComplete{false};
TcpConnection* Next{nullptr};
CXPLAT_LIST_ENTRY EngineEntry;
TcpEngine* Engine;
TcpWorker* Worker{nullptr};
CXPLAT_THREAD_ID WorkerThreadID{0};
Expand Down

0 comments on commit c959815

Please sign in to comment.