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 User Guide RX flow queue selection

As suggested by Rajasekaran K, I am opening this new thread to discuss unclear documentation in SPRUGR9 (revision G) about the configuration of queues for the first buffer in a packet on an RX flow.


The relevant fields are RX_SIZE_THRESH_EN[2:0], RX_FDQ0_SZ0_QMGR/_QNUM, RX_FDQ0_SZ1_*, RX_FDQ0_SZ2_*, RX_FDQ0_SZ3_*, RX_SIZE_THRESH0, RX_SIZE_THRESH1 and RX_SIZE_THRESH2, but the descriptions of the fields in section 4.2.4 are not consistent.

The RX_SIZE_THRESHn fields describe a logic like this at the start of a packet with length 'pkt_size' bytes:

if (RX_SIZE_THRESH_EN[0] == 0) or (pkt_size <= RX_SIZE_THRESH0 * 32 bytes), use RX_FDQ0_SZ0_*

else if (RX_SIZE_THRESH_EN[1] == 0) or (pkt_size <= RX_SIZE_THRESH1 * 32 bytes), use RX_FDQ0_SZ1_*

else if (RX_SIZE_THRESH_EN[2] == 0) or (pkt_size <= RX_SIZE_THRESH2 * 32 bytes), use RX_FDQ0_SZ2_*

else (presumably, this is not explicitly documented) use RX_FDQ0_SZ3_*

(Section 2.7 of the document describes what happens if the packet is larger than this first buffer.)

The documentation for RX_FDQ0_SZ0_* matches the first line of this logic, except that it refers to an undefined RX_SIZE0 variable.

The documentation for RX_FDQ0_SZ1_* is identical to that for RX_FDQ0_SZ0_* except for spelling.

The documentation for RX_FDQ0_SZ2_* matches the second line, except for referring to rx_size2.

The documentation for RX_FDQ0_SZ3_* is close, except it refers to a rx_size3 value that does not have an obvious definition (maybe it should be rx_size2).  I would suggest that the wording for this should be "in a packet whose size was greater than the rx_size2 value", though, rather than "in a packet whose size was not less than or equal to the rx_size2 value" -- the former is shorter and makes it harder to overlook the key word ("greater" vs "not").  The description for this field pair also says "This queue [manager/number] is selected if the packet length does not match any enabled size threshold."  This last sentence conflicts with the documentation for RX_SIZE_THRESH_EN, which says that RX_FDQ0_SZ0_* gets used if all thresholds are disabled.

In an older thread, Sivaraj Kuppuraj agreed with the RX_FDQ0_SZ1_* problem, and suggested a documentation change that I think fixes that, but disagreed for RX_FDQ0_SZ3_*.  This post is mostly meant to elaborate on why I think RX_FDQ0_SZ3_* is also flawed.

Michael

  • Hi Michael,

    Thanks for your post.

    We would really appreciate for recommending us the right wording for the RX_FDQ0_SZ3_* documentation in QMSS userguide and also thanks for your elloborative explanation which you make us to understand the flaw for the RX_FDQ0_SZ3_* field but why do you think, it should be rx_size2 instead rx_size3 which is correct to my sense. I do abide by the below current statement for RX_FDQ0_SZ3_* field in the SPRUGR9g which seems to be fine other than your proposed wording for the keyword ("greater" vs "not") which we would really take it up.

    Current:

    13-12 RX_FDQ0_SZ3_QMGR RX free descriptor 0 queue manager index – size 3. This field specifies which queue manager should be used for the first RX buffer in a packet whose size was not less than or equal to the rx_size3 value. This field is optional. This queue manager is selected if the packet length does not match any enabled size threshold.

    11-0 RX_FDQ0_SZ3_QNUM RX free descriptor 0 queue index – size 3. This field specifies which free descriptor queue should be used for the first RX buffer in a packet whose size is less than or equal to the rx_size3 value. This field

    is optional. This queue number is selected if the packet length does not match any enabled size threshold

    Proposed by you:

    13-12 RX_FDQ0_SZ3_QMGR RX free descriptor 0 queue manager index – size 3. This field specifies which queue manager should be used for the first RX buffer in a packet whose size was greater than the rx_size3 value. This field is optional. This queue manager is selected if the packet length does not match any enabled size threshold.

    11-0 RX_FDQ0_SZ3_QNUM RX free descriptor 0 queue index – size 3. This field specifies which free descriptor queue should be used for the first RX buffer in a packet whose size is less than or equal to the rx_size3 value. This field is optional. This queue number is selected if the packet length does not match any enabled size threshold

    We would try to forward your above proposed wording to take it up to do necessary action but really worried about why do you think  it should be rx_size2 instead of rx_size3 for the RX_FDQ0_SZ3_* field which currently looks good  in the QMSS user guide. Please clarify us your misinterpretation on this which looks fine to me as of now.

    Thanks & regards,

    Sivaraj K

    ---------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    ---------------------------------------------------------------------------------

  • Sivaraj,

    There are two reasons I think that rx_size3 is wrong.

    First, there is no corresponding RX_SIZE_THRESH3 size field, so I do not see how rx_size3 would be defined.

    Second, the RX_SIZE_THRESH0, RX_SIZE_THRESH1 and RX_SIZE_THRESH2 fields classify incoming packets by length.  If RX_SIZE0=RX_SIZE_THRESH0*32 bytes, RX_SIZE1=RX_SIZE_THRESH1*32 bytes, and RX_SIZE2=RX_SIZE_THRESH2*32 bytes, then we can draw something like this:

    Length:    0              RX_SIZE0            RX_SIZE1            RX_SIZE2

    Partition: |    Range 0       |      Range 1      |     Range 2       |      Range 3

    Queue:     |  RX_FDQ0_SZ0     |    RX_FDQ0_SZ1    |   RX_FDQ0_SZ2     |    RX_FDQ0_SZ3

    Range 0, the first partition, is for packets with 0 < length <= RX_SIZE0.

    Range 1 is for RX_SIZE0 < length <= RX_SIZE1.

    Range 2 is for RX_SIZE1 < length <= RX_SIZE2.

    Range 3 must be for all other packets, that is, RX_SIZE2 < length.  If there is another range, defined by something called rx_size3, then that would create an additional range of packet sizes, and would imply an additional queue (with RX_FDQ0_SZ4_QMGR and RX_FDQ0_SZ4_QNUM fields).

    As a side note, the wording change I suggested for RX_FDQ0_SZ3 would apply to both the QMGR and QNUM fields, not just the QMGR field.

    Michael

  • Hello,

    I agree with Sivaraj. I also had the confusion earlier.

    Currently
    From Table 4-41 of QMSS user guide it is mentioned like:

    RX_FDQ0_SZ0_QNUM: Rx free descriptor 0 queue index – size 0. This field specifies which free descriptor queue should be used for the
    1st Rx buffer in a packet whose size is less than or equal to the rx_size0 value. When the size thresholds are not
    enabled, this is the queue number for the first Rx buffer.

    RX_FDQ0_SZ1_QNUM: Rx free descriptor 0 queue index – size 1: This field specifies which free descriptor queue should be used for the 1st
    Rx buffer in a packet whose size is less than or equal to the RX_SIZE0 value. This field is optional.

    RX_FDQ0_SZ2_QNUM: Rx Free descriptor 0 queue index – size 2. This field specifies which Free Descriptor Queue should be used for the
    1st Rx buffer in a packet whose size is less than or equal to the rx_size2 value. This field is optional.

    RX_FDQ0_SZ3_QNUM Rx: free descriptor 0 queue index – size 3. This field specifies which free descriptor queue should be used for the 1st
    Rx buffer in a packet whose size is less than or equal to the rx_size3 value. This field is optional. This queue
    number is selected if the packet length does not match any enabled size threshold.

    If we look at the definition of RX_FDQ0_SZ0_QNUM and RX_FDQ0_SZ1_QNUM, user guide says it checks for rx_size0 but as per my understanding RX_FDQ0_SZ1_QNUM should be used when packet size is greater than rx_size0 and less than rx_size1.

    Similarly RX_FDQ0_SZ2_QNUM should be used when packet size is greater than rx_size1 and less than rx_size2.

    And RX_FDQ0_SZ3_QNUM should be selected only when packet length does not match any enabled size threshold i.e. packet size is greater than rx_size2. There is not any field named rx_size3.

    Regards
    Naveen
  • Naveen,

    For what it is worth, I do not like using the phrase "match [a] threshold" here -- it requires some additional definition to know whether x matches a threshold t when x < t, x <= t, x >= t or x > t, and this document only provides that definition in the field descriptions for RX_SIZE_THRESH[0-2].

    In the case of the RX_FDQ0_SZ3_* field descriptions, I think it is particularly bad because the sentence about matching thresholds conflicts with the documentation for RX_SIZE_THRESH_EN. For example, if RX_SIZE_THRESH_EN is 3, then RX_SIZE_THRESH2 and RX_FDQ0_SZ3_* are supposedly disabled. But the documentation for RX_FDQ0_SZ3_* says it will be used if it does not match (is not less than or equal to?) any enabled threshold, which means it would be used if it is greater than RX_SIZE_THRESH1 (and RX_SIZE_THRESH0). One of those descriptions must be wrong.

    Michael