Re: [PATCH v5 04/17] octeontx2-pf: Initialize and config queues
From: Sunil Kovvuri <hidden>
Date: 2020-01-27 12:43:59
On Mon, Jan 27, 2020 at 12:30 AM Dave Taht [off-list ref] wrote:
I guess my question generally is, what form of RED is implemented in the hardware? http://mirrors.bufferbloat.net/~jg/RelevantPapers/Red_in_a_different_light.pdfquoted
+/* RED and drop levels of CQ on packet reception. + * For CQ level is measure of emptiness ( 0x0 = full, 255 = empty). + */ +#define RQ_PASS_LVL_CQ(skid, qsize) ((((skid) + 16) * 256) / (qsize)) +#define RQ_DROP_LVL_CQ(skid, qsize) (((skid) * 256) / (qsize)) + +/* RED and drop levels of AURA for packet reception. + * For AURA level is measure of fullness (0x0 = empty, 255 = full). + * Eg: For RQ length 1K, for pass/drop level 204/230. + * RED accepts pkts if free pointers > 102 & <= 205. + * Drops pkts if free pointers < 102. + */ +#define RQ_PASS_LVL_AURA (255 - ((95 * 256) / 100)) /* RED when 95% is full */ +#define RQ_DROP_LVL_AURA (255 - ((99 * 256) / 100)) /* Drop when 99% is full */I guess my question generally is, what form of RED is implemented in the hardware?
Periodically or per packet (based on configuration) a average level of receive side resources (ie number of free receive buffer pointers, number of unused receive packet notification descriptors) is calculated and compared against configured values to determine whether to do RED dropping or not.
(what's aura?)
Aura is a HW term, this maintains receive buffer pointers. When a packet is received HW allocates a pointer from Aura and does a DMA to it and then prepares a descriptor and adds to CQ (completion queue) and notifies software. Thanks, Sunil.