[bootlin/training-materials updates] master: Kernel slides: add NAPI as an example usage of softirqs (aeeeca81)

Michael Opdenacker michael.opdenacker at bootlin.com
Wed Sep 4 17:54:51 CEST 2019

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/aeeeca81d1bb5ae6bb81a70240e6e79a80913fd3


commit aeeeca81d1bb5ae6bb81a70240e6e79a80913fd3
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Wed Sep 4 17:54:51 2019 +0200

    Kernel slides: add NAPI as an example usage of softirqs
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


 .../kernel-driver-development-interrupts.tex         | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
index 2e22bea9..175be1f8 100644
--- a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
+++ b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
@@ -217,6 +217,26 @@ int devm_request_threaded_irq(
+  \frametitle{Example usage of softirqs - NAPI}
+  NAPI = {\em New API}
+  \begin{itemize}
+  \item Interface in the Linux kernel used for interrupt mitigation in
+        network drivers
+  \item Principe: when the network traffic exceeds a given threshhold
+        ("budget"), disable network interrupts and consume incoming packets
+        through a polling function, instead of processing each new
+        packet with an interrupt.
+  \item This reduces overhead due to interrupts and yields better
+        network throughput.
+  \item The polling function is run by \kfunc{napi_schedule}, which uses
+        \ksym{NET_RX_SOFTIRQ}.
+  \item See \url{https://en.wikipedia.org/wiki/New_API} for details
+  \item See also our commented network driver on \url{https://frama.link/qCaWu1-U}
+  \end{itemize}

More information about the training-materials-updates mailing list