[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 3/3] Log outstanding packet count when miniport is disabled
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xennet/adapter.c | 4 ++++ src/xennet/receiver.c | 24 ++++++++++++++++++++++++ src/xennet/receiver.h | 10 ++++++++++ 3 files changed, 38 insertions(+) diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c index 9a062e1..637ac72 100644 --- a/src/xennet/adapter.c +++ b/src/xennet/adapter.c @@ -1932,6 +1932,8 @@ AdapterEnable( if (!NT_SUCCESS(status)) goto fail4; + ReceiverEnable(Adapter->Receiver); + AdapterMediaStateChange(Adapter); Adapter->Enabled = TRUE; @@ -1959,6 +1961,8 @@ AdapterDisable( ASSERT(Adapter->Enabled); Adapter->Enabled = FALSE; + ReceiverDisable(Adapter->Receiver); + XENVIF_VIF(Disable, &Adapter->VifInterface); diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c index 36a153b..043db53 100644 --- a/src/xennet/receiver.c +++ b/src/xennet/receiver.c @@ -378,11 +378,15 @@ __ReceiverPushPackets( KeReleaseSpinLockFromDpcLevel(&Queue->Lock); Indicated = InterlockedAdd(&Receiver->Indicated, Count); + + KeMemoryBarrier(); + Returned = Receiver->Returned; Flags = NDIS_RECEIVE_FLAGS_DISPATCH_LEVEL | NDIS_RECEIVE_FLAGS_PERFECT_FILTERED; + ASSERT3S(Indicated - Returned, >=, 0); if (Indicated - Returned > IN_NDIS_MAX) Flags |= NDIS_RECEIVE_FLAGS_RESOURCES; @@ -571,3 +575,23 @@ ReceiverOffloadOptions( { return &Receiver->OffloadOptions; } + +VOID +ReceiverEnable( + IN PXENNET_RECEIVER Receiver + ) +{ + UNREFERENCED_PARAMETER(Receiver); + + Info("<====>\n"); +} + +VOID +ReceiverDisable( + IN PXENNET_RECEIVER Receiver + ) +{ + Info("<====> (Indicated = %u Returned = %u)\n", + Receiver->Indicated, + Receiver->Returned); +} diff --git a/src/xennet/receiver.h b/src/xennet/receiver.h index 5b59431..5fc9e66 100644 --- a/src/xennet/receiver.h +++ b/src/xennet/receiver.h @@ -76,4 +76,14 @@ ReceiverOffloadOptions( IN PXENNET_RECEIVER Receiver ); +extern VOID +ReceiverEnable( + IN PXENNET_RECEIVER Receiver + ); + +extern VOID +ReceiverDisable( + IN PXENNET_RECEIVER Receiver + ); + #endif // _XENNET_RECEIVER_H_ -- 2.5.3 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |