[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xenvif 2/4] Retire old versions of XENVIF_VIF_INTERFACE
From: Paul Durrant <pdurrant@xxxxxxxxxx> Version 8 of the interface has been available since commit 4ccb01e2e24bc ("Pass the receive queue index to XENNET") in 2016. That's ample time for deployed versions of XENNET to have been updated so let's retire interface versions older than that. Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> --- include/revision.h | 3 - include/vif_interface.h | 83 +-------------- src/xenvif/vif.c | 229 ---------------------------------------- 3 files changed, 1 insertion(+), 314 deletions(-) diff --git a/include/revision.h b/include/revision.h index 39476b2e8b08..9920b4c7314d 100644 --- a/include/revision.h +++ b/include/revision.h @@ -40,9 +40,6 @@ // REVISION C V ST SU #define DEFINE_REVISION_TABLE \ - 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(0x09000001, 2, 8, 2, 1) diff --git a/include/vif_interface.h b/include/vif_interface.h index 20de31433297..0e5129452413 100644 --- a/include/vif_interface.h +++ b/include/vif_interface.h @@ -533,19 +533,6 @@ typedef VOID IN PVOID Cookie ); -typedef NTSTATUS -(*XENVIF_VIF_TRANSMITTER_QUEUE_PACKET_V6)( - IN PINTERFACE Interface, - IN PMDL Mdl, - IN ULONG Offset, - IN ULONG Length, - IN XENVIF_VIF_OFFLOAD_OPTIONS OffloadOptions, - IN USHORT MaximumSegmentSize, - IN USHORT TagControlInformation, - IN PXENVIF_PACKET_HASH Hash, - IN PVOID Cookie - ); - /*! \typedef XENVIF_VIF_TRANSMITTER_QUEUE_PACKET \brief Queue a packet at the provider's transmit side @@ -826,74 +813,6 @@ typedef NTSTATUS DEFINE_GUID(GUID_XENVIF_VIF_INTERFACE, 0x76f279cd, 0xca11, 0x418b, 0x92, 0xe8, 0xc5, 0x7f, 0x77, 0xde, 0xe, 0x2e); -/*! \struct _XENVIF_VIF_INTERFACE_V6 - \brief VIF interface version 6 - \ingroup interfaces -*/ -struct _XENVIF_VIF_INTERFACE_V6 { - INTERFACE Interface; - XENVIF_VIF_ACQUIRE Acquire; - XENVIF_VIF_RELEASE Release; - XENVIF_VIF_ENABLE Enable; - XENVIF_VIF_DISABLE Disable; - XENVIF_VIF_QUERY_STATISTIC QueryStatistic; - XENVIF_VIF_QUERY_RING_COUNT QueryRingCount; - XENVIF_VIF_UPDATE_HASH_MAPPING UpdateHashMapping; - XENVIF_VIF_RECEIVER_RETURN_PACKET ReceiverReturnPacket; - XENVIF_VIF_RECEIVER_SET_OFFLOAD_OPTIONS ReceiverSetOffloadOptions; - XENVIF_VIF_RECEIVER_SET_BACKFILL_SIZE ReceiverSetBackfillSize; - XENVIF_VIF_RECEIVER_QUERY_RING_SIZE ReceiverQueryRingSize; - XENVIF_VIF_RECEIVER_SET_HASH_ALGORITHM ReceiverSetHashAlgorithm; - XENVIF_VIF_RECEIVER_QUERY_HASH_CAPABILITIES ReceiverQueryHashCapabilities; - XENVIF_VIF_RECEIVER_UPDATE_HASH_PARAMETERS ReceiverUpdateHashParameters; - XENVIF_VIF_TRANSMITTER_QUEUE_PACKET_V6 TransmitterQueuePacket; - XENVIF_VIF_TRANSMITTER_QUERY_OFFLOAD_OPTIONS TransmitterQueryOffloadOptions; - XENVIF_VIF_TRANSMITTER_QUERY_LARGE_PACKET_SIZE TransmitterQueryLargePacketSize; - XENVIF_VIF_TRANSMITTER_QUERY_RING_SIZE TransmitterQueryRingSize; - XENVIF_VIF_MAC_QUERY_STATE MacQueryState; - XENVIF_VIF_MAC_QUERY_MAXIMUM_FRAME_SIZE MacQueryMaximumFrameSize; - XENVIF_VIF_MAC_QUERY_PERMANENT_ADDRESS MacQueryPermanentAddress; - XENVIF_VIF_MAC_QUERY_CURRENT_ADDRESS MacQueryCurrentAddress; - XENVIF_VIF_MAC_QUERY_MULTICAST_ADDRESSES MacQueryMulticastAddresses; - XENVIF_VIF_MAC_SET_MULTICAST_ADDRESSES MacSetMulticastAddresses; - XENVIF_VIF_MAC_SET_FILTER_LEVEL MacSetFilterLevel; - XENVIF_VIF_MAC_QUERY_FILTER_LEVEL MacQueryFilterLevel; -}; - -/*! \struct _XENVIF_VIF_INTERFACE_V7 - \brief VIF interface version 7 - \ingroup interfaces -*/ -struct _XENVIF_VIF_INTERFACE_V7 { - INTERFACE Interface; - XENVIF_VIF_ACQUIRE Acquire; - XENVIF_VIF_RELEASE Release; - XENVIF_VIF_ENABLE Enable; - XENVIF_VIF_DISABLE Disable; - XENVIF_VIF_QUERY_STATISTIC QueryStatistic; - XENVIF_VIF_QUERY_RING_COUNT QueryRingCount; - XENVIF_VIF_UPDATE_HASH_MAPPING UpdateHashMapping; - XENVIF_VIF_RECEIVER_RETURN_PACKET ReceiverReturnPacket; - XENVIF_VIF_RECEIVER_SET_OFFLOAD_OPTIONS ReceiverSetOffloadOptions; - XENVIF_VIF_RECEIVER_SET_BACKFILL_SIZE ReceiverSetBackfillSize; - XENVIF_VIF_RECEIVER_QUERY_RING_SIZE ReceiverQueryRingSize; - XENVIF_VIF_RECEIVER_SET_HASH_ALGORITHM ReceiverSetHashAlgorithm; - XENVIF_VIF_RECEIVER_QUERY_HASH_CAPABILITIES ReceiverQueryHashCapabilities; - XENVIF_VIF_RECEIVER_UPDATE_HASH_PARAMETERS ReceiverUpdateHashParameters; - XENVIF_VIF_TRANSMITTER_QUEUE_PACKET TransmitterQueuePacket; - XENVIF_VIF_TRANSMITTER_QUERY_OFFLOAD_OPTIONS TransmitterQueryOffloadOptions; - XENVIF_VIF_TRANSMITTER_QUERY_LARGE_PACKET_SIZE TransmitterQueryLargePacketSize; - XENVIF_VIF_TRANSMITTER_QUERY_RING_SIZE TransmitterQueryRingSize; - XENVIF_VIF_MAC_QUERY_STATE MacQueryState; - XENVIF_VIF_MAC_QUERY_MAXIMUM_FRAME_SIZE MacQueryMaximumFrameSize; - XENVIF_VIF_MAC_QUERY_PERMANENT_ADDRESS MacQueryPermanentAddress; - XENVIF_VIF_MAC_QUERY_CURRENT_ADDRESS MacQueryCurrentAddress; - XENVIF_VIF_MAC_QUERY_MULTICAST_ADDRESSES MacQueryMulticastAddresses; - XENVIF_VIF_MAC_SET_MULTICAST_ADDRESSES MacSetMulticastAddresses; - XENVIF_VIF_MAC_SET_FILTER_LEVEL MacSetFilterLevel; - XENVIF_VIF_MAC_QUERY_FILTER_LEVEL MacQueryFilterLevel; -}; - /*! \struct _XENVIF_VIF_INTERFACE_V8 \brief VIF interface version 8 \ingroup interfaces @@ -938,7 +857,7 @@ typedef struct _XENVIF_VIF_INTERFACE_V8 XENVIF_VIF_INTERFACE, *PXENVIF_VIF_INTER #endif // _WINDLL -#define XENVIF_VIF_INTERFACE_VERSION_MIN 6 +#define XENVIF_VIF_INTERFACE_VERSION_MIN 8 #define XENVIF_VIF_INTERFACE_VERSION_MAX 8 #endif // _XENVIF_INTERFACE_H diff --git a/src/xenvif/vif.c b/src/xenvif/vif.c index 69ced78cc0f7..33aceed5bba8 100644 --- a/src/xenvif/vif.c +++ b/src/xenvif/vif.c @@ -370,45 +370,6 @@ VifReceiverReturnPacket( ReleaseMrswLockShared(&Context->Lock); } -static NTSTATUS -VifTransmitterQueuePacketVersion6( - IN PINTERFACE Interface, - IN PMDL Mdl, - IN ULONG Offset, - IN ULONG Length, - IN XENVIF_VIF_OFFLOAD_OPTIONS OffloadOptions, - IN USHORT MaximumSegmentSize, - IN USHORT TagControlInformation, - IN PXENVIF_PACKET_HASH Hash, - IN PVOID Cookie - ) -{ - PXENVIF_VIF_CONTEXT Context = Interface->Context; - NTSTATUS status; - - AcquireMrswLockShared(&Context->Lock); - - status = STATUS_UNSUCCESSFUL; - if (!Context->Enabled) - goto done; - - status = TransmitterQueuePacket(FrontendGetTransmitter(Context->Frontend), - Mdl, - Offset, - Length, - OffloadOptions, - MaximumSegmentSize, - TagControlInformation, - Hash, - FALSE, - Cookie); - -done: - ReleaseMrswLockShared(&Context->Lock); - - return status; -} - static NTSTATUS VifTransmitterQueuePacket( IN PINTERFACE Interface, @@ -828,66 +789,6 @@ done: ReleaseMrswLockExclusive(&Context->Lock, Irql, FALSE); } -static struct _XENVIF_VIF_INTERFACE_V6 VifInterfaceVersion6 = { - { sizeof (struct _XENVIF_VIF_INTERFACE_V6), 6, NULL, NULL, NULL }, - VifAcquire, - VifRelease, - VifEnable, - VifDisable, - VifQueryStatistic, - VifQueryRingCount, - VifUpdateHashMapping, - VifReceiverReturnPacket, - VifReceiverSetOffloadOptions, - VifReceiverSetBackfillSize, - VifReceiverQueryRingSize, - VifReceiverSetHashAlgorithm, - VifReceiverQueryHashCapabilities, - VifReceiverUpdateHashParameters, - VifTransmitterQueuePacketVersion6, - VifTransmitterQueryOffloadOptions, - VifTransmitterQueryLargePacketSize, - VifTransmitterQueryRingSize, - VifMacQueryState, - VifMacQueryMaximumFrameSize, - VifMacQueryPermanentAddress, - VifMacQueryCurrentAddress, - VifMacQueryMulticastAddresses, - VifMacSetMulticastAddresses, - VifMacSetFilterLevel, - VifMacQueryFilterLevel -}; - -static struct _XENVIF_VIF_INTERFACE_V7 VifInterfaceVersion7 = { - { sizeof (struct _XENVIF_VIF_INTERFACE_V7), 7, NULL, NULL, NULL }, - VifAcquire, - VifRelease, - VifEnable, - VifDisable, - VifQueryStatistic, - VifQueryRingCount, - VifUpdateHashMapping, - VifReceiverReturnPacket, - VifReceiverSetOffloadOptions, - VifReceiverSetBackfillSize, - VifReceiverQueryRingSize, - VifReceiverSetHashAlgorithm, - VifReceiverQueryHashCapabilities, - VifReceiverUpdateHashParameters, - VifTransmitterQueuePacket, - VifTransmitterQueryOffloadOptions, - VifTransmitterQueryLargePacketSize, - VifTransmitterQueryRingSize, - VifMacQueryState, - VifMacQueryMaximumFrameSize, - VifMacQueryPermanentAddress, - VifMacQueryCurrentAddress, - VifMacQueryMulticastAddresses, - VifMacSetMulticastAddresses, - VifMacSetFilterLevel, - VifMacQueryFilterLevel -}; - static struct _XENVIF_VIF_INTERFACE_V8 VifInterfaceVersion8 = { { sizeof (struct _XENVIF_VIF_INTERFACE_V8), 8, NULL, NULL, NULL }, VifAcquire, @@ -982,40 +883,6 @@ VifGetInterface( NTSTATUS status; switch (Version) { - case 6: { - struct _XENVIF_VIF_INTERFACE_V6 *VifInterface; - - VifInterface = (struct _XENVIF_VIF_INTERFACE_V6 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENVIF_VIF_INTERFACE_V6)) - break; - - *VifInterface = VifInterfaceVersion6; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } - case 7: { - struct _XENVIF_VIF_INTERFACE_V7 *VifInterface; - - VifInterface = (struct _XENVIF_VIF_INTERFACE_V7 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENVIF_VIF_INTERFACE_V7)) - break; - - *VifInterface = VifInterfaceVersion7; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } case 8: { struct _XENVIF_VIF_INTERFACE_V8 *VifInterface; @@ -1068,70 +935,6 @@ VifTeardown( Trace("<====\n"); } -static FORCEINLINE VOID -__VifReceiverQueuePacketVersion6( - IN PXENVIF_VIF_CONTEXT Context, - IN ULONG Index, - IN PMDL Mdl, - IN ULONG Offset, - IN ULONG Length, - IN XENVIF_PACKET_CHECKSUM_FLAGS Flags, - IN USHORT MaximumSegmentSize, - IN USHORT TagControlInformation, - IN PXENVIF_PACKET_INFO Info, - IN PXENVIF_PACKET_HASH Hash, - IN BOOLEAN More, - IN PVOID Cookie - ) -{ - UNREFERENCED_PARAMETER(Index); - UNREFERENCED_PARAMETER(More); - - Context->Callback(Context->Argument, - XENVIF_RECEIVER_QUEUE_PACKET, - Mdl, - Offset, - Length, - Flags, - MaximumSegmentSize, - TagControlInformation, - Info, - Hash, - Cookie); -} - -static FORCEINLINE VOID -__VifReceiverQueuePacketVersion7( - IN PXENVIF_VIF_CONTEXT Context, - IN ULONG Index, - IN PMDL Mdl, - IN ULONG Offset, - IN ULONG Length, - IN XENVIF_PACKET_CHECKSUM_FLAGS Flags, - IN USHORT MaximumSegmentSize, - IN USHORT TagControlInformation, - IN PXENVIF_PACKET_INFO Info, - IN PXENVIF_PACKET_HASH Hash, - IN BOOLEAN More, - IN PVOID Cookie - ) -{ - UNREFERENCED_PARAMETER(Index); - - Context->Callback(Context->Argument, - XENVIF_RECEIVER_QUEUE_PACKET, - Mdl, - Offset, - Length, - Flags, - MaximumSegmentSize, - TagControlInformation, - Info, - Hash, - More, - Cookie); -} - static FORCEINLINE VOID __VifReceiverQueuePacket( IN PXENVIF_VIF_CONTEXT Context, @@ -1185,36 +988,6 @@ VifReceiverQueuePacket( KeRaiseIrql(DISPATCH_LEVEL, &Irql); switch (Context->Version) { - case 6: - __VifReceiverQueuePacketVersion6(Context, - Index, - Mdl, - Offset, - Length, - Flags, - MaximumSegmentSize, - TagControlInformation, - Info, - Hash, - More, - Cookie); - break; - - case 7: - __VifReceiverQueuePacketVersion7(Context, - Index, - Mdl, - Offset, - Length, - Flags, - MaximumSegmentSize, - TagControlInformation, - Info, - Hash, - More, - Cookie); - break; - case 8: __VifReceiverQueuePacket(Context, Index, @@ -1246,8 +1019,6 @@ VifTransmitterReturnPacket( ) { switch (Context->Version) { - case 6: - case 7: case 8: Context->Callback(Context->Argument, XENVIF_TRANSMITTER_RETURN_PACKET, -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |