<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Blog on Erich&#39;s Site</title>
    <link>https://hanserich.com/blog/</link>
    <description>Recent content in Blog on Erich&#39;s Site</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 14 Jun 2025 00:00:00 +0000</lastBuildDate>
      <atom:link href="https://hanserich.com/blog/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>eBPF, XDP and Kernel Bypass</title>
      <link>https://hanserich.com/blog/ebpf_xdp_and_kernel_bypass/</link>
      <pubDate>Sat, 14 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://hanserich.com/blog/ebpf_xdp_and_kernel_bypass/</guid>
      <description>&lt;p&gt;🧠 Is eBPF a Kernel Bypass? Clearing the Confusion&lt;/p&gt;&#xA;&lt;p&gt;eBPF (extended Berkeley Packet Filter) has exploded in popularity for observability, security, and networking on Linux. But if you’ve browsed Reddit or Hacker News, you’ve probably seen people claim:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;“eBPF runs in userspace.”&#xA;“eBPF is a kernel bypass.”&#xA;“eBPF replaces DPDK!”&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Let’s clear the fog. In this post, we’ll walk through what eBPF really is, where it runs, and whether it qualifies as a “kernel bypass.”&#xA;🔍 What Is eBPF?&lt;/p&gt;&#xA;&lt;p&gt;At its core, eBPF is a virtual machine inside the Linux kernel that allows you to attach tiny programs to key parts of the system — like syscalls, network packet processing, or tracing events.&lt;/p&gt;&#xA;&lt;p&gt;You write these eBPF programs in userspace, typically in C, and then load them into the kernel via a syscall (bpf()), where they are verified and JIT-compiled to native code.&lt;/p&gt;&#xA;&lt;p&gt;So:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;📦 Written in userspace&#xA;&#xA;🚀 Executed in kernel space&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;🤔 So… Is eBPF a Kernel Bypass?&lt;/p&gt;&#xA;&lt;p&gt;No. eBPF is not a kernel bypass. In fact, it’s the opposite.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;eBPF runs inside the kernel and operates with kernel cooperation.&#xA;&#xA;It extends the kernel&#39;s capabilities safely and dynamically.&#xA;&#xA;It is sandboxed, verified, and runs in specific hook points (e.g., network ingress, syscall entry, kprobes, tracepoints, etc.).&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;✅ eBPF Enhances Kernel Behavior&#xA;❌ eBPF Does Not Bypass the Kernel&#xA;🧵 Why Do People Say eBPF “Runs in Userspace”?&lt;/p&gt;&#xA;&lt;p&gt;There’s a grain of truth, but it’s misleading.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;eBPF code is developed and compiled in userspace.&#xA;&#xA;You use userspace tools like clang, bpftool, bcc, libbpf, or bpftool prog load to load programs into the kernel.&#xA;&#xA;But once loaded, eBPF programs run in kernel context, not in userspace.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Saying “eBPF runs in userspace” is like saying &amp;ldquo;drivers run in Notepad because you wrote them there.&amp;rdquo; It’s true that you write them in userspace, but they run in kernelspace.&#xA;⚡ But What About XDP or AF_XDP?&lt;/p&gt;&#xA;&lt;p&gt;Good question!&lt;/p&gt;&#xA;&lt;p&gt;These are part of the eBPF ecosystem, especially in networking.&#xA;Technology&#x9;Runs In&#x9;Description&#xA;XDP&#x9;Kernel (very early)&#x9;Processes packets in the driver before the kernel stack. Used for fast packet filtering and redirection.&#xA;AF_XDP&#x9;Userspace&#x9;A socket type that allows zero-copy packet I/O between NIC and userspace. Can act as a true kernel bypass.&#xA;DPDK&#x9;Userspace&#x9;Full kernel bypass. Userland packet processing with direct NIC access via UIO or VFIO.&lt;/p&gt;&#xA;&lt;p&gt;So if you want true kernel bypass, you’ll use DPDK or AF_XDP in zero-copy mode. eBPF + XDP can drop or redirect packets before they hit the TCP/IP stack, but it’s still happening inside the kernel.&#xA;🧠 Summary&#xA;Statement&#x9;✅ / ❌&#x9;Clarification&#xA;eBPF runs in kernel space&#x9;✅&#x9;After loading, eBPF executes in the kernel&#xA;eBPF is a kernel bypass&#x9;❌&#x9;It extends the kernel, not bypasses it&#xA;You write eBPF in userspace&#x9;✅&#x9;Then it’s loaded into kernel&#xA;XDP can avoid the kernel network stack&#x9;⚠️&#x9;Partially true — it avoids the full stack but is still in kernel&#xA;AF_XDP and DPDK bypass the kernel&#x9;✅&#x9;These give userland access to NICs&#xA;🛠️ Want to Go Deeper?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Build an XDP program to drop or redirect packets&#xA;&#xA;Compare DPDK vs AF_XDP vs XDP in real benchmarks&#xA;&#xA;Trace syscalls with eBPF using tools like bcc or bpftrace&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;🔚 Conclusion&lt;/p&gt;&#xA;&lt;p&gt;eBPF is a powerful in-kernel extension mechanism, not a bypass. If you&amp;rsquo;re aiming for extreme packet throughput or latency reduction in userland, consider AF_XDP or DPDK. But for safety, flexibility, and observability — eBPF is unmatched.&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re confused by what runs where, just remember:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;You write in userspace, but eBPF thinks in kernelspace.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</description>
    </item>
    <item>
      <title>Open Source as an Ideology</title>
      <link>https://hanserich.com/blog/oss_as_an_ideology/</link>
      <pubDate>Thu, 24 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://hanserich.com/blog/oss_as_an_ideology/</guid>
      <description>&lt;p&gt;As a tech enthusiast or IT engineer, we are already familiar with Open Source Software (OSS). Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Open source is a concept of accessible code base and we can modify the code by every one, also we can contribute to the development of the prject as a community (with some license of course). This concept was spread after linux was introduced to the world. As an IT concept open source was proven to accelerate the development for new technology by its opennes concept.&lt;/p&gt;&#xA;&lt;h2 id=&#34;open-source-as-an-ideology&#34;&gt;Open Source as an Ideology&lt;/h2&gt;&#xA;&lt;p&gt;As I explained earlier, open source is about transparancy, collaboration and freedom. Let&amp;rsquo;s think about it, if we contemplate this idea and then remove the code or software development concept, it becomes a powerful philosophical approach.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Transparancy:&lt;/strong&gt; Everyone can see how something works.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Collaboration:&lt;/strong&gt; Everyone can contribute to make it better or bigger, not just expert but anyone who have insight or ideas.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Freedom:&lt;/strong&gt; Anyone can modify or adopt the system to suit their needs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This models contrasts sharply with many traditional system-corporate, governemental, also educational that often operate under hierarchy, secrecy and control.&lt;/p&gt;&#xA;&lt;h2 id=&#34;open-source-as-a-social-movement&#34;&gt;Open Source as a Social Movement&lt;/h2&gt;&#xA;&lt;p&gt;When treated as a movement, open source embodies principles that align closely with decentralization, community-driven action and equity. This movement pushes back the centralized and monopolization of knowledge and power, against the monopolar hegemony and encourage the uni-polar system to distributed ownership.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Education: Open Knowledge for All&#xA;The rise of Open Educational Resources (OER) is democratizing access to learning. Free textbooks, courses (like MIT OpenCourseWare or Khan Academy), and community-driven teaching platforms embody open-source ideals. Education becomes a shared responsibility—not a commodity.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Government: Open Data and Civic Tech&#xA;In the public sector, movements for open data and open governance allow citizens to access and interpret information, hold institutions accountable, and even co-develop policies. Projects like Code for America apply open-source approaches to civic engagement.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Science and Research: Collaborative Discovery&#xA;The traditional academic publishing model is being disrupted by open-access journals and platforms like arXiv and Sci-Hub. Researchers are increasingly sharing methods, data, and results in real-time, accelerating the pace of innovation.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Art and Culture: Creative Commons&#xA;Platforms like Creative Commons allow artists to license their work in ways that encourage remixing, reuse, and collaboration. The idea of rigid copyright is softened, and creativity becomes more communal.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;open-source-in-daily-life-even-if-youre-not-a-developer&#34;&gt;Open Source in Daily Life (Even if You’re Not a Developer)&lt;/h2&gt;&#xA;&lt;p&gt;Many people are already living &amp;ldquo;open source&amp;rdquo; lives—they just don’t call it that.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A gardener who shares plant cuttings and cultivation tips.&lt;/li&gt;&#xA;&lt;li&gt;A teacher uploading free worksheets online.&lt;/li&gt;&#xA;&lt;li&gt;An activist creating a toolkit for organizing that others can use and adapt.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The open-source ideology empowers individuals and communities to own their tools, their knowledge, and their future.&lt;/p&gt;&#xA;&lt;h2 id=&#34;governemnt-and-geopolotics-with-open-source-principles&#34;&gt;Governemnt and Geopolotics with Open Source Principles&lt;/h2&gt;&#xA;&lt;p&gt;We have several governement system that applied to the nations. On a bigger picture there are 2 systems that widely used, Republic and Monarchy. Those systems have its inheritance, but mostly it is republic and monarchy. If we saw the open source principle, it is closely to the republic idea but is it republic decentralized? community-driven? The republican enthusiast would say &amp;ldquo;yes!!!&amp;rdquo;, but is it really true? I don&amp;rsquo;t think so. As Socrates critics to the republic, it will only produce the demagog. I saw in some countries that Socrates&amp;rsquo;s words come true. No community words taken, centralized system and disrepancy that occured.&lt;/p&gt;&#xA;&lt;p&gt;For me, open source priciple as an ideology is a &lt;strong&gt;&amp;ldquo;patch&amp;rdquo;&lt;/strong&gt; for current republic idea. If we can apply the open source principle combined with republic idea, I think it will be a game changer for current governement system. As world growing, and world become monopolar that means only one super power country that acts as a world governmet (reminds me on one piece btw). This situation already predicted by Socrates, that even democratic system at some point would be worst as another system if a power lays on a single subject. Another block from east try to against this mono-polar like system with idea of collaboration, decentralization and transparancy. This head-to-head ideas brings by a powerful countries worth to wait, prepare the pop corn and cola to watch what look like this world ended up.&lt;/p&gt;&#xA;&lt;h2 id=&#34;but-there-are-challenges&#34;&gt;But There Are Challenges…&lt;/h2&gt;&#xA;&lt;p&gt;Open source isn’t perfect. Whether in software or society, it comes with tough questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Who maintains and moderates open systems?&lt;/li&gt;&#xA;&lt;li&gt;How do we fund contributions in a world driven by profit?&lt;/li&gt;&#xA;&lt;li&gt;How do we prevent exploitation of free labor and ideas?&lt;/li&gt;&#xA;&lt;li&gt;How do we ensure open doesn’t mean “lawless” or “unstructured”?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These are ongoing debates—even within the software world—and they become even more complex when applied to broader societal models. Yeah there are no perfect or ideal concept o ideology, we just need to rethink and patch our ideology to fit our necesities.&lt;/p&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Open_source&#34;&gt;https://en.wikipedia.org/wiki/Open_source&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Open-source_software&#34;&gt;https://en.wikipedia.org/wiki/Open-source_software&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://codeforamerica.org/&#34;&gt;https://codeforamerica.org/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;</description>
    </item>
    <item>
      <title>Self Employed</title>
      <link>https://hanserich.com/blog/self-employed/</link>
      <pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://hanserich.com/blog/self-employed/</guid>
      <description>&lt;p&gt;Maybe some of you have same issue like me, have a job but also have side project for fun. If you are like me, it means we are not alone. There are several people who like us, don&amp;rsquo;t worry :) &amp;ldquo;at first I thought I was alone LOL&amp;rdquo;. It is normal for a person who are incapable to do &amp;ldquo;a doing nothing&amp;rdquo; work. In this page, I would like to sharing my &amp;ldquo;Self Employed&amp;rdquo; work with you.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s began while I was studying my Diploma degree, or maybe when I was highschool student. I was a person that loves learning a new thing, especially strategy game. So despite I was going to school for study, sometimes I just go to school&amp;rsquo;s hall to play board game or became football tactic maker. And then this behavior continued until college. I&amp;rsquo;m very passionate in learning new thing and finally start my first self project, that I called &amp;ldquo;A Computer that can See&amp;rdquo;. It is basically just a computer vision.&lt;/p&gt;&#xA;&lt;p&gt;For honest doing programming or computer science is just a hobby, actually my passion lay on pure science. But the universe guide me to join telecommunication engineering, and I decided to focused on computer science as the project reference. For me, it is fun to worked in this field and I became passionate with this field. Until I got my first job in Telecom industry, I still working on my project for pure science and computer science. Fortunately, those fields are related each other so I can work on those project together. Yeas every knowledge must be related each other in some ways.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
