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.

Cppi_Desc union wrong?

Hi,

there seems to be an error in the definition of Cppi_Desc in cppi_desc.h.

/**
 * @brief CPPI descriptor
 */
typedef union {
    /** Host descriptor */
    Cppi_HostDesc       *ptrHostDesc;  
    /** Monolithic descriptor */
    Cppi_MonolithicDesc *ptrMonoDesc;
}Cppi_Desc;

This leads to completely wrong Instructions like: 

Cppi_Desc *pCppiDesc = Qmss_queuePop (hFDQ));
pCppiDesc->ptrHostDesc->buffLen = pCppiDesc->ptrHostDesc->origBufferLen; (!!!wrong!!!)

(One level of indirection too much)

When I look at, how Cppi_desc is used in the Cppi LLD, I think it should be:

/**
 * @brief CPPI descriptor
 */
typedef union {
    /** Host descriptor */
    Cppi_HostDesc       hostDesc;  
    /** Monolithic descriptor */
    Cppi_MonolithicDesc monoDesc;
}Cppi_Desc;

So I could do thinks like that:

Cppi_Desc *pCppiDesc = Qmss_queuePop (hFDQ));
pCppiDesc->hostDesc.buffLen = pCppiDesc->hostDesc.origBufferLen;