<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anand H V on Medium]]></title>
        <description><![CDATA[Stories by Anand H V on Medium]]></description>
        <link>https://medium.com/@anand.hv123?source=rss-c49f87af3fa1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vgJD_RgIVdI4G3O3.</url>
            <title>Stories by Anand H V on Medium</title>
            <link>https://medium.com/@anand.hv123?source=rss-c49f87af3fa1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 16:04:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anand.hv123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Go 1.26 Is Around the Corner: Small Changes, Big Impact for Real-World Go Systems]]></title>
            <link>https://medium.com/@anand.hv123/go-1-26-is-around-the-corner-small-changes-big-impact-for-real-world-go-systems-b7e5bd271f51?source=rss-c49f87af3fa1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e5bd271f51</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[news]]></category>
            <dc:creator><![CDATA[Anand H V]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 13:14:44 GMT</pubDate>
            <atom:updated>2025-12-20T13:14:44.348Z</atom:updated>
            <content:encoded><![CDATA[<p>Go 1.26 doesn’t introduce dramatic syntax changes or paradigm shifts — and that’s intentional. Instead, it focuses on the kinds of refinements that matter when you’re running <strong>long-lived backend services, high-throughput APIs, or performance-sensitive systems</strong>: reducing boilerplate, tightening runtime behavior, and improving tooling where engineers actually feel pain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9EdnUlfNxQmND43arkRoQ.jpeg" /></figure><p>This release is less about learning new tricks and more about <strong>removing friction you’ve quietly accepted over the years</strong>. From cleaner pointer initialization to a garbage collector tuned for modern workloads, Go 1.26 quietly raises the bar for production Go.</p><p>This article walks through what’s new in Go 1.26, <strong>why these changes were introduced</strong>, and <strong>how they solve real problems</strong>, all based strictly on the official Go 1.26 release notes.</p><h3>Why Go 1.26 Matters (Even If It Looks “Small”)</h3><p>Go’s evolution has always favored <strong>predictability over novelty</strong>. That philosophy is especially visible in Go 1.26.</p><p>None of the changes here force rewrites. None break existing code. But together, they address problems teams hit at scale:</p><ul><li>Too much boilerplate around pointer values</li><li>GC overhead in allocation-heavy services</li><li>Profiling tools that don’t surface insights fast enough</li><li>Tooling that lags behind how teams actually upgrade code</li></ul><blockquote>Go 1.26 is about making day-to-day engineering easier, in ways that quietly add up over the years.</blockquote><h3>TL;DR — What’s New in Go 1.26</h3><ul><li><strong>Cleaner pointer initialization</strong> with new(expr) — less boilerplate in APIs and config structs</li><li><strong>Green Tea GC becomes default</strong>, improving performance for allocation-heavy services</li><li><strong>~30% faster cgo calls</strong>, reducing overhead when integrating with native libraries</li><li><strong>Faster small object allocations</strong>, speeding up common hot paths automatically</li><li><strong>Smarter </strong><strong>go fix</strong>, rebuilt on the analysis framework for safer upgrades</li><li><strong>Unified </strong><strong>go doc command</strong>, simplifying documentation discovery</li><li><strong>pprof now defaults to flame graphs</strong>, making performance bottlenecks easier to spot</li><li><strong>New </strong><strong>crypto/hpke package</strong> for modern, standardized encryption workflows</li><li><strong>Experimental </strong><strong>runtime/secret</strong> for safer handling of sensitive data</li><li><strong>Experimental SIMD support (</strong><strong>simd/archsimd)</strong>, pushing Go closer to low-level performance</li></ul><h3>Language Improvement: new(expr) — Less Boilerplate, Clearer Intent</h3><p>Go 1.26 allows new to accept an expression instead of just a type. This removes the need for temporary variables when initializing pointer fields, especially common in API models and configuration structs. It makes intent clearer and code easier to read.</p><blockquote>What Changed?</blockquote><p>Before Go 1.26, new could only accept a type. Now it can accept an <strong>expression</strong>.</p><blockquote>Why This Was Introduced</blockquote><p>In real systems, pointers are often used to represent <strong>optional values</strong>, not mutability. This shows up everywhere: JSON APIs,config structs,protobufs.</p><p>Before Go 1.26, initializing pointer fields meant awkward patterns:</p><h4>Example</h4><pre>type User struct {<br>    Name string `json:&quot;name&quot;`<br>    Age  *int   `json:&quot;age,omitempty&quot;`<br>}</pre><pre>func NewUser(name string, dob time.Time) User {<br>    return User{<br>        Name: name,<br>        Age:  new(yearsSince(dob)),<br>    }<br>}</pre><blockquote>Why This Matters</blockquote><ul><li>Cleaner struct literals</li><li>Less noise around temporary variables</li><li>Code that reads closer to intent</li></ul><h3>Tooling Evolution: go fix Finally Grows Up</h3><p>The go fix command is now built on Go’s analysis framework, the same foundation used by go vet. This enables smarter, analyzer-driven code fixes that align with current best practices, making large codebase upgrades safer and more predictable.</p><blockquote>What Changed?</blockquote><p>go fix has been rebuilt using the same <strong>analysis framework</strong> that powers go vet. Old fixers are removed; new ones are analyzer-driven and future-proof.</p><blockquote>Why This Exists</blockquote><p>Upgrading Go versions in large codebases is rarely trivial. Teams want:</p><ul><li>Safe automation</li><li>Minimal manual refactoring</li><li>Confidence that fixes reflect current best practices</li></ul><p>The new go fix is designed for <strong>real upgrade workflows</strong>, not toy examples.</p><blockquote>Where This Helps</blockquote><ul><li>Gradual modernization of legacy services</li><li>CI pipelines that auto-apply safe upgrades</li><li>Large mono-repos moving across Go versions</li></ul><h3>Documentation Cleanup: One go doc Command</h3><p>Multiple documentation commands have been removed in favor of a single go doc entry point. This simplifies documentation access, reduces cognitive overhead, and makes it easier for developers—especially newcomers—to find what they need quickly.</p><blockquote>What Changed?</blockquote><p>Go 1.26 removes cmd/doc and go tool doc. Everything is consolidated under</p><blockquote>Why This Matters</blockquote><p>This is a classic example of Go reducing <strong>cognitive overhead</strong>. Multiple commands existed for historical reasons, not because developers needed them.</p><p>The result:</p><ul><li>Simpler mental model</li><li>Easier onboarding</li><li>Fewer “which command should I use?” moments</li></ul><p>Small change, real usability win.</p><h3>Profiling Made Practical: pprof Defaults to Flame Graphs</h3><p>The pprof web UI now opens with flame graphs by default. Flame graphs make it immediately clear where CPU time is spent, helping engineers identify bottlenecks faster during performance tuning or incident response.</p><blockquote>What Changed?</blockquote><p>When you open the pprof web UI, it now defaults to <strong>flame graphs</strong>.</p><blockquote>Why This Matters in Production</blockquote><p>Flame graphs answer the first question engineers ask during performance issues:</p><blockquote><em>“Where is my time actually going?”</em></blockquote><ul><li>Speeds up investigations</li><li>Lowers the barrier for newer engineers</li><li>Improves signal during incidents</li></ul><p>This is tooling evolving to match real-world usage.</p><h3>Runtime &amp; Performance Improvements (The Quiet Wins)</h3><h4>Green Tea Garbage Collector Becomes Default</h4><p><strong><em>Lighter, cleaner, and easier on the system — like green tea compared to heavy coffee.</em></strong></p><p>What the name implies (but does not technically define)</p><p><strong>Green</strong> → better locality, efficiency, and less waste</p><p><strong>Tea</strong> → smooth, steady behavior instead of sharp spikes</p><p>The Green Tea garbage collector, previously experimental, is now the default in Go 1.26. It improves scalability and efficiency for programs that allocate many small objects, which is common in high-throughput backend services</p><blockquote>Why It Exists</blockquote><p>Modern Go services allocate lots of small objects and run on multi-core machines. Green Tea improves locality and scalability for these workloads.</p><blockquote>Real-World Impact</blockquote><ul><li>Lower GC CPU usage</li><li>Better throughput under load</li><li>More predictable latency</li></ul><p>Opt-out remains available, preserving control for sensitive systems.</p><h3>Faster cgo Calls</h3><p>Go 1.26 reduces the baseline overhead of cgo calls by about 30%. This directly benefits systems that interact with native libraries, system APIs, or telecom and cryptography stacks — without requiring any code changes.</p><blockquote>Why This Matters</blockquote><p>If your system integrates with:</p><ul><li>Native libraries</li><li>Telecom stacks</li><li>Cryptography or system APIs</li></ul><p>cgo overhead becomes visible. Go 1.26 reduces baseline cgo call overhead by about 30% — with <strong>no code changes</strong>.</p><h3>Faster Small Allocations</h3><p>The compiler now uses specialized allocation paths for small objects under 512 bytes. Since most real-world Go programs allocate many small objects, this change improves performance in critical paths like request handling and serialization.</p><blockquote>Why This Exists</blockquote><p>Small allocations dominate real Go programs:</p><ul><li>HTTP handlers</li><li>JSON decoding</li><li>Logging and metrics</li></ul><p>This change improves hot paths silently — exactly how performance improvements should work.</p><h3>Standard Library Additions: Security &amp; Performance Focus</h3><blockquote>crypto/hpke</blockquote><p>The new crypto/hpke package implements Hybrid Public Key Encryption (RFC 9180). It enables modern, standardized encryption workflows directly in the Go standard library, reducing reliance on third-party crypto implementations.</p><blockquote>Why it matters:</blockquote><ul><li>Modern cryptographic workflows</li><li>Secure key exchange patterns</li><li>Fewer third-party dependencies</li></ul><blockquote>simd/archsimd (Experimental)</blockquote><p>This experimental package provides architecture-specific SIMD helpers. It’s designed for high-performance workloads such as data processing and telemetry, signaling Go’s continued push toward efficient low-level computation.</p><p>Architecture-specific SIMD helpers.</p><p>Useful for:</p><ul><li>High-performance data processing</li><li>Telemetry pipelines</li><li>Compute-heavy workloads</li></ul><p>Experimental, but a clear signal of Go’s performance direction.</p><blockquote>runtime/secret (Experimental)</blockquote><p>The runtime/secret package allows sensitive data to be securely erased from memory. This helps reduce the risk of leaking secrets such as cryptographic keys or tokens during or after sensitive operations.</p><p>Allows secure erasure of sensitive memory.</p><p>Real-world relevance:</p><ul><li>Cryptographic keys</li><li>Authentication tokens</li><li>Temporary secrets</li></ul><p>This is about defense-in-depth, not convenience.</p><h3>Pros &amp; Cons Summary</h3><blockquote>What Go 1.26 Does Well</blockquote><p>Improves productivity without new abstractions<br>Delivers performance gains transparently<br>Aligns tooling with real engineering workflows</p><blockquote>Where It’s Conservative</blockquote><p>Few headline-grabbing features<br>Experimental APIs still evolving<br>Benefits compound gradually, not instantly</p><h3>1-Minute Executive Summary (For Architects &amp; Leadership)</h3><blockquote><strong>What is Go 1.26?</strong></blockquote><p>A stability-focused Go release that improves performance, tooling, and developer ergonomics without breaking compatibility.</p><blockquote><strong>Why it matters</strong></blockquote><ul><li>Reduced boilerplate and cleaner APIs</li><li>Better GC behavior for modern workloads</li><li>Faster native integrations</li><li>Safer, smarter upgrade tooling</li></ul><blockquote><strong>Business impact</strong></blockquote><ul><li>Lower operational overhead</li><li>Faster developer iteration</li><li>Performance improvements without rewrites</li><li>Reduced upgrade risk</li></ul><blockquote><strong>Bottom line</strong></blockquote><p>Go 1.26 doesn’t change how teams write Go — it makes everything around it work better.</p><h3>Final Thoughts</h3><p>Go 1.26 won’t impress you with flash — and that’s exactly why it’s powerful. It focuses on the realities of production systems: performance under load, maintainability over time, and tooling that helps rather than distracts. These changes don’t demand attention, but they reward it. For teams building serious, long-lived systems, Go 1.26 quietly reinforces why Go remains one of the most dependable choices in backend engineering.</p><p>This article is published in collaboration with <a href="https://medium.com/u/1ff592c6d739">Sadanand Dodawadakar</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e5bd271f51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5G Data Session: An End-to-End Call Flow Deep Dive]]></title>
            <link>https://medium.com/@anand.hv123/5g-data-session-an-end-to-end-call-flow-deep-dive-ac896df596e6?source=rss-c49f87af3fa1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac896df596e6</guid>
            <dc:creator><![CDATA[Anand H V]]></dc:creator>
            <pubDate>Thu, 15 May 2025 10:25:33 GMT</pubDate>
            <atom:updated>2025-05-15T10:27:38.279Z</atom:updated>
            <content:encoded><![CDATA[<p>A 5G data session enables User Equipment (UE) like smartphones and other devices to connect to the internet or other data networks through the 5G network. This process involves a sophisticated interplay between various network functions (NFs) in both the Radio Access Network (RAN) and the 5G Core (5GC). Here’s a breakdown of the end-to-end call flow, detailing each node and differentiating between control and data flow.</p><p>Here’s a detailed breakdown of the end-to-end call flow for a 5G data session, explaining the role of each key network node in both control and data flow:</p><p><strong>End-to-End Call Flow for PDU Session Establishment:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZwFYjYmAHAxWyINp0-Tng.png" /></figure><blockquote><strong>Key 5G Entities in the Diagram</strong></blockquote><ul><li><strong>UE:</strong> User Equipment</li><li><strong>gNB:</strong> next-generation NodeB (Base Station)</li><li><strong>AMF:</strong> Access and Mobility Management Function</li><li><strong>AUSF:</strong> Authentication Server Function</li><li><strong>UDM:</strong> Unified Data Management</li><li><strong>SMF:</strong> Session Management Function</li><li><strong>PCF:</strong> Policy Control Function</li><li><strong>UPF:</strong> User Plane Function</li><li><strong>CHF:</strong> Charging Function</li><li><strong>DN:</strong> Data Network</li></ul><blockquote><strong>Key Network Nodes Involved:</strong></blockquote><ul><li><strong>User Equipment (UE):</strong> The user’s device (e.g., smartphone, tablet, IoT sensor) that initiates and terminates the data session.</li><li><strong>gNB (next-generation NodeB):</strong> The 5G base station in the Radio Access Network (RAN). It manages radio resources and communication with the UE.</li><li><strong>AMF (Access and Mobility Management Function):</strong> The primary control plane function in the 5GC. It handles UE registration, connection management, reachability, and mobility management. It’s the initial point of contact for the UE in the 5GC.</li><li><strong>SMF (Session Management Function):</strong> Responsible for managing PDU (Packet Data Unit) sessions. This includes PDU session establishment, modification, and release. It handles IP address allocation, selects and controls the UPF, and interacts with PCF for policy enforcement.</li><li><strong>UPF (User Plane Function):</strong> The core network function that handles the user data traffic. It performs packet routing and forwarding, packet inspection, QoS handling, and acts as the interconnect point to the Data Network (DN). It’s the anchor point for user plane data.</li><li><strong>AUSF (Authentication Server Function):</strong> Performs authentication of the UE.</li><li><strong>UDM (Unified Data Management):</strong> Stores subscriber data, including subscription profiles, authentication credentials, and policy information. It’s analogous to HSS in 4G.</li><li><strong>PCF (Policy Control Function):</strong> Provides policy rules for controlling network behavior, including QoS and charging policies. It interacts with the SMF to enforce these policies for PDU sessions.</li><li><strong>DN (Data Network):</strong> The external network the UE wants to connect to (e.g., internet, enterprise intranet, IMS).</li></ul><p>The establishment of a PDU session is a UE-initiated process. Here’s a simplified flow:</p><blockquote><strong>Phase 1: Initial Access and Registration (Control Plane)</strong></blockquote><p>This phase occurs if the UE is not already registered with the network.</p><ol><li><strong>UE -&gt; gNB: RRC Connection Request:</strong> The UE initiates a connection with the gNB to send initial signaling messages.</li><li><strong>gNB &lt;-&gt; UE: RRC Connection Setup:</strong> The gNB and UE establish a Radio Resource Control (RRC) connection.</li><li><strong>UE -&gt; gNB -&gt; AMF: Registration Request (NAS Message):</strong> The UE sends a Non-Access Stratum (NAS) message containing the Registration Request to the gNB. The gNB forwards this to the AMF. This message includes the UE’s identity (e.g., SUPI or SUCI) and requested S-NSSAI (Network Slice Selection Assistance Information), if any.</li><li><strong>AMF -&gt; AUSF: Authentication Request:</strong> The AMF selects an AUSF and sends an authentication request.</li><li><strong>AUSF &lt;-&gt; UDM: Authentication Data Retrieval:</strong> The AUSF retrieves authentication vectors from the UDM.</li><li><strong>AUSF &lt;-&gt; AMF &lt;-&gt; gNB &lt;-&gt; UE: Authentication Challenge/Response:</strong> The UE is challenged to prove its identity. Security procedures (NAS security context establishment) are performed.</li><li><strong>AMF -&gt; UDM: UE Context Registration/Update:</strong> If authentication is successful, the AMF informs the UDM about the UE’s serving AMF. The AMF may retrieve subscription data from the UDM.</li><li><strong>AMF -&gt; UE (via gNB): Registration Accept (NAS Message):</strong> The AMF sends a Registration Accept message to the UE, indicating successful registration. This may include a temporary identifier (5G-GUTI).</li></ol><blockquote><strong>Phase 2: PDU Session Establishment (Control Plane)</strong></blockquote><p>Once registered (or if already registered and in an idle state, a Service Request procedure might precede this), the UE can request a PDU session.</p><h4><strong>UE -&gt; AMF (via gNB): PDU Session Establishment Request (NAS Message):</strong></h4><p><strong>Details:</strong> The UE sends a NAS message to the AMF requesting the establishment of a PDU session. This message includes:</p><ul><li>PDU Session ID, PDU Session Type (IPv4, IPv6, IPv4v6, Ethernet, Unstructured),Data Network Name (DNN) — identifies the target Data Network,S-NSSAI (Single Network Slice Selection Assistance Information) — indicates the network slice instance for this PDU session.</li><li>Requested QoS parameters.</li></ul><p><em>Node Roles:</em></p><ul><li><strong>UE:</strong> Initiates the request with session parameters.</li><li><strong>gNB:</strong> Forwards the NAS message transparently to the AMF over the NGAP (NG Application Protocol) interface.</li><li><strong>AMF:</strong> Receives the request and validates it. It selects an SMF based on the DNN, S-NSSAI, and local configuration.</li></ul><h4><strong>AMF -&gt; SMF: Nsmf_PDUSession_CreateSMContext Request:</strong></h4><p><strong>Details:</strong> The AMF forwards the PDU session establishment request to the selected SMF. It includes UE identity, DNN, S-NSSAI, PDU Session ID, AMF ID, and other relevant parameters.</p><p><em>Node Roles:</em></p><ul><li><strong>AMF:</strong> Selects the SMF and initiates the SM Context creation.</li><li><strong>SMF:</strong> Receives the request to create a Session Management (SM) context for the PDU session.</li></ul><h4><strong>SMF -&gt; UDM: Subscription Data Retrieval (if needed):</strong></h4><p><strong>Details:</strong> The SMF may query the UDM to retrieve subscription data related to session management for the given DNN and S-NSSAI (e.g., subscribed QoS profiles, roaming restrictions).</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Initiates retrieval of relevant subscriber policies.</li><li><strong>UDM:</strong> Provides the requested subscription data to the SMF.</li></ul><h4><strong>SMF: PDU Session Authentication/Authorization (if required by DN):</strong></h4><p><strong>Details:</strong> Depending on the DN, the SMF might trigger an authentication/authorization procedure with the DN via the UPF.</p><h4><strong>SMF: UPF Selection and IP Address Allocation:</strong></h4><p><strong>Details:</strong> The SMF selects an appropriate UPF to handle the user plane traffic for this PDU session. Factors for UPF selection include location, load, S-NSSAI, and DNN. The SMF also allocates an IP address/prefix for the UE for this PDU session (or obtains it from an external server like DHCP integrated with the UPF or DN).</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Makes crucial decisions about user plane path and IP addressing.</li></ul><h4><strong>SMF -&gt; PCF: Policy and Charging Control (PCC) Rule Request (if dynamic PCC is used):</strong></h4><p><strong>Details:</strong> The SMF interacts with the PCF to obtain applicable policy and charging control rules for the PDU session. This includes QoS rules (e.g., 5QI, ARP, GFBR, MFBR), charging information, and service data flow templates.</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Requests policy information.</li><li><strong>PCF:</strong> Provides policy decisions based on subscription data (from UDR accessed via UDM or directly), operator policies, and potentially application function (AF) requests.</li></ul><h4><strong>SMF -&gt; UPF: N4 Session Establishment Request:</strong></h4><p><strong>Details:</strong> The SMF instructs the selected UPF to establish an N4 session context. This involves providing the UPF with rules for packet handling, forwarding, QoS enforcement, and reporting for this PDU session. This includes information like PDRs (Packet Detection Rules), FARs (Forwarding Action Rules), QERs (QoS Enforcement Rules), and URR (Usage Reporting Rules).</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Configures the UPF for the user plane path.</li><li><strong>UPF:</strong> Creates the N4 session context and allocates necessary resources for user plane traffic processing. It will establish a GTP-U tunnel endpoint.</li></ul><h4><strong>UPF -&gt; SMF: N4 Session Establishment Response:</strong></h4><p><strong>Details:</strong> The UPF acknowledges the N4 session establishment and provides its user plane address (GTP-U Tunnel Endpoint Identifier — TEID) for the N3 interface (between gNB and UPF) and N9 interface (if an intermediate UPF is involved).</p><p><em>Node Roles:</em></p><ul><li><strong>UPF:</strong> Confirms readiness to handle user data.</li><li><strong>SMF:</strong> Receives confirmation and UPF user plane addressing information.</li></ul><h4><strong>SMF -&gt; AMF: Nsmf_PDUSession_CreateSMContext Response:</strong></h4><p><strong>Details:</strong> The SMF responds to the AMF, indicating the success or failure of the SM context creation. It includes parameters like the PDU session ID, QoS parameters approved by the network, and the N2 SM Information (which contains PDU Session ID, QoS profile, and UPF N3 TEID and IP address for the gNB).</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Signals outcome of its session setup procedures.</li><li><strong>AMF:</strong> Receives the response and prepares to convey it to the UE and gNB.</li></ul><h4><strong>AMF -&gt; gNB (UE): PDU Session Establishment Accept (NAS Message conveyed via NGAP Initial Context Setup Request / PDU Session Resource Setup Request):</strong></h4><p><strong>Details:</strong> The AMF sends a NAS message “PDU Session Establishment Accept” to the UE via the gNB. This NAS message is typically carried within an NGAP message (e.g., PDU Session Resource Setup Request or as part of Initial Context Setup if it’s the first PDU session). The NGAP message to the gNB includes:</p><ul><li>The NAS PDU Session Establishment Accept message (containing PDU Session ID, authorized QoS Rules, UE IP address).</li><li>N2 SM Information (PDU Session ID, QoS profile, UPF N3 address and TEID).</li><li>Security context information.</li></ul><p><em>Node Roles:</em></p><ul><li><strong>AMF:</strong> Instructs gNB to set up radio resources and forwards the NAS accept to UE.</li><li><strong>gNB:</strong> Receives the request and the UPF’s N3 user plane address and TEID. It establishes the necessary radio bearers (DRBs — Data Radio Bearers) with the UE according to the QoS profile. It also stores the N3 UPF information for forwarding uplink data.</li></ul><h4><strong>gNB &lt;-&gt; UE: RRC Reconfiguration (for DRB setup):</strong></h4><p><strong>Details:</strong> The gNB configures the UE with the radio bearer parameters for the new PDU session using RRC messages.</p><p><em>Node Roles:</em></p><ul><li><strong>gNB:</strong> Manages radio resources and configures UE.</li><li><strong>UE:</strong> Accepts RRC configuration and establishes DRBs.</li></ul><h4><strong>gNB -&gt; AMF: PDU Session Resource Setup Response / Initial Context Setup Response:</strong></h4><p><strong>Details:</strong> The gNB confirms to the AMF that the radio resources for the PDU session have been successfully established. It includes its own N3 user plane address and TEID for downlink data.</p><p><em>Node Roles:</em></p><ul><li><strong>gNB:</strong> Confirms radio resource setup.</li><li><strong>AMF:</strong> Receives confirmation.</li></ul><h4><strong>AMF -&gt; SMF: Nsmf_PDUSession_UpdateSMContext Request (N2 SM Info from gNB):</strong></h4><p><strong>Details:</strong> The AMF informs the SMF that the N2 resources have been set up. It forwards the gNB’s N3 address and TEID to the SMF.</p><p><em>Node Roles:</em></p><ul><li><strong>AMF:</strong> Relays gNB user plane information to SMF.</li><li><strong>SMF:</strong> Receives gNB user plane information.</li></ul><h4><strong>SMF -&gt; UPF: N4 Session Modification Request (if needed):</strong></h4><p><strong>Details:</strong> The SMF updates the UPF with the gNB’s N3 address and TEID for downlink traffic forwarding.</p><p><em>Node Roles:</em></p><ul><li><strong>SMF:</strong> Instructs UPF with downlink path information.</li><li><strong>UPF:</strong> Updates its N4 session context to forward downlink packets to the correct gNB.</li></ul><h4><strong>UPF -&gt; SMF: N4 Session Modification Response:</strong></h4><p><strong>Details:</strong> UPF acknowledges the update.</p><p><em>Node Roles:</em></p><ul><li><strong>UPF:</strong> Confirms update.</li><li><strong>SMF:</strong> Receives confirmation.</li></ul><h4>SMF -&gt; AMF: Nsmf_PDUSession_UpdateSMContext Response:</h4><p><strong>Details:</strong> SMF acknowledges the update from AMF.</p><blockquote><strong>Phase 3: Data Transfer (User Plane)</strong></blockquote><p>Once the PDU session is established, user data can flow.</p><h4><strong>Uplink (UE -&gt; DN):</strong></h4><ol><li><strong>UE:</strong> Generates IP packets.</li><li><strong>UE -&gt; gNB:</strong> Sends data over the established Data Radio Bearer (DRB) using the 5G NR air interface.</li><li><strong>gNB:</strong> Receives the data, encapsulates it in a GTP-U tunnel (using the N3 UPF TEID and IP address received during session setup), and forwards it to the UPF over the N3 interface.</li><li><strong>UPF:</strong> Receives the GTP-U packet from the gNB. It de-tunnels the packet, performs any policy enforcement (QoS, packet inspection based on rules from SMF via N4), and routes the IP packet towards the Data Network (DN) over the N6 interface.</li><li><strong>DN:</strong> Receives the IP packet.</li></ol><h4><strong>Downlink (DN -&gt; UE):</strong></h4><ol><li><strong>DN:</strong> Sends IP packets destined for the UE’s IP address.</li><li><strong>UPF:</strong> Receives the IP packet from the DN on the N6 interface. It identifies the PDU session based on the UE’s IP address. It applies policy and QoS enforcement. It then encapsulates the IP packet in a GTP-U tunnel using the gNB’s N3 TEID and IP address (received from SMF during setup) and sends it to the gNB over the N3 interface.</li><li><strong>gNB:</strong> Receives the GTP-U packet from the UPF. It de-tunnels the packet and forwards the data to the UE over the appropriate DRB using the 5G NR air interface.</li><li><strong>UE:</strong> Receives the IP packets.</li></ol><h4><strong>PDU Session Modification and Release:</strong></h4><ul><li><strong>Modification (Control Plane):</strong> This can be initiated by the UE, SMF (due to PCF updates or UDM subscription changes), or AMF (e.g., during handovers). It involves signaling between UE, AMF, SMF, PCF, and UPF to modify parameters like QoS. The N4 interface is used by SMF to update rules in the UPF, and RRC/NAS messages are used towards the UE.</li><li><strong>Release (Control Plane):</strong> Can be initiated by the UE or the network (SMF/AMF).</li><li><strong>UE Initiated:</strong> UE sends a PDU Session Release Request (NAS) to AMF, which forwards it to SMF.</li><li><strong>Network Initiated:</strong> SMF decides to release (e.g., due to inactivity, subscription change) and informs AMF.</li><li>The SMF instructs the UPF (via N4) to release resources. It informs the PCF. Radio bearers are released via gNB-UE RRC signaling. The IP address allocated to the UE is released.</li></ul><h4><strong>Explanation of CHF Interaction (Nchf interface):</strong></h4><blockquote><strong>Nchf_ChargingData_Create Request/Response:</strong></blockquote><ul><li>After the SMF has established the N4 session with the UPF (meaning the user plane path is being set up and IP address might be allocated), the SMF interacts with the CHF.</li><li>The SMF sends a Nchf_ChargingData_Create Request to the CHF to initiate charging for the PDU session. This message contains session details, subscriber identity, QoS information, and other charging-relevant parameters derived from the PCF and UDM.</li><li>The CHF responds with Nchf_ChargingData_Create Response. For online charging, this may include initial credit/quota information. For offline charging, it acknowledges the start of accounting.</li></ul><blockquote><strong>Nchf_ChargingData_Update/Report Request/Response (During Data Flow):</strong></blockquote><ul><li>As data flows, the UPF reports usage to the SMF (typically via N4 reporting mechanisms based on URR rules).</li><li>The SMF then uses the Nchf_ChargingData_Update Request or Nchf_ChargingData_Report Request to send usage reports to the CHF.</li><li>For online charging, if quotas are exhausted or thresholds are met, the CHF might instruct the SMF (via the response or a separate message) to take action (e.g., terminate/modify the session or provide new quotas).</li></ul><h4><strong>Key Interface Details:</strong></h4><ul><li><strong>N1:</strong> Reference point between UE and AMF (for NAS signaling).</li><li><strong>N2:</strong> Reference point between (R)AN (gNB) and AMF (for NGAP signaling, including NAS message transport and RAN-Core control).</li><li><strong>N3:</strong> Reference point between (R)AN (gNB) and UPF (for user plane data transport via GTP-U tunnels).</li><li><strong>N4:</strong> Reference point between SMF and UPF (for controlling the UPF, managing N4 session context, and provisioning packet handling rules).</li><li><strong>N6:</strong> Reference point between UPF and Data Network (DN) (for user plane data).</li><li><strong>N7:</strong> Reference point between SMF and PCF (for policy control).</li><li><strong>N8:</strong> Reference point between UDM and AMF (for subscription data, authentication).</li><li><strong>N10:</strong> Reference point between UDM and SMF (for subscription data related to session management).</li><li><strong>N11:</strong> Reference point between AMF and SMF (for session management signaling).</li><li><strong>N12:</strong> Reference point between AMF and AUSF (for authentication).</li><li><strong>N13:</strong> Reference point between UDM and AUSF (for authentication data).</li></ul><p>This series is written in collaboration with <a href="https://medium.com/u/1ff592c6d739">Sadanand Dodawadakar</a></p><p>Follow up article — 4G Data Session flow , along with 4G &amp; 5G End to end voice call flows</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac896df596e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>