IP Library Granted Patent US 9,774,540
Granted Patent B2
US 9,774,540 · App. 14/527,546 · Granted Sep 26, 2017

Packet drop based dynamic receive priority for network devices

Inventor: Michael Tsirkin (Yokeneam Yillit, IL)
Assignee: Red Hat Israel, Ltd.
H04L47/29H04L47/24
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 9,774,540
App. No.
14/527,546
Granted
Sep 26, 2017
Kind
B2
Abstract

A hypervisor executed by a processing device retrieves a plurality of packets from a network device and forwards the packets to one or more virtual machines. The hypervisor determines a number of the plurality of packets successfully received by the one or more virtual machines, and when a function of the number is below a first threshold, decreases a priority for the network device associated with handling incoming packets.

Claims (34)

1. A method comprising:

retrieving, by a processing device executing a hypervisor, a plurality of packets received by a network device;

forwarding, to one or more virtual machines, the plurality of packets received by the network device;

determining, by the processing device executing the hypervisor, a number of the plurality of packets successfully received by the one or more virtual machines, wherein the number of the plurality of packets successfully received comprises a quantity of the packets successfully received; and

responsive to determining that a function of the number of the plurality of packets successfully received is less than a first threshold, decreasing a priority for the network device associated with handling incoming packets, wherein the priority specifies a number of packets that can be processed by the hypervisor for the network device, and wherein decreasing the priority comprises lowering the number of packets that can be processed by the hypervisor for the network device.

2. The method of claim 1 further comprising increasing the priority responsive to determining that the function of the number is greater than a second threshold that is greater than the first threshold.

3. The method of claim 1 further comprising increasing the priority responsive to determining that the function of the number is greater than the first threshold.

4. The method of claim 1 wherein each of the plurality of packets is forwarded to a respective one of the one or more virtual machines.

5. The method of claim 1 wherein the priority is a Linux New Application Programming Interface (NAPI) weight for the network device.

6. The method of claim 1 wherein the priority specifies at least one of the number of packets that can be processed by the hypervisor for a particular network device within a period of time, or the number of packets that can be processed by the hypervisor for a particular network device before executing a hypervisor task.

7. The method of claim 1 wherein the function of the number comprises at least one of a total number of successfully forwarded packets within a period of time, a number of dropped packets, a percentage success rate, or a heuristic implemented based on historical statistics.

8. A computing apparatus comprising:

a memory; and

a processing device, operatively coupled to the memory, to execute a hypervisor to:

retrieve a plurality of packets received by a network device;

forward to one or more virtual machines the plurality of packets received by the network device;

determine a number of the plurality of packets successfully received by the one or more virtual machines, wherein the number of the plurality of packets successfully received comprises a quantity of the packets successfully received; and

responsive to determining that a function of the number of the plurality of packets successfully received is greater than a first threshold, increase a priority for the network device associated with handling incoming packets, wherein the priority specifies a number of packets that can be processed by the hypervisor for the network device, and wherein decreasing the priority comprises lowering the number of packets that can be processed by the hypervisor for the network device.

9. The apparatus of claim 8 wherein the processing device is further to decrease the priority responsive to determining that the function of the number is less than a second threshold that is less than the first threshold.

10. The apparatus of claim 8 wherein the processing device is further to decrease the priority responsive to determining that the function of the number is less than the first threshold.

11. The apparatus of claim 8 wherein each of the plurality of packets is forwarded to a respective one of the one or more virtual machines.

12. The apparatus of claim 8 wherein the priority is a Linux NAPI weight for the network device.

13. The apparatus of claim 8 wherein the priority specifies at least one of the number of packets that can be processed by the hypervisor for a particular network device within a period of time, or the number of packets that can be processed by the hypervisor for a particular network device before executing a hypervisor task.

14. The apparatus of claim 8 wherein the function of the number comprises at least one of a total number of successfully forwarded packets within a period of time, a number of dropped packets, a percentage success rate, or a heuristic implemented based on historical statistics.

15. A non-transitory computer readable storage medium, having instructions stored therein, which when executed by a processing device of a computer system, cause the processing device to:

retrieve, by the processing device executing an operating system, a plurality of packets received by a network device;

forward, to one or more applications, the plurality of packets received by the network device;

determine, by the processing device executing the operating system, a number of the plurality of packets successfully received by the one or more applications, wherein the number of the plurality of packets successfully received comprises a quantity of the packets successfully received; and

responsive to determining that a function of the number of the plurality of packets successfully received is less than a first threshold, decrease a priority for the network device associated with handling incoming packets, wherein the priority specifies a number of packets that can be processed by the hypervisor for the network device, and wherein decreasing the priority comprises lowering the number of packets that can be processed by the hypervisor for the network device.

16. The non-transitory computer readable storage medium of claim 15 wherein the processing device is further to increase the priority responsive to determining that the function of the number is greater than a second threshold that is greater than the first threshold.

17. The non-transitory computer readable storage medium of claim 15 wherein the processing device is further to increase the priority responsive to determining that the function of the number is greater than the first threshold.

18. The non-transitory computer readable storage medium of claim 15 wherein each of the plurality of packets is forwarded to a respective one of the one or more applications.

19. The non-transitory computer readable storage medium of claim 15 wherein the priority specifies at least one of the number of packets that can be processed by the operating system for a particular network device within a period of time, or the number of packets that can be processed by the operating system for a particular network device before executing an operating system task.

20. The non-transitory computer readable storage medium of claim 15 wherein the function of the number comprises at least one of a total number of successfully forwarded packets within a period of time, a number of dropped packets, a percentage success rate, or a heuristic implemented based on historical statistics.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 30, 2014
From: TSIRKIN, MICHAEL
To: RED HAT ISRAEL, LTD.
Reel/Frame 034076/0463 →
Continuity (1)
Related Publication 20160128077A1 · May 5, 2016