IP Library Granted Patent US 11,677,686
Granted Patent B2
US 11,677,686 · App. 17/200,558 · Granted Jun 13, 2023

Packet forwarding method, apparatus, device, and system

Inventor: Ke Lin (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
H04L49/252H04L49/109H04L49/3009H04L49/557
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,677,686
App. No.
17/200,558
Granted
Jun 13, 2023
Kind
B2
Abstract

Packet forwarding methods, apparatuses, devices, and systems are disclosed. An example packet forwarding system includes a target virtual machine, a virtual switch and a network card device, wherein: the target virtual machine is configured to send a first packet to the virtual switch; the virtual switch is configured to add input port information to the first packet to obtain a second packet after receiving the first packet sent by the target virtual machine, and forward the second packet to the network card device; and the network card device is configured to determine a corresponding first forwarding rule based on the input port information included in the second packet in response to receiving the second packet sent by the virtual switch, and perform forwarding processing on the second packet based on the first forwarding rule.

Claims (44)

1. A method implemented by a computing device, the method comprising:

receiving a first packet sent by a target virtual machine;

adding input port information to the first packet to obtain a second packet; and

forwarding the second packet to a network card device, to cause the network card device to: determine a corresponding first forwarding rule based on the input port information, and perform forwarding processing on the second packet based on the first forwarding rule; and

receiving the second packet from the network card device after the second packet is forwarded to the network card device, wherein the second packet is marked as a matching failure packet when failing to obtain a forwarding rule matching the input port information and other information included in the second packet from a list of forwarding rules.

2. The method as recited in claim 1 , wherein adding the input port information to the first packet to obtain the second packet comprises:

adding the input port information to the first packet, and setting a hardware acceleration identification for the first packet to obtain the second packet.

3. The method as recited in claim 1 , wherein adding the input port information to the first packet comprises:

adding the input port information to a predetermined field of metadata of the first packet.

4. The method as recited in claim 3 , wherein the predetermined field comprises a Userdata field of DpdkRte_Mbuf.

5. The method as recited in claim 1 , further comprising:

performing forwarding processing on the second packet after receiving the second packet marked as the matching failure packet from the network card device; and

sending the first forwarding rule to the network card device.

6. 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:

receiving a second packet from a virtual switch, the second packet being obtained after the virtual switch adds input port information to a first packet that is sent by a target virtual machine;

determining a corresponding first forwarding rule based on the input port information; and

performing forwarding processing on the second packet based on the first forwarding rule, wherein the acts further comprise marking the second packet as a matching failure packet in response to failing to obtain a forwarding rule matching the input port information and other information included in the second packet from a list of forwarding rules.

7. The one or more computer readable media as recited in claim 6 , wherein determining the corresponding first forwarding rule based on the input port information comprises:

searching for the forwarding rule matching the input port information and other information included in the second packet from the list of forwarding rules.

8. The one or more computer readable media as recited in claim 7 , wherein determining the corresponding first forwarding rule based on the input port information further comprises:

obtaining the forwarding rule matching the input port information and other information included in the second packet from the list of forwarding rules; and

setting the obtained forwarding rule as the first forwarding rule.

9. The one or more computer readable media as recited in claim 7 , wherein determining the corresponding first forwarding rule based on the input port information further comprises:

failing to obtain the forwarding rule matching the input port information and other information included in the second packet from the list of forwarding rules.

10. The one or more computer readable media as recited in claim 9 , further comprising: sending the first packet to the virtual switch, to cause the virtual switch to perform forwarding processing the second packet; and receiving the first forwarding rule sent by the virtual switch.

11. The one or more computer readable media as recited in claim 7 , wherein determining the corresponding first forwarding rule based on the input port information comprises:

determining the corresponding first forwarding rule based on the input port information if the second packet includes a hardware acceleration identification.

12. The one or more computer readable media as recited in claim 7 , wherein determining the corresponding first forwarding rule based on the input port information comprises:

determining the corresponding first forwarding rule based on the input port information if the input port information is included in a predetermined field of metadata of the second packet.

13. An apparatus comprising:

one or more processors; and

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

obtaining a first packet to be forwarded;

obtaining a first forwarding rule that matches the first packet according to information included in the first packet;

processing the first packet based on the first forwarding rule, and adding output port information to the first packet to obtain a second packet; and

forwarding the second packet to the virtual switch, wherein the acts further comprise adding input port information to the first packet to obtain a third packet if a matching for the first forwarding rule is not found.

14. The apparatus as recited in claim 13 , the acts further comprising:

marking the third packet as a matching failure packet; and

forwarding the third packet to the virtual switch.

15. The apparatus as recited in claim 14 , the acts further comprising:

receiving the first forwarding rule from the virtual switch.

16. The apparatus as recited in claim 13 , wherein adding the output port information to the first packet comprises:

adding the output port information or the input port information to a predetermined field of metadata of the first packet.

17. The apparatus as recited in claim 16 , wherein the predetermined field comprises a Userdata field of DpdkRte_Mbuf.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2021
From: LIN, KE
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 057257/0538 →
Priority Claims (1)
CN 201811089427.8 · Sep 18, 2018 · national
Continuity (2)
Continuation PCTCN2019105318 · Sep 11, 2019
Related Publication 20210203619A1 · Jul 1, 2021