[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [win-pv-devel] [PATCH] Reduce xenstore churn
On Wed, 13 Nov 2019 at 15:44, Owen Smith <owen.smith@xxxxxxxxxx> wrote: > > Only write the complete changes to the xenstore MAC address table. There > is no need to write the complete table for each addition or removal, > when additions and removals are processed in a single update. > > Pushes the responsibility for writing the MAC table to > FrontendSetMulticastAddresses() once all changes are made, instead of > for each call to MacAddMulticastAddress() or MacRemoveMulticastAddress() > > Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> Acked-by: Paul Durrant <paul@xxxxxxx> > --- > src/xenvif/frontend.c | 7 +++++++ > src/xenvif/mac.c | 6 +----- > src/xenvif/mac.h | 5 +++++ > 3 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c > index 3e31654..0ed68df 100644 > --- a/src/xenvif/frontend.c > +++ b/src/xenvif/frontend.c > @@ -989,6 +989,7 @@ FrontendSetMulticastAddresses( > ULONG MulticastCount; > ULONG MulticastIndex; > ULONG Index; > + BOOLEAN Change; > NTSTATUS status; > > Transmitter = FrontendGetTransmitter(Frontend); > @@ -1015,6 +1016,7 @@ FrontendSetMulticastAddresses( > } else > MulticastAddress = NULL; > > + Change = FALSE; > for (Index = 0; Index < Count; Index++) { > BOOLEAN Found; > > @@ -1042,6 +1044,7 @@ FrontendSetMulticastAddresses( > (VOID) TransmitterQueueMulticastControl(Transmitter, > &Address[Index], > TRUE); > + Change = TRUE; > } > } > > @@ -1058,11 +1061,15 @@ FrontendSetMulticastAddresses( > FALSE); > (VOID) MacRemoveMulticastAddress(Mac, > &MulticastAddress[MulticastIndex]); > + Change = TRUE; > } > > if (MulticastAddress != NULL) > __FrontendFree(MulticastAddress); > > + if (Change) > + (VOID) MacDumpAddressTable(Mac); > + > KeLowerIrql(Irql); > > return STATUS_SUCCESS; > diff --git a/src/xenvif/mac.c b/src/xenvif/mac.c > index 0b17a54..19666fe 100644 > --- a/src/xenvif/mac.c > +++ b/src/xenvif/mac.c > @@ -295,7 +295,7 @@ __MacReleaseLockShared( > ExReleaseSpinLockSharedFromDpcLevel(&Mac->Lock); > } > > -static NTSTATUS > +NTSTATUS > MacDumpAddressTable( > IN PXENVIF_MAC Mac > ) > @@ -852,8 +852,6 @@ MacAddMulticastAddress( > __MacReleaseLockExclusive(Mac); > KeLowerIrql(Irql); > > - (VOID) MacDumpAddressTable(Mac); > - > Trace("%s: %02X:%02X:%02X:%02X:%02X:%02X\n", > FrontendGetPrefix(Frontend), > Address->Byte[0], > @@ -914,8 +912,6 @@ found: > __MacReleaseLockExclusive(Mac); > KeLowerIrql(Irql); > > - (VOID) MacDumpAddressTable(Mac); > - > Trace("%s: %02X:%02X:%02X:%02X:%02X:%02X\n", > FrontendGetPrefix(Frontend), > Address->Byte[0], > diff --git a/src/xenvif/mac.h b/src/xenvif/mac.h > index 83ce5b8..9340f01 100644 > --- a/src/xenvif/mac.h > +++ b/src/xenvif/mac.h > @@ -95,6 +95,11 @@ MacQueryBroadcastAddress( > OUT PETHERNET_ADDRESS Address > ); > > +extern NTSTATUS > +MacDumpAddressTable( > + IN PXENVIF_MAC Mac > + ); > + > extern NTSTATUS > MacAddMulticastAddress( > IN PXENVIF_MAC Mac, > -- > 2.16.2.windows.1 > > > _______________________________________________ > win-pv-devel mailing list > win-pv-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/win-pv-devel _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |