×

Adaptive load balancing in packet processing

  • US 10,148,575 B2
  • Filed: 04/07/2015
  • Issued: 12/04/2018
  • Est. Priority Date: 12/22/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method of forwarding packets in a network device, the method comprising:

  • receiving a packet at the network device, wherein the network device includes a plurality of packet processing threads;

    assigning the packet to a first packet processing thread from the plurality of packet processing threads prior to adding the packet to a queue of the first packet processing thread, wherein each one of the plurality packet processing threads belongs to one of at least a normal pool of packet processing threads and a backlogged pool of packet processing threads;

    determining a state of the first packet processing thread, wherein the state was set based on a monitoring of a length of the queue of the first packet processing thread, and wherein the state is determined to be one of a plurality of states including a backlogged state and a normal state and the state indicates which pool of packet processing threads the first packet processing thread belongs to;

    responsive to determining that the state of the first packet processing thread is a normal state, performing the following;

    adding, at the network device, the packet to the queue of the first packet processing thread, processing the packet in the first packet processing thread, andforwarding the packet; and

    responsive to determining that the state of the first packet processing thread is a backlogged state, performing the following;

    adding, at the network device, the packet to a queue of a second packet processing thread that is part of the backlogged pool of packet processing threads based on a load balancing scheme, wherein the backlogged pool of packet processing threads includes the first packet processing thread and a subset of packet processing threads from the plurality of packet processing threads, and the state of each one of the packet processing threads from the backlogged pool is the backlogged state,processing the packet in the second packet processing thread, andforwarding the packet according to a predetermined order, wherein the predetermined order is based on a position of the packet relative to positions of other packets at receipt of the packet and the other packets in the network device.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×