IP Library Granted Patent US 11,055,086
Granted Patent B2
US 11,055,086 · App. 16/685,913 · Granted Jul 6, 2021

Method and apparatus for upgrading vhost-net module

Inventors: Xiantao Zhang (Hangzhou, CN); Junkang Fu (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F8/656G06F8/65G06F9/455G06F9/4555
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,055,086
App. No.
16/685,913
Granted
Jul 6, 2021
Kind
B2
Abstract

A method and an apparatus for upgrading a para-virtualized network adapter kernel acceleration module are disclosed. The method includes switching a network flow of a first para-virtualized network adapter kernel acceleration module to a user mode for transmission; removing the first para-virtualized network adapter kernel acceleration module; inserting a second para-virtualized network adapter kernel acceleration module; and switching a transmission of the network flow in the user mode to a transmission by the second para-virtualized network adapter kernel acceleration module. The method and the apparatus for upgrading a para-virtualized network adapter kernel acceleration module switches between a kernel mode and a user mode for a network flow without affecting fluctuations in a network flow of a virtual machine. An upgrade of a para-virtualized network adapter kernel acceleration module is achieved, which is unnoticeable by a user, and user experience is not affected.

Claims (56)

1. A method comprising:

stopping a poll of a kernel thread of a first para-virtualized network adapter kernel acceleration module;

obtaining, by a process of a machine virtualizer, a usage status of a shared memory and controlling receiving/sending of network data packets in the shared memory;

removing the first para-virtualized network adapter kernel acceleration module;

inserting a second para-virtualized network adapter kernel acceleration module;

obtaining, by a kernel thread of a second para-virtualized network adapter kernel acceleration module, the usage status of the shared memory;

opening a poll of a kernel thread of the second para-virtualized network adapter kernel acceleration module; and

controlling, by the kernel of the second para-virtualized network adapter kernel acceleration module, sending and/or receiving of the network data packets in the shared memory.

2. The method of claim 1 , wherein stopping the poll of the kernel thread of the first para-virtualized network adapter kernel acceleration module comprises stopping a poll of a kernel thread of an old vhost-net module about receiving/sending of network data packets on a virtual Ethernet network (TAP) device.

3. The method of claim 2 , wherein by the process of the machine virtualizer, obtaining the usage status of the shared memory and controlling receiving/sending of the network data packets in the shared memory includes:

opening a poll of a quick emulator (QEMU) process about receiving/sending of the network data packets on the TAP device;

obtaining the usage status of the shared memory by controlling the QEMU process;

handling, by the QEMU process, receiving/sending of the network data packets of a network flow after switching a network flow of the old vhost-net module to a user mode for processing.

4. The method of claim 1 , wherein removing the first para-virtualized network adapter kernel acceleration module comprises clearing up resources of the first para-virtualized network adapter kernel acceleration module.

5. The method of claim 1 , wherein inserting the second para-virtualized network adapter kernel acceleration module comprises initializing resources of the second para-virtualized network adapter kernel acceleration module.

6. The method of claim 1 , further comprising, subsequent to inserting the second para-virtualized network adapter kernel acceleration module:

creating, by the second para-virtualized network adapter kernel acceleration module, the kernel thread of the second para-virtualized network adapter kernel acceleration module.

7. The method of claim 6 , wherein creating, by the second para-virtualized network adapter kernel acceleration module, the kernel thread of the second para-virtualized network adapter kernel acceleration module includes:

creating, by a new vhost-net module, a kernel thread that obtains the usage status of the shared memory.

8. An apparatus comprising:

one or more processors;

memory storing executable instructions that, when executed by the one or more processors, cause the one or more processors to perform acts comprising:

stopping a poll of a kernel thread of a first para-virtualized network adapter kernel acceleration module;

obtaining, by a process of a machine virtualizer, a usage status of a shared memory and controlling receiving/sending of network data packets in the shared memory;

removing the first para-virtualized network adapter kernel acceleration module;

inserting a second para-virtualized network adapter kernel acceleration module;

obtaining, by a kernel thread of a second para-virtualized network adapter kernel acceleration module, the usage status of the shared memory;

opening a poll of a kernel thread of the second para-virtualized network adapter kernel acceleration module; and

controlling, by the kernel of the second para-virtualized network adapter kernel acceleration module, sending and/or receiving of the network data packets in the shared memory.

9. The apparatus of claim 8 , wherein stopping the poll of the kernel thread of the first para-virtualized network adapter kernel acceleration module comprises:

stopping a poll of a kernel thread of an old vhost-net module about receiving/sending of network data packets on a virtual Ethernet network (TAP) device.

10. The apparatus of claim 9 , wherein by the process of the machine virtualizer, obtaining the usage status of the shared memory and controlling receiving/sending of the network data packets in the shared memory includes:

opening a poll of a quick emulator (QEMU) process about receiving/sending of the network data packets on the TAP device;

obtaining the usage status of the shared memory by controlling the QEMU process;

handling, by the QEMU process, receiving/sending of the network data packets of a network flow after switching a network flow of the old vhost-net module to a user mode for processing.

11. The apparatus of claim 8 , wherein clearing up resources of the first para-virtualized network adapter kernel acceleration module comprises clearing up resources of the first para-virtualized network adapter kernel acceleration module.

12. The apparatus of claim 8 , wherein inserting the second para-virtualized network adapter kernel acceleration module comprises initializing resources of the second para-virtualized network adapter kernel acceleration module.

13. The apparatus of claim 8 , wherein, subsequent to inserting the second para-virtualized network adapter kernel acceleration module, the acts further comprise:

creating, by a new vhost-net module, a kernel thread that obtains the usage status of the shared memory.

14. One or more computer-readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:

stopping a poll of a kernel thread of a first para-virtualized network adapter kernel acceleration module;

obtaining, by a process of a machine virtualizer, a usage status of a shared memory and controlling receiving/sending of network data packets in the shared memory;

removing the first para-virtualized network adapter kernel acceleration module;

inserting a second para-virtualized network adapter kernel acceleration module;

obtaining, by a kernel thread of a second para-virtualized network adapter kernel acceleration module, the usage status of the shared memory;

opening a poll of a kernel thread of the second para-virtualized network adapter kernel acceleration module; and

controlling, by the kernel of the second para-virtualized network adapter kernel acceleration module, sending and/or receiving of the network data packets in the shared memory.

15. The one or more computer-readable media of claim 14 , wherein stopping the poll of the kernel thread of the first para-virtualized network adapter kernel acceleration module comprises stopping a poll of a kernel thread of an old vhost-net module about receiving/sending of network data packets on a virtual Ethernet network (TAP) device.

16. The one or more computer-readable media of claim 15 , wherein by the process of the machine virtualizer, obtaining the usage status of the shared memory and controlling receiving/sending of the network data packets in the shared memory includes:

opening a poll of a quick emulator (QEMU) process about receiving/sending of the network data packets on the TAP device;

obtaining the usage status of the shared memory by controlling the QEMU process;

handling, by the QEMU process, receiving/sending of the network data packets of a network flow after switching a network flow of the old vhost-net module to a user mode for processing.

17. The one or more computer-readable media of claim 14 , wherein removing the first para-virtualized network adapter kernel acceleration module comprises clearing up resources of the first para-virtualized network adapter kernel acceleration module.

18. The one or more computer-readable media of claim 14 , wherein inserting the second para-virtualized network adapter kernel acceleration module comprises initializing resources of the second para-virtualized network adapter kernel acceleration module.

19. The one or more computer-readable media of claim 14 , wherein, subsequent to inserting the second para-virtualized network adapter kernel acceleration module, the acts further comprise creating, by the second para-virtualized network adapter kernel acceleration module, the kernel thread of the second para-virtualized network adapter kernel acceleration module.

20. The one or more computer-readable media of claim 19 , wherein creating, by the second para-virtualized network adapter kernel acceleration module, the kernel thread of the second para-virtualized network adapter kernel acceleration module includes creating, by a new vhost-net module, a kernel thread that obtains the usage status of the shared memory.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075478/0225 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 15, 2019
From: ZHANG, XIANTAO; FU, JUNKANG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051025/0763 →
Priority Claims (1)
CN 201510264571.0 · May 21, 2015 · national
Continuity (3)
Continuation 15818575 · Nov 20, 2017
Continuation PCTCN2016081953 · May 13, 2016
Related Publication 20200081707A1 · Mar 12, 2020