Virtual Switch Memory Pool Segmentation for Packet Forwarding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtualized environments, shared memory areas between physical hosts and virtual machines can be modified by multiple virtual machines, leading to system reliability issues and increased CPU consumption due to packet copying during packet transmission.
Innovation Solution
Implementing a packet forwarding method where each virtual machine has a dedicated shared memory area with an index field to identify ownership, preventing access by other virtual machines and using separate memory pools to reduce CPU consumption by eliminating unnecessary packet copying.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If a shared memory area is established between the physical host and all virtual machines, then packet transmission speed is improved by eliminating copying operations, but system reliability deteriorates because any virtual machine can modify memory blocks belonging to other virtual machines
Solution Approach 1:
The shared memory area is segmented into multiple isolated memory pools, with each memory pool dedicated to a specific virtual machine. The virtual switch maintains separate memory pools for different virtual machines, preventing them from accessing each other's memory blocks. This segmentation allows fast packet transmission within each isolated pool while eliminating the reliability issues of unrestricted shared memory access.
Solution Approach 2:
Different memory pools are assigned different access permissions and characteristics tailored to each virtual machine's needs. Each memory pool has localized quality control where only the designated virtual machine can modify its memory blocks, while the virtual switch maintains read access. This local quality differentiation enables both high-speed transmission and enhanced reliability through targeted access control.
2Reliability
If the virtual switch checks the index field of each memory block to determine ownership, then system reliability is improved by preventing unauthorized access, but device complexity increases due to additional checking operations
Solution Approach 1:
The index field identifying the owner virtual machine is pre-configured in each memory block during memory pool initialization. The virtual switch performs a simple index field comparison rather than complex authentication checks. This preliminary action of pre-tagging memory blocks with ownership information simplifies the virtual switch's checking operation while maintaining reliable access control.
3Reliability
If separate memory pools are established for each virtual machine, then system reliability is improved by preventing memory block rewriting, but device complexity increases due to multiple memory pool management
Solution Approach 1:
The virtual switch implements a universal memory pool management mechanism that handles multiple memory pools through a unified interface and data structure. The same memory management algorithms and access control logic are applied across all memory pools, reducing the complexity burden of managing multiple separate pools. The virtual switch serves multiple functions including packet forwarding, memory pool management, and access control through a single integrated system.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of the present invention provide a packet forwarding method and a physical host. The physical host includes a first virtual switch and at least two virtual machines, each virtual machine in the at least two virtual machines has a shared memory area that can be jointly accessed by the physical host, each shared memory area has a first memory pool, each first memory pool has at least one memory block, a memory block in each first memory pool has an index field that is used to identify a virtual machine to which the memory block belongs, and a first shared memory area corresponding to a first virtual machine in the at least two virtual machines is prohibited from being accessed by another virtual machine different from the first virtual machine in the at least two virtual machines. The physical host separately establishes shared memory areas with the at least two virtual machines, and the shared memory areas are isolated from each other. This eliminates a possibility that a network packet stored in the shared memory area is modified by another virtual machine, so that system reliability can be improved.