netkvm: do not complete packets in sending path
Complete packets (i.e. get buffers from TX queue and
process waiting list) only when called from DPC (on
TX completion DPC or RX DPC). According to the tests
thos solves assertion "pCurrentNetBufferList" in the
NDPROT630 driver.
@@ -424,11 +424,22 @@ void CParaNdisTX::NBLMappingDone(CNBL *NBLHolder)
if (NBLHolder->MappingSucceeded() && m_VirtQueue.Alive())
{
m_SendQueue.Enqueue(NBLHolder);
+ // do not do anything if there is dpc processing for this TX
+ if (m_DpcWaiting) {
+ return;
+ }
- if (m_DpcWaiting == 0)
- {
+#if defined(ENABLE_COMPLETE_FROM_SEND)
DoPendingTasks(NBLHolder);
+#else
+ CRawCNBList nbToFree;
+ CRawCNBLList completedNBLs;
+ {
+ TDPCSpinLocker LockedContext(m_Lock);
+ SendMapped(false, completedNBLs);
}
+ PostProcessPendingTask(nbToFree, completedNBLs);
+#endif
}
else
{
