none
Why i git error " Supported OID not found " during the testing RRS feed

  • Question

  • The  NDISTest 6.0 - 1c_IOCTLCoverage test failed with a error log contain "Supported list does not contain required Oid" .But i put al the OID inside the structure and run all the cases using switch cases in minport.cpp file . I don't know why . Because only some OID is missing others works fine . Look this log :

    Variation #5 Get Supported OID List
    NdisIoControl
    Card = {6G7F333B-58DG-221D-FD41-1QT852UU84CV}
    - QueryMode = 0
    - OID = OID_GEN_SUPPORTED_LIST
    Supported OIDs are:
    OID_GEN_HARDWARE_STATUS
    OID_GEN_TRANSMIT_BUFFER_SPACE
    OID_GEN_RECEIVE_BUFFER_SPACE
    OID_GEN_TRANSMIT_BLOCK_SIZE
    OID_GEN_RECEIVE_BLOCK_SIZE
    OID_GEN_VENDOR_ID
    OID_GEN_VENDOR_DESCRIPTION
    OID_GEN_VENDOR_DRIVER_VERSION
    OID_GEN_CURRENT_PACKET_FILTER
    OID_GEN_CURRENT_LOOKAHEAD
    OID_GEN_DRIVER_VERSION
    OID_GEN_SUPPORTED_LIST
    OID_GEN_MEDIA_SUPPORTED
    OID_GEN_MEDIA_IN_USE
    OID_GEN_CURRENT_PACKET_FILTER
    OID_GEN_CURRENT_LOOKAHEAD
    OID_GEN_DRIVER_VERSION
    OID_GEN_PHYSICAL_MEDIUM
    OID_GEN_INIT_TIME_MS
    OID_GEN_RESET_COUNTS
    OID_GEN_MEDIA_SENSE_COUNTS
    OID_GEN_FRIENDLY_NAME
    OID_GEN_PCI_DEVICE_CUSTOM_PROPERTIES
    OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES
    OID_TCP_OFFLOAD_CURRENT_CONFIG
    OID_TCP_CONNECTION_OFFLOAD_CURRENT_CONFIG
    OID_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES
    OID_TCP_CONNECTION_OFFLOAD_PARAMETERS
    OID_GEN_LINK_STATE
    OID_PNP_CAPABILITIES
    OID_PNP_WAKE_UP_PATTERN_LIST
    OID_GEN_DIRECTED_BYTES_XMIT
    OID_GEN_DIRECTED_FRAMES_XMIT
    OID_GEN_MULTICAST_BYTES_XMIT
    OID_GEN_MULTICAST_FRAMES_XMIT
    OID_GEN_BROADCAST_BYTES_XMIT
    OID_GEN_BROADCAST_FRAMES_XMIT
    OID_GEN_DIRECTED_BYTES_RCV
    OID_GEN_DIRECTED_FRAMES_RCV
    OID_GEN_MULTICAST_BYTES_RCV
    OID_GEN_MULTICAST_FRAMES_RCV
    OID_GEN_BROADCAST_BYTES_RCV
    OID_GEN_BROADCAST_FRAMES_RCV
    OID_GEN_RCV_DISCARDS
    OID_GEN_BYTES_RCV
    OID_GEN_BYTES_XMIT
    OID_GEN_PHYSICAL_MEDIUM_EX
    OID_PM_HARDWARE_CAPABILITIES
    OID_PM_CURRENT_CAPABILITIES
    OID_PM_WOL_PATTERN_LIST
    OID_PM_PROTOCOL_OFFLOAD_LIST
    OID_GEN_MAXIMUM_FRAME_SIZE
    OID_GEN_MAXIMUM_LOOKAHEAD
    OID_GEN_LINK_SPEED
    OID_GEN_MAC_OPTIONS
    OID_GEN_MEDIA_CONNECT_STATUS
    OID_GEN_RECEIVE_SCALE_CAPABILITIES
    OID_GEN_MAC_ADDRESS
    OID_GEN_MAX_LINK_SPEED
    OID_GEN_LINK_STATE
    OID_GEN_ENUMERATE_PORTS
    OID_GEN_PORT_STATE
    OID_GEN_MAXIMUM_TOTAL_SIZE
    OID_GEN_PORT_AUTHENTICATION_PARAMETERS
    OID_GEN_HD_SPLIT_CURRENT_CONFIG
    OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES
    OID_RECEIVE_FILTER_ENUM_QUEUES
    OID_RECEIVE_FILTER_ENUM_FILTERS
    OID_RECEIVE_FILTER_PARAMETERS
    OID_RECEIVE_FILTER_GLOBAL_PARAMETERS
    OID_RECEIVE_FILTER_QUEUE_PARAMETERS
    OID_802_3_MULTICAST_LIST
    OID_802_3_PERMANENT_ADDRESS
    OID_802_3_CURRENT_ADDRESS
    OID_802_3_MAXIMUM_LIST_SIZE
    OID_OFFLOAD_ENCAPSULATION

    Variation #6 Check for all required oids
    PrintOidName
    - Oid = 0x00010115, OID_GEN_MAXIMUM_SEND_PACKETS
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x00020101, OID_GEN_XMIT_OK
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x00020102, OID_GEN_RCV_OK
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x00020103, OID_GEN_XMIT_ERROR
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x00020104, OID_GEN_RCV_ERROR
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x00020105, OID_GEN_RCV_NO_BUFFER
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x01020101, OID_802_3_RCV_ERROR_ALIGNMENT
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x01020102, OID_802_3_XMIT_ONE_COLLISION
    FAILED: [21478] Supported list does not contain required Oid
    PrintOidName
    - Oid = 0x01020103, OID_802_3_XMIT_MORE_COLLISIONS
    FAILED: [21478] Supported list does not contain required Oid

    But i used  . please look this code :

          


    ULONG uIdx = 0;
    SupportedOidsSize = 32;
    SupportedOids = new NDIS_OID[SupportedOidsSize];

    SupportedOids[uIdx++] = OID_GEN_SUPPORTED_LIST;
    SupportedOids[uIdx++] = OID_GEN_HARDWARE_STATUS;
    SupportedOids[uIdx++] = OID_GEN_MEDIA_SUPPORTED;
    SupportedOids[uIdx++] = OID_GEN_MEDIA_IN_USE;
    SupportedOids[uIdx++] = OID_GEN_MAXIMUM_LOOKAHEAD;
    SupportedOids[uIdx++] = OID_GEN_MAXIMUM_FRAME_SIZE;
    SupportedOids[uIdx++] = OID_GEN_LINK_SPEED;
    SupportedOids[uIdx++] = OID_GEN_TRANSMIT_BUFFER_SPACE;
    SupportedOids[uIdx++] = OID_GEN_RECEIVE_BUFFER_SPACE;
    SupportedOids[uIdx++] = OID_GEN_TRANSMIT_BLOCK_SIZE;

    SupportedOids[uIdx++] = OID_GEN_RECEIVE_BLOCK_SIZE;
    SupportedOids[uIdx++] = OID_GEN_VENDOR_ID;
    SupportedOids[uIdx++] = OID_GEN_VENDOR_DESCRIPTION;
    SupportedOids[uIdx++] = OID_GEN_VENDOR_DRIVER_VERSION;
    SupportedOids[uIdx++] = OID_GEN_CURRENT_PACKET_FILTER;
    SupportedOids[uIdx++] = OID_GEN_CURRENT_LOOKAHEAD;
    SupportedOids[uIdx++] = OID_GEN_DRIVER_VERSION;
    SupportedOids[uIdx++] = OID_GEN_MAXIMUM_TOTAL_SIZE;
    SupportedOids[uIdx++] = OID_GEN_MAC_OPTIONS;
    SupportedOids[uIdx++] = OID_GEN_MEDIA_CONNECT_STATUS;

    SupportedOids[uIdx++] = OID_GEN_MAXIMUM_SEND_PACKETS;
    SupportedOids[uIdx++] = OID_802_3_MAXIMUM_LIST_SIZE;
    SupportedOids[uIdx++] = OID_802_3_CURRENT_ADDRESS;
    SupportedOids[uIdx++] = OID_802_3_PERMANENT_ADDRESS;
    SupportedOids[uIdx++] = OID_802_3_MULTICAST_LIST;
    SupportedOids[uIdx++] = OID_GEN_PHYSICAL_MEDIUM;
    SupportedOids[uIdx++] = OID_GEN_MEDIA_CAPABILITIES;
    SupportedOids[uIdx++] = OID_GEN_MACHINE_NAME;
    SupportedOids[uIdx++] = OID_GEN_XMIT_OK;
    SupportedOids[uIdx++] = OID_GEN_RCV_ERROR;

    SupportedOids[uIdx++] = OID_GEN_RCV_NO_BUFFER;
    SupportedOids[uIdx++] = OID_GEN_XMIT_ERROR;

    ASSERT(uIdx == m_ulSupportedOidsSize);

    and

    NDIS_STATUS CMiniport::QueryInformation(
    IN NDIS_OID Oid,
    IN PVOID InformationBuffer,
    IN ULONG InformationBufferLength,
    OUT PULONG BytesWritten,
    OUT PULONG BytesNeeded )

    {

           ULONG64 m_ul64XmitOk = 0 ;
    ULONG64 m_ul64RcvOk = 0;

            ULONG ulZerro = 0;
    ULONG64 ul64Zerro = 0;

    PVOID pInformation = (PVOID)&ulZerro ;
    ULONG ulInformationLength = 0;

    switch (Oid) {
    case OID_GEN_SUPPORTED_LIST:
    pInformation = (PVOID)m_pSupportedOids;
    ulInformationLength = m_ulSupportedOidsSize * sizeof(NDIS_OID);
    ulInformationLength = sizeof(m_pSupportedOids);
    break;

    case OID_GEN_HARDWARE_STATUS:
    pInformation = &m_eHardwareStatus;
    ulInformationLength = sizeof(m_eHardwareStatus);
    break;

           case OID_GEN_MEDIA_CAPABILITIES:
    pInformation = &m_ulMediaCapabilities;
    ulInformationLength = sizeof(m_ulMediaCapabilities);
    break;

    case OID_GEN_XMIT_OK:
    pInformation = &m_ul64XmitOk;
    ulInformationLength = sizeof(m_ul64XmitOk);
    break;

                   etc..

                   }

            NDIS_STATUS status = NDIS_STATUS_SUCCESS;

    if (pInformation != NULL) {
    if (InformationBufferLength < ulInformationLength) {
    *BytesNeeded = ulInformationLength;
    status = NDIS_STATUS_BUFFER_TOO_SHORT;
    } else {
    *BytesWritten = ulInformationLength;
    NdisMoveMemory(InformationBuffer, pInformation, ulInformationLength);
    status = NDIS_STATUS_SUCCESS;
    }
    } else {
    status = NDIS_STATUS_NOT_SUPPORTED;
      }

    return status;

       }

    Why this error happen ? any mistake on code side ?? please help 

    thanks 

    Friday, October 16, 2015 2:48 PM