Thermalcircle

climbing the thermals

User Tools

Site Tools


blog:linux:routing_decisions_in_the_linux_kernel_2_caching

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:linux:routing_decisions_in_the_linux_kernel_2_caching [2024-07-04] – fixed typos Andrej Stenderblog:linux:routing_decisions_in_the_linux_kernel_2_caching [2025-01-19] (current) – connected sockets in tx socket caching Andrej Stender
Line 276: Line 276:
 ===== Socked Caching (TX) ===== ===== Socked Caching (TX) =====
 This caching feature is being used on the local output path; thus, only for sending locally This caching feature is being used on the local output path; thus, only for sending locally
-generated packets, not for received or forwarded packets. When a socket on the system +generated packets, not for received or forwarded packets. When a connected/established 
-(e.g. TCP or UDP socket, client or server)+socket on the system (e.g. TCP or UDP socket, client or server)
 is sending data on the the network, then it is sufficient to only do a routing lookup is sending data on the the network, then it is sufficient to only do a routing lookup
-for the very first packet it sends. After all, the destination IP address is the same+for the very first packet it sends. After all, the destination IP address will be the same
 for all following packets it sends and so is the routing decision. Thus, the //routing for all following packets it sends and so is the routing decision. Thus, the //routing
 decision// object, once obtained from the initial lookup, is being cached within the decision// object, once obtained from the initial lookup, is being cached within the
Line 367: Line 367:
 an existing socket on the system reaches //established// state an existing socket on the system reaches //established// state
 and this is done within OSI layer 4 handling, e.g. for TCP and this is done within OSI layer 4 handling, e.g. for TCP
-in function ''[[https://elixir.bootlin.com/linux/v5.14.7/source/net/ipv4/tcp_input.c#L5742|tcp_rcv_established()]]''. Sysctls are implemented +in  ''[[https://elixir.bootlin.com/linux/v5.14.7/source/net/ipv4/tcp_input.c#L5742|tcp_rcv_established()]]''.  
-on network namespace level to switch this feature on/off either globally  +I described this feature here for IPv4. An equivalent implementation 
-for IPv4 within the network namespace or just for TCP and/or UDP (default: on).+exists on the IPv6 receive path. Sysctls are implemented on network 
 +namespace level to switch this feature on/off either globally for IPv4 
 +and IPv6((Yes, despite their naming, the //sysctls// listed below represent the on/off switches 
 +for //early demux// for both IPv4 and IPv6!)) within the network namespace or just for TCP and/or UDP (default: on).
  
 <code bash> <code bash>
Line 554: Line 557:
 to my attention and of course I'll then fix my content asap accordingly.  to my attention and of course I'll then fix my content asap accordingly. 
  
-//published 2022-07-31//, //last modified 2024-07-04//+//published 2022-07-31//, //last modified 2025-01-19//
  
blog/linux/routing_decisions_in_the_linux_kernel_2_caching.1720091402.txt.gz · Last modified: 2024-07-04 by Andrej Stender