TUTORIALS 》 Circular Ring Buffers Architecture - Linux Kernel - Device Drivers - Network Stack

A circular buffer, circular queue, cyclic buffer or ring buffer is a data structure is a fixed-size buffer as if it were connected end-to-end or can be a dynamic one if implemented via Linked Lists. This is a data-structure quite popularly used in many parts of Linux Kernel such as Device Drivers, especially Network Hardware drivers, Network Packet Buffer such as sk_buff and so on. We can use a Ring Buffer in user-space application programming too. These kind of buffers are more suited for holding steady stream of incoming data. For example Network Packets. If the buffer gets full, we can discard the oldest buffer elements (such as packets). And to avoid we can increase the buffer size. So circular ring buffers plays a major role especially in Network Appliances such as Routers, Firewalls, etc.

Here is an extensive Youtube video of mine on Circular Ring Buffers, its Architecture and the big picture:

Circular Ring Buffers Live Visual Demo | Linux Kernel | Device Drivers | Network Stack:
Here is yet another series of videos in which I did Live Visual Demo or animation of Circular Ring buffers. This depects real-world use-case scenarios such as Device Drivers, some Linux Kernel Data-structures, Network Stack Packet buffers and so on.

Also recommend to watch:

Featured Video:

Suggested Topics:

☆ Tutorials :: Arduino UNO Projects ↗

☆ Tutorials :: Network Software Development ↗

☆ Tutorials :: Research and Projects ↗

☆ Tutorials :: Linux (user-space), Systems Architecture ↗

☆ Tutorials :: Linux Kernel Software Development ↗

☆ Tutorials :: Linux Kernel Internals (PDFs) - by Ramin Farajpour ↗

☆ Tutorials :: Software Development (Programming) Tools ↗

☆ Tutorials :: Embedded Projects ↗

Join The Linux Channel :: Facebook Group ↗

Visit The Linux Channel :: on Youtube ↗

💗 Help shape the future: Sponsor/Donate

Recommended Topics:
Featured Video:
Watch on Youtube - [498//0] Online Course - Linux CLI Scripting - Episode8 - $split command ↗

Linux Kernel vs performance tools ↗
Saturday' 13-Mar-2021

Kernel customization via make menuconfig - Linux Kernel Compilation (or a Kernel Build) ↗
Saturday' 13-Mar-2021
Here is a detailed Youtube video on Linux Kernel custom compilation and customization via make menuconfig interface

Nmap Network Scanning ↗
Saturday' 13-Mar-2021

UDP sample socket code for Systems and Network software developers ↗
Saturday' 13-Mar-2021
Here is my sample UDP socket code written in C. Unlike other versions you get commonly on-line this version is focused towards systems and network software developers and as a quick reference even for experienced software programmers. In this example/template, I am sending test raw binary data bytes from UDP sample client to registered UDP sample server. The code has documentation already in the form of comments (as you can see below). You can download my source below and you can use it directly in your projects or you can use the same for learning purposes to understand about user-space socket programming via IPv4 UDP transport layer protocol.

Bufferbloat in a Networking Device or an Appliance ↗
Saturday' 13-Mar-2021

Bluefish IDE - a simple versatile light-weight best editor to edit kernel source files, html files, c source code, text files, SQL schema and so on ↗
Saturday' 13-Mar-2021

Linux Kernel Tasklets | Big-Picture | vs User-Space pthreads ↗
Saturday' 01-Jan-2022
Linux Kernel Tasklets and Work queues are somewhat similar to user-space process threads in terms of the functionality and of course not in terms of its operation or its internal architecture. You can schedule Tasklet(s) for a registered function to run later. So typically the Interrupt top half (of the interrupt handler) performs a small amount of critical work (not to be confused with critical section), and then schedules such as a tasklet to execute later at the bottom half.

Smart NIC Cards ↗
Saturday' 13-Mar-2021
NIC Cards (Network Interface Cards) traditionally contain controller chip which takes care of the core aspects, such as packet reception, buffering (till they are read by OS device drivers), etc. But these days increasingly modern NIC cards can perform several CPU Network Offload functions such as packet/frame checksum, etc. Such hardware offload features of modern NIC cards is crucial to process packets and support packet data transfer rates of around 1Gbps, 10Gbps, even 40Gbps and so on. But beyond that such as 100Gbps and so on, at times even a high-end Xeon/ Intel/ AMD processors will struggle if need to support transfer rates of around 100Gbps or beyond (situations like Link Bonding). These are the situations we need what we call as Smart NIC Cards. A Smart NIC card implements most of the network traffic processing on the NIC itself that would necessarily be performed by the CPU (i.e Operating System) in the case of a traditional NIC card.

Linux Operating System - User-space Processes ↗
Saturday' 14-May-2022

Linux user-space Atomic Operations via GCC Atomic builtins ↗
Saturday' 13-Mar-2021

Trending Video:
Watch on Youtube - [486//0] 267 Ethtool command - struct ethtool_ops and association with net_device data-structure - Ep2 ↗

Management ↗
Saturday' 13-Mar-2021

Recommended Video:
Watch on Youtube - [490//0] QA - Selecting Linux Kernel preemption model based on your CPU ↗