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_linkNextBD

Hi Ti folks,

                i haven't checked this through experimenting. If i want to link descriptors [please note my descriptors are greater than 16 bytes..so the last nibble in ADDRESS of the descriptor > 0 ].

1. In this case while linking descriptors through Cppi_linkNextBD should i set the last nibble [of ADDRESS OF the descriptor] = (( (descSize) >>4) -1)??

            Cppi_linkNextBD (Cppi_DescType_HOST, (Cppi_Desc*)currentHostDesc, (Cppi_Desc*)nextHostDesc);

2. Lets say i am pushing using Qmss_queuePush [in which we specify descriptor size as X bytes {where X is multiple of 16 bytes}] of the header descriptor, then will the same size be applied to rest of the linked descriptors ???

3. taking step 2 a bit more, what happens if i have multiple size descriptors linked to each other,  [X->Y->Z]

[SOP]X = header host packet descriptor linked to Y

[MOP]Y = next host buffer descriptor linked to Z

[EOP]Z =  next host buffer descriptor linked to NOne

can i use Qmss_queuePush specifying X bytes [please note X bytes is only applicable to header and rest two linked descriptors are having different descriptor sizes]. what should be done here.

Thanks

RC Reddy

  • HI Ti Folks,

                       I am awaiting reply on this. 

    Thanks

    RC Reddy

  • Hi RC Reddy,

    To answer your questions one by one:

    1. Make sure you don't exceed 64 bytes, as that is as much of a descriptor size that the CPPI can manage. I'm assuming you're following page 126 of the CPPI/Multicore Navigator UG to guide you for that bigger than 64 byte descriptor with the "ghost" descriptors.

     

    2. The QM can handle 20 different descriptor size regions, each region with only one descriptor size. If you are linking many host descriptors in an Rx FDQ, the Rx DMA will pop descriptors and link them together automatically, and it will fill in the fields to create what it needs based on the first descriptor (It talks about this on page 136 of the user guide for CPPI) .

    I'm a little confused on what you're trying to accomplish by changing the last nibble of the descriptor. The last word for a host buffer and host packet descriptor is the original buffer 0 ptr. For a Monolitihic Packet, it's the packet info (page 48 of the CPPI user guide). What exactly is your goal?

    3. As I said in step 2, the different host descriptors linked together with different sizes will be assumed to have the same size as the first. If you want to have different sizes, you shoudl each put them in a different queue region associated with that size.

     

    I hope this answers your questions! I suggest looking over the CPPI user guide since it has some very helpful information associated with your question.

     

    Regards,

    Kat Kelsch

  • Hi Katherine,

                         I appreciate your replies and time. At the same time, the reply you put is nowhere related to the query i am asking. Also i corrected my question [it was my mistake, i agree and acccept].Please see my question again and again. I am not stressing on any region,rxfdq,monolithic or any. I re-iterate please see my question again and understand and answer. Also please pull in experts to answer the same.

    Thanks

    RC Reddy

  • RCReddy said:

    1. In this case while linking descriptors through Cppi_linkNextBD should i set the last nibble [of ADDRESS OF the descriptor] = (( (descSize) >>4) -1)??

                Cppi_linkNextBD (Cppi_DescType_HOST, (Cppi_Desc*)currentHostDesc, (Cppi_Desc*)nextHostDesc);

    Yes.  The low 4 bits should be set.  Note that if you popped them from a queue using Qmss_queuePop(), then the low 4 bits should already be set.  You probably used QMSS_DESC_PTR() to discard them before using that descriptor; simply keep the original pointer for use with Cppi_linkNextBD.

    RCReddy said:

    2. Lets say i am pushing using Qmss_queuePush [in which we specify descriptor size as X bytes {where X is multiple of 16 bytes}] of the header descriptor, then will the same size be applied to rest of the linked descriptors ???

    No.  The QMSS APIs never traverse linked buffers.  It only sets the size of the first descriptor.

    RCReddy said:
    3. taking step 2 a bit more, what happens if i have multiple size descriptors linked to each other,  [X->Y->Z]

    See #1.  Set (or preserve) the sizes when you link the buffers.  The Qmss_queuePush() should take the size of the first descriptor, only.