Lines Matching refs:ring

14 Memory mapped netlink I/O used two circular ring buffers for RX and TX which
17 The RX ring is used by the kernel to directly construct netlink messages into
19 additionally as long as the ring contains messages no recvmsg() or poll()
22 The TX ring is used to process messages directly from user-space memory, the
23 kernel processes all messages contained in the ring using a single sendmsg()
31 - ring setup
32 - conversion of the RX path to get messages from the ring instead of recvmsg()
33 - conversion of the TX path to construct messages into the ring
35 Ring setup is done using setsockopt() to provide the ring parameters to the
36 kernel, then a call to mmap() to map the ring into the processes address space:
40 - ring = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)
42 Usage of either ring is optional, but even if only the RX ring is used the
47 descriptor, once the socket is readable the frames from the ring are
54 copied to the ring on transmission, nullifying most of the performance gains.
58 use memory from the TX ring instead of (usually) a buffer declared on the
60 be used to wait for free frames in the TX ring.
68 Each ring contains a number of continuous memory blocks, containing frames of
69 fixed size dependent on the parameters used for ring setup.
83 the ring just contains the frames in a continuous memory zone.
85 The ring parameters used for setting up the ring are defined as follows:
96 the ring is nm_frame_nr. The following invariants hold:
116 When the kernel can't allocate physically continuous memory for a ring block,
156 RX ring: frame belongs to the kernel and contains no message
160 TX ring: frame belongs to user-space and can be used for
164 RX ring only: frame is currently used by the kernel for message
170 RX ring: frame contains a valid message. Approriate action is
176 TX ring: the frame contains a valid message from user-space to
182 RX ring only: a message is ready to be processed but could not be
183 stored in the ring, either because it exceeded the
191 RX ring only: user-space queued the message for later processing, but
192 processed some messages following it in the ring. The
202 As of Jan 2015 the message is always copied from the ring frame to an
221 /* Configure ring parameters */
227 /* Calculate size of each individual ring */
230 /* Map RX/TX rings. The TX ring is located after the RX ring */
239 This example assumes some ring parameters of the ring setup are available.
302 This example assumes some ring parameters of the ring setup are available.