Ethernet Products
Intel® Ethernet products and technologies
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
3936 Discussions

why the cldemote uses here in dpdk21.02?

wyf
Beginner
259 Views

In dpdk21.02, it add the cldemote feature. I see it used in the DLB eventdev driver. But I don't understand why it uses here as followed.

 

>static __rte_always_inline int

>dlb_recv_qe(struct dlb_port *qm_port, struct dlb_dequeue_qe *qe,

> uint8_t *offset)

>

{

> cache_line_base = (void *)(((uintptr_t)cq_addr) & ~0x3F);

> *offset = ((uintptr_t)cq_addr & 0x30) >> 4;

>

> /* Load the next CQ cache line from memory. Pack these reads as tight

> * as possible to reduce the chance that DLB invalidates the line while

> * the CPU is reading it. Read the cache line backwards to ensure that

> * if QE[N] (N > 0) is valid, then QEs[0:N-1] are too.

> *

> * (Valid QEs start at &qe[offset])

> */

> qes[3] = _mm_load_si128((__m128i *)&cache_line_base[6]);

> qes[2] = _mm_load_si128((__m128i *)&cache_line_base[4]);

> qes[1] = _mm_load_si128((__m128i *)&cache_line_base[2]);

> qes[0] = _mm_load_si128((__m128i *)&cache_line_base[0]);

>/* Evict the cache line ASAP */

>rte_cldemote(cache_line_base); // why used here ?

0 Kudos
1 Reply
Mike_Intel
Moderator
233 Views

Hello wyf,


Thank you for posting in Intel Ethernet Communities. 


Since this question involves DPDK, please check with Intel Premier Support for further assistance. See the following for access to Intel Premier Support.

Click the "Access and Log In" to contact the DPDK support https://www.intel.com/content/www/us/en/design/support/ips/training/welcome.html


Please be informed that we will now close this request. Just feel free to post a new question if you may have any other inquiry in the future as this thread will no longer be monitored.


If you have questions, please let us know. In case we do not hear from you, we will make a follow up after 3 workings days. Thank you.


Best regards,

Michael L.

Intel® Customer Support Technician


Reply