[PR #74] perf: optimize packet processing and decryption in receive.c #181

Open
opened 2026-10-13 21:07:24 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/74
Author: @prime-run
Created: 4/15/2025
Status: 🔄 Open

Base: master ← Head: master


📝 Commits (1)

  • 8b196dc perf: optimize packet processing and decryption in receive.c

📊 Changes

13 files changed (+966 additions, -197 deletions)

View changed files

📝 src/Kbuild (+9 -1)
📝 src/Kconfig (+8 -0)
📝 src/cookie.c (+11 -0)
📝 src/device.c (+772 -4)
📝 src/main.c (+26 -10)
📝 src/noise.c (+4 -0)
📝 src/noise.h (+2 -0)
📝 src/peer.c (+5 -0)
📝 src/queueing.h (+3 -0)
📝 src/ratelimiter.c (+7 -0)
📝 src/receive.c (+103 -97)
📝 src/socket.c (+9 -85)
📝 src/timers.h (+7 -0)

📄 Description

This commit introduces several performance optimizations: 1) Memory Operations: Reduced redundant skb operations, optimized scatter-gather list building, minimized memory copies. 2) SIMD Acceleration: Added SIMD-accelerated decryption path with proper context handling and fallback. 3) Handshake Processing: Added fast path for packet type checking, optimized load calculation and cookie validation. 4) General Improvements: Added key data prefetching, early counter validation, reduced branching, better cache utilization.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/74 **Author:** [@prime-run](https://github.com/prime-run) **Created:** 4/15/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`8b196dc`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/8b196dc6e4d02a5be3aa8e52e0e58bb8f8f848db) perf: optimize packet processing and decryption in receive.c ### 📊 Changes **13 files changed** (+966 additions, -197 deletions) <details> <summary>View changed files</summary> 📝 `src/Kbuild` (+9 -1) 📝 `src/Kconfig` (+8 -0) 📝 `src/cookie.c` (+11 -0) 📝 `src/device.c` (+772 -4) 📝 `src/main.c` (+26 -10) 📝 `src/noise.c` (+4 -0) 📝 `src/noise.h` (+2 -0) 📝 `src/peer.c` (+5 -0) 📝 `src/queueing.h` (+3 -0) 📝 `src/ratelimiter.c` (+7 -0) 📝 `src/receive.c` (+103 -97) 📝 `src/socket.c` (+9 -85) 📝 `src/timers.h` (+7 -0) </details> ### 📄 Description This commit introduces several performance optimizations: 1) Memory Operations: Reduced redundant skb operations, optimized scatter-gather list building, minimized memory copies. 2) SIMD Acceleration: Added SIMD-accelerated decryption path with proper context handling and fallback. 3) Handshake Processing: Added fast path for packet type checking, optimized load calculation and cookie validation. 4) General Improvements: Added key data prefetching, early counter validation, reduced branching, better cache utilization. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#181
No description provided.