[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [win-pv-devel] [PATCH 1/2] Update cache_interface header
> -----Original Message----- > From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of > Owen Smith > Sent: 08 July 2019 10:45 > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Owen Smith <owen.smith@xxxxxxxxxx> > Subject: [win-pv-devel] [PATCH 1/2] Update cache_interface header > > Requires bumping the INF revision and revision table Actually XENNET doesn't use the cache interface any more, but it's harder to stop exposing it... So, Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > > Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> > --- > include/cache_interface.h | 34 ++++++++++++++++++++++++++++++++-- > include/revision.h | 3 ++- > src/xenvif.inf | 6 +++--- > src/xenvif/receiver.c | 2 ++ > src/xenvif/transmitter.c | 5 +++++ > 5 files changed, 44 insertions(+), 6 deletions(-) > > diff --git a/include/cache_interface.h b/include/cache_interface.h > index dae3ac6..ce50f4e 100644 > --- a/include/cache_interface.h > +++ b/include/cache_interface.h > @@ -123,6 +123,20 @@ typedef VOID > IN PVOID Argument > ); > > +typedef NTSTATUS > +(*XENBUS_CACHE_CREATE_V1)( > + IN PINTERFACE Interface, > + IN const CHAR *Name, > + IN ULONG Size, > + IN ULONG Reservation, > + IN XENBUS_CACHE_CTOR Ctor, > + IN XENBUS_CACHE_DTOR Dtor, > + IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, > + IN XENBUS_CACHE_RELEASE_LOCK ReleaseLock, > + IN PVOID Argument OPTIONAL, > + OUT PXENBUS_CACHE *Cache > + ); > + > /*! \typedef XENBUS_CACHE_CREATE > \brief Create a cache of objects of the given \a Size > > @@ -130,6 +144,7 @@ typedef VOID > \param Name A name for the cache which will be used in debug output > \param Size The size of each object in bytes > \param Reservation The target minimum population of the cache > + \param Cap The maximum population of the cache > \param Ctor A callback which is invoked when a new object created > \param Dtor A callback which is invoked when an object is destroyed > \param AcquireLock A callback invoked to acquire a spinlock > @@ -146,6 +161,7 @@ typedef NTSTATUS > IN const CHAR *Name, > IN ULONG Size, > IN ULONG Reservation, > + IN ULONG Cap, > IN XENBUS_CACHE_CTOR Ctor, > IN XENBUS_CACHE_DTOR Dtor, > IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, > @@ -208,6 +224,20 @@ DEFINE_GUID(GUID_XENBUS_CACHE_INTERFACE, > \ingroup interfaces > */ > struct _XENBUS_CACHE_INTERFACE_V1 { > + INTERFACE Interface; > + XENBUS_CACHE_ACQUIRE CacheAcquire; > + XENBUS_CACHE_RELEASE CacheRelease; > + XENBUS_CACHE_CREATE_V1 CacheCreateVersion1; > + XENBUS_CACHE_GET CacheGet; > + XENBUS_CACHE_PUT CachePut; > + XENBUS_CACHE_DESTROY CacheDestroy; > +}; > + > +/*! \struct _XENBUS_CACHE_INTERFACE_V2 > + \brief CACHE interface version 1 > + \ingroup interfaces > +*/ > +struct _XENBUS_CACHE_INTERFACE_V2 { > INTERFACE Interface; > XENBUS_CACHE_ACQUIRE CacheAcquire; > XENBUS_CACHE_RELEASE CacheRelease; > @@ -217,7 +247,7 @@ struct _XENBUS_CACHE_INTERFACE_V1 { > XENBUS_CACHE_DESTROY CacheDestroy; > }; > > -typedef struct _XENBUS_CACHE_INTERFACE_V1 XENBUS_CACHE_INTERFACE, > *PXENBUS_CACHE_INTERFACE; > +typedef struct _XENBUS_CACHE_INTERFACE_V2 XENBUS_CACHE_INTERFACE, > *PXENBUS_CACHE_INTERFACE; > > /*! \def XENBUS_CACHE > \brief Macro at assist in method invocation > @@ -228,6 +258,6 @@ typedef struct _XENBUS_CACHE_INTERFACE_V1 > XENBUS_CACHE_INTERFACE, *PXENBUS_CACHE > #endif // _WINDLL > > #define XENBUS_CACHE_INTERFACE_VERSION_MIN 1 > -#define XENBUS_CACHE_INTERFACE_VERSION_MAX 1 > +#define XENBUS_CACHE_INTERFACE_VERSION_MAX 2 > > #endif // _XENBUS_CACHE_INTERFACE_H > diff --git a/include/revision.h b/include/revision.h > index 9382e43..39476b2 100644 > --- a/include/revision.h > +++ b/include/revision.h > @@ -43,6 +43,7 @@ > DEFINE_REVISION(0x0800000B, 1, 6, 2, 1), \ > DEFINE_REVISION(0x0800000C, 1, 7, 2, 1), \ > DEFINE_REVISION(0x0800000D, 1, 8, 2, 1), \ > - DEFINE_REVISION(0x09000000, 1, 8, 2, 1) > + DEFINE_REVISION(0x09000000, 1, 8, 2, 1), \ > + DEFINE_REVISION(0x09000001, 2, 8, 2, 1) > > #endif // _REVISION_H > diff --git a/src/xenvif.inf b/src/xenvif.inf > index e2fd633..ee7ccdc 100644 > --- a/src/xenvif.inf > +++ b/src/xenvif.inf > @@ -59,9 +59,9 @@ > xenvif_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll > ; DisplayName Section DeviceID > ; ----------- ------- -------- > > -%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VIF&REV_09000004 > -%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VIF&REV_09000004 > -%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VIF&REV_09000004 > +%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VIF&REV_09000005 > +%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VIF&REV_09000005 > +%XenVifName% =XenVif_Inst, > XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VIF&REV_09000005 > > [XenVif_Inst] > CopyFiles=XenVif_Copyfiles > diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c > index 32bc424..7125743 100644 > --- a/src/xenvif/receiver.c > +++ b/src/xenvif/receiver.c > @@ -2454,6 +2454,7 @@ __ReceiverRingInitialize( > Name, > sizeof (XENVIF_RECEIVER_PACKET), > 0, > + 0, > ReceiverPacketCtor, > ReceiverPacketDtor, > ReceiverRingAcquireLock, > @@ -2479,6 +2480,7 @@ __ReceiverRingInitialize( > Name, > sizeof (XENVIF_RECEIVER_FRAGMENT), > 0, > + 0, > ReceiverFragmentCtor, > ReceiverFragmentDtor, > ReceiverRingAcquireLock, > diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c > index a5e2e72..6a4db1f 100644 > --- a/src/xenvif/transmitter.c > +++ b/src/xenvif/transmitter.c > @@ -3445,6 +3445,7 @@ __TransmitterRingInitialize( > Name, > sizeof (XENVIF_TRANSMITTER_BUFFER), > 0, > + 0, > TransmitterBufferCtor, > TransmitterBufferDtor, > TransmitterRingAcquireLock, > @@ -3470,6 +3471,7 @@ __TransmitterRingInitialize( > Name, > sizeof (XENVIF_TRANSMITTER_MULTICAST_CONTROL), > 0, > + 0, > TransmitterMulticastControlCtor, > TransmitterMulticastControlDtor, > TransmitterRingAcquireLock, > @@ -3521,6 +3523,7 @@ __TransmitterRingInitialize( > Name, > sizeof (XENVIF_TRANSMITTER_FRAGMENT), > 0, > + 0, > TransmitterFragmentCtor, > TransmitterFragmentDtor, > TransmitterRingAcquireLock, > @@ -3546,6 +3549,7 @@ __TransmitterRingInitialize( > Name, > sizeof (XENVIF_TRANSMITTER_REQUEST), > 0, > + 0, > TransmitterRequestCtor, > TransmitterRequestDtor, > TransmitterRingAcquireLock, > @@ -4536,6 +4540,7 @@ TransmitterInitialize( > Name, > sizeof (XENVIF_TRANSMITTER_PACKET), > XENVIF_PACKET_CACHE_RESERVATION, > + 0, > TransmitterPacketCtor, > TransmitterPacketDtor, > TransmitterPacketAcquireLock, > -- > 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 |