Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Quantitative Finance · Glossaire

Qu'est-ce que « Descriptor ring » ?

Definition 3.1 Networks, Hardware and Trading Infrastructure · Chapitre 3 — Network Cards and Kernel Bypass

A descriptor ring is a circular array of descriptors, each pointing at a packet buffer in host memory and carrying an ownership flag. On the receive side the card fills the next descriptor it owns with an arriving packet (by direct memory access), marks it as the host’s, and advances its head; the host processes the descriptors it owns in order and hands them back to the card. When the next descriptor still belongs to the host, the card has nowhere to put the packet and drops it.

Two ways out of a descriptor ring. The kernel path (top) takes an interrupt, processes the packet in a software interrupt, queues it on a socket and copies it to a program that must be woken. A kernel-bypass stack (bottom) maps the ring into the program, which polls it and reads the packet where the card wrote it.
Figure 3.1. Two ways out of a descriptor ring. The kernel path (top) takes an interrupt, processes the packet in a software interrupt, queues it on a socket and copies it to a program that must be woken. A kernel-bypass stack (bottom) maps the ring into the program, which polls it and reads the packet where the card wrote it.
A receive ring of twelve descriptors. Five are the host’s (filled and not yet handed back), seven are the card’s. The card writes at the head, the host reads at the tail; the ring is full when the head meets a descriptor the host still owns, whether the host has read it or merely not yet handed it back.
Figure 3.2. A receive ring of twelve descriptors. Five are the host’s (filled and not yet handed back), seven are the card’s. The card writes at the head, the host reads at the tail; the ring is full when the head meets a descriptor the host still owns, whether the host has read it or merely not yet handed it back.
Lire dans le chapitre →