This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Qmss_queueOpen only on Rx,Tx and Tx Completion queues?

Hi All,

         I see there is Qmss_queueOpen only on Tx,Rx and Tx Completion queues but not on Rx Free queue and Tx Free queue. I didn't understand this funda. I am referring to qmInfraExampleProject. 

the definition for that API stands at 

"This function opens the requested queue. A queue can be opened in two ways: 1) If "queNum" is set to QMSS_PARAM_NOT_SPECIFIED, then a new available queue of type "queType" is allocated. 2) If "queNum" is a valid queue number i.e., >= 0, then a queue is allocated if free else a handle to a previously opened queue is returned. In this case "queType" parameter is not used."

Now my question is we inserted decriptor region into the Free queues, according to my  understanding we SHOULD open the queues before using it, I don't see any opening of Qmss_queueOpen for Rx and Tx Free queues. Can someone please explain why so [is there any idea/understanding behind it]?

Thanks

RC Reddy

  • If you look at the html documentation you will see the function:   Cppi_initDescriptor. As you can see from teh definition of the function (look below) the function opens a queue and loads it with descriptors.

    I think that it answer your question.  If not, let me know.

    Ran

    Qmss_QueueHnd Cppi_initDescriptor  ( Cppi_DescCfg *  descCfg, 
      uint32_t *  numAllocated  
     )   

    Description
    This function is used to obtain previously allocated descriptors. The function opens an destination queue as specified in the input parameters and pushes the requested number of descriptors from specified memory region, if available onto it. The host and monolithic descriptors are configured with values specified in "descCfg" before pushing them to the destination queue. The configuration for host descriptors are return policy, return push policy, return queue. The configuration for monolithic descriptors is the return queue. If the return queue is set to QMSS_PARAM_NOT_SPECIFIED then the destination queue specified in input parameter is configured to as return queue.


    Parameters:
    [in]  descCfg  Specifies the number of descriptors, memory region from where it should be allocated and the destination queue to push to.
    [out]  numAllocated  Number of descriptors actually allocated.

    Precondition:
    Qmss_init function should be called before calling this function.
    Return values:
     Success  - Destination queue handle on which the allocated descriptors are stored. The queue must be closed by the caller using Qmss_queueClose() when done. 
     Failure  - CPPI_INVALID_PARAM 
     Failure  - CPPI_QMSS_MEMREGION_NOT_INITIALIZED 
     Failure  - CPPI_QUEUE_OPEN_ERROR 

  • Thanks, Now i understood the underlying flow.