Skip to content

Commit

Permalink
netkvm: start/stop trigger for lazy allocation thread
Browse files Browse the repository at this point in the history
Jira link: https://issues.redhat.com/browse/RHEL-40693
Start the thread when the initialization is finished
successfully, the thread starts allocate additional RX
memory. On disable - the first thing to do is to stop
the thread and wait until it is finished.

Signed-off-by: Yuri Benditovich <[email protected]>
  • Loading branch information
ybendito committed Dec 23, 2024
1 parent 93b6c71 commit 16d4ae1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NetKVM/Common/ndis56common.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ struct _PARANDIS_ADAPTER : public CNdisAllocatable<_PARANDIS_ADAPTER, 'DCTX'>
BOOLEAN bRSSSupportedByDevice = false;
BOOLEAN bRSSSupportedByDevicePersistent = false;
BOOLEAN bHashReportedByDevice = false;
CSystemThread systemThread;

#if PARANDIS_SUPPORT_RSS
BOOLEAN bRSSOffloadSupported = false;
Expand Down
2 changes: 2 additions & 0 deletions NetKVM/wlh/ParaNdis6_Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ static NDIS_STATUS ParaNdis6_Initialize(
pContext->m_StateMachine.NotifyInitialized(pContext);
ParaNdis_DebugRegisterMiniport(pContext, TRUE);
ParaNdis_ProtocolRegisterAdapter(pContext);
pContext->systemThread.Start(pContext);
}
else
{
Expand All @@ -353,6 +354,7 @@ static VOID ParaNdis6_Halt(NDIS_HANDLE miniportAdapterContext, NDIS_HALT_ACTION
{
PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)miniportAdapterContext;
DEBUG_ENTRY(0);
pContext->systemThread.Stop();
ParaNdis_DebugHistory(pContext, _etagHistoryLogOperation::hopHalt, NULL, 1, haltAction, 0);
ParaNdis_ProtocolUnregisterAdapter(pContext);
ParaNdis_DebugHistory(pContext, _etagHistoryLogOperation::hopHalt, NULL, 0, 0, 0);
Expand Down

0 comments on commit 16d4ae1

Please sign in to comment.