-
Notifications
You must be signed in to change notification settings - Fork 398
Hck rss bsod work in progress #1333
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
Conversation
0f6cab4
to
7896d63
Compare
484fb1a
to
dc5a7cc
Compare
class NBLHistory : public CNdisAllocatable<NBLHistory, 'NBLH'> | ||
{ | ||
DECLARE_CNDISLIST_ENTRY(NBLHistory); | ||
public: |
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.
in this case there should be extra line before access specifiers
DECLARE_CNDISLIST_ENTRY(NBLHistory); | ||
public: | ||
NBLHistory(LPCSTR Func, LPCSTR Title, LPCSTR ParameterMeaning, PVOID Parameter, LPCSTR ValueMeaning, ULONG Value); | ||
protected: |
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.
same here
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.
@Jedoku is this behavior configurable? I ask because this does not make too much sense.
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.
It's configured in .clang-format
EmptyLineBeforeAccessModifier: LogicalBlock
If we change it it will affect whole project
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.
@Jedoku If there is an option "don't mind" this will not request any change, correct? Is it?
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.
Leave
option should work
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (14)
- NetKVM/Common/DebugData.h: Language not supported
- NetKVM/Common/ParaNdis-TX.h: Language not supported
- NetKVM/Common/ParaNdis-Util.h: Language not supported
- NetKVM/Common/ParaNdis-VirtQueue.h: Language not supported
- NetKVM/Common/ParaNdis_Debug.cpp: Language not supported
- NetKVM/Common/ParaNdis_DebugHistory.h: Language not supported
- NetKVM/Common/ParaNdis_TX.cpp: Language not supported
- NetKVM/Common/ParaNdis_VirtQueue.cpp: Language not supported
- NetKVM/Common/ndis56common.h: Language not supported
- NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.cpp: Language not supported
- NetKVM/DebugTools/NetKVMDumpParser/NetKVMDumpParser.vcxproj: Language not supported
- NetKVM/wlh/ParaNdis6_Driver.cpp: Language not supported
- NetKVM/wlh/ParaNdis6_Impl.cpp: Language not supported
- NetKVM/wlh/ParaNdis6_Oid.cpp: Language not supported
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
When the device has one queue we do not need to analyze the hash and send NBLs one by one. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
This feature is disabled in production, we just fix the compilation problems when it is enabled. Signed-off-by: Yuri Benditovich <[email protected]>
Move the last TX completion timestamp from per-adapter context to per-queue context for better visibility. Signed-off-by: Yuri Benditovich <[email protected]>
Note that this is unsafe method and the result can be used only for information / tracking, not for decisions. Signed-off-by: Yuri Benditovich <[email protected]>
The new logic to support chains is placed under ifdef currently and the driver works in backward compatible mode when all the procedures related to chain information in the NBL are stubs. The new logic that takes in account NBL chain is: - Before we start mapping the NBL chain - all the CNBLs after first one have a reference to first CNBL in the chain. At this point the first CNBL has a counter of NBLs that follow it in the chain - The check whether the NBL is 'done' now modified. The mandatory condition, as before, is that all the NBs of the NBL are completed. Additional condition will be enabled in future when we define NBL_CHAINS. Then all the NBLs related to the same chain become 'done' at the same moment, when all of them are done. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Connection is src:dest IP addresses and ports, so for all the packets sent to specific connection the hash should be the same. We collect NBL chain till all the indirection indices are the same, then flush the chain to the TX queue and start a new chain. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
dc5a7cc
to
a8a6e3a
Compare
If defined (by default disabled by compilation) we keep the NBL history in the CNBL as a list of events. Especially useful for stuck NBL that has not completed. From the dump we'll be able to read the history. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
This is useful for logging of chained NBLs. Signed-off-by: Yuri Benditovich <[email protected]>
If one NB failed, the entire NBL is not send, so we need to reflect this in TX errors. Also adding printout in such a case. Signed-off-by: Yuri Benditovich <[email protected]>
Chain NBLs from the list of completed CNBLs as they appear in the list and do not invert them. Later we're going to add NBL chains from the 'first in chain' CNBLs. Signed-off-by: Yuri Benditovich <[email protected]>
Keep the order of NBLs wherever possible, i.e. push them at the end of waiting list and then process waiting list and remove from it all the completed NBLs, so that earlier NBLs are removed first. Signed-off-by: Yuri Benditovich <[email protected]>
Now we enable NBL chain support. Deliver entire NBL chain if one was provided in Send() call. Each CNBL created for each 'next' NBL (following to the first one) on completion of all it's NBs detaches it's NBL and attaches it to the m_NBL of the first one. Such a way when all the CNBLs related to the same chain are ready, only first one has m_NBL (with all the rest of NBLs chained to it). For all the rest of CNBLs the m_NBL is NULL. The order of NBLs in the chain might be slightly different than original one (due to NB completions running simultaneously in different flows), for that the chain is tested and repaired if needed before it is indicated up. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
5aeca9f
to
c2d4571
Compare
Signed-off-by: Yuri Benditovich <[email protected]>
@kostyanf14 Win2022x64:
|
@@ -727,6 +727,11 @@ bool CParaNdisTX::SendMapped(bool IsInterrupt, CRawCNBLList &toWaitingList) | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
// carrier loss or removal |
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.
It should be on a "link loss".
NetKVM/wlh/ParaNdis6_Driver.cpp
Outdated
@@ -446,7 +446,7 @@ static VOID ParaNdis6_SendNetBufferLists(NDIS_HANDLE miniportAdapterContext, | |||
} | |||
#ifdef PARANDIS_SUPPORT_RSS | |||
CNdisPassiveReadAutoLock autoLock(pContext->RSSParameters.rwLock); | |||
if (pContext->RSS2QueueMap != nullptr) | |||
if (pContext->nPathBundles > 1 && pContext->RSS2QueueMap != nullptr) |
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.
+1
@@ -3,6 +3,7 @@ | |||
#include "ParaNdis-AbstractPath.h" | |||
#include "ParaNdis_GuestAnnounce.h" | |||
#include "ParaNdis_LockFreeQueue.h" | |||
#include "ParaNdis_DebugHistory.h" |
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.
Please submit this as a separate PR. It can already be merged and make future review easier.
Thanks!
@@ -324,7 +324,7 @@ UINT CTXVirtQueue::ReleaseTransmitBuffers(CRawCNBList &listDone) | |||
} | |||
if (i) | |||
{ | |||
NdisGetCurrentSystemTime(&m_Context->LastTxCompletionTimeStamp); | |||
UpdateTimestamp(m_LastTxCompletionTimestamp); |
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.
Also, can be submitted as a separate PR (or parts of refactoring/ ready for merge commits).
@@ -41,7 +41,7 @@ | |||
|
|||
FILE *outf = stdout; | |||
|
|||
typedef CString(*TimeStampConversionFunc)(LONGLONG BaseTime, LARGE_INTEGER TimeStamp); | |||
typedef CString (*TimeStampConversionFunc)(LONGLONG BaseTime, LARGE_INTEGER TimeStamp); |
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.
Please send it as part of a separate PR already
NBLHolder->SetStatus(NDIS_STATUS_FAILURE); | ||
// this is ok if this CNBL is not first one | ||
m_Context->Statistics.ifOutErrors += NBLHolder->NumberOfBuffers(); |
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.
BTW: For the acadenic interest, do you see this in practice? When?
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.
No, just to handle the error path and give some visibility in case it happens.
Not expected, some build bug.
need to update our env. |
@@ -941,7 +1070,9 @@ int ParseDumpFile(int argc, TCHAR *argv[]) | |||
} | |||
else | |||
{ | |||
PRINT("%s", SessionStatusValues[0].name); |
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.
Also can be submited for merge already.
@@ -18,14 +18,14 @@ | |||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |||
<ConfigurationType>Application</ConfigurationType> | |||
<PlatformToolset>v141</PlatformToolset> | |||
<PlatformToolset>v142</PlatformToolset> |
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 be submitted already. Shouldn't trigger HCCK-CI.
@ybendito Can we close this PR? |
For comments and testing only.