Abstract:
A method and an apparatus for managing one or more physical network interface cards and a physical host are provided. One or more virtual network interface cards are created, where each of the virtual network interface cards has a standard network interface card feature and an operation interface; the one or more virtual network interface cards are separately associated with one or more function modules of the physical network interface cards; and the physical network interface cards are managed by managing the one or more virtual network interface cards. In this way, differences in underlying hardware are shielded for an upper layer, and convenient and efficient centralized management are provided, thereby further improving network resource utilization.
Abstract:
A method and an apparatus for managing one or more physical network interface cards and a physical host are provided. One or more virtual network interface cards are created, where each of the virtual network interface cards has a standard network interface card feature and an operation interface; the one or more virtual network interface cards are separately associated with one or more function modules of the physical network interface cards; and the physical network interface cards are managed by managing the one or more virtual network interface cards. In this way, differences in underlying hardware are shielded for an upper layer, and convenient and efficient centralized management are provided, thereby further improving network resource utilization.
Abstract:
The present invention provides a network interface adapter registration method, driver, and server, where the method includes: registering, by a driver of a server, a network interface adapter with a kernel of the server as a physical network device; and registering, by the driver, apart of or all hardware queue receiving and sending groups of the network interface adapter with the kernel of the server as virtual network devices, where the physical network device is configured to manage the network interface adapter and all the virtual network devices, and each of the virtual network devices is configured to receive or send data of an application or a chip in the server. The foregoing method resolves a problem in the prior art that management and a direct operation cannot be performed on a single hardware queue of the network interface adapter.
Abstract:
A load balancing method for multi-thread forwarding includes determining a first thread and a second thread from a plurality of threads, where the plurality of threads are all used to process data packets in virtual network interface card queues, wherein a load of the first thread is greater than a first threshold, wherein a load of the second thread is less than a second threshold, and wherein the first threshold is greater than the second threshold; determining a first queue from a plurality of virtual network interface card queues corresponding to the first thread, where the first thread is used to process data packets in the plurality of virtual network interface card queues; and switching the first queue to the second thread, so that the second thread processes a data packet in the first queue.