Packet transmission method and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorHaiqing Lan
Life of this patent
Estimating the term…
Abstract
A method of the present invention includes: determining, when packet congestion occurs or network bandwidth decreases, at least one to-be-discarded packet in a packet buffer; and discarding the at least one to-be-discarded packet so that at least one unbuffered packet enters the packet buffer to prevent discarding too many unbuffered packets, where the unbuffered packet is a packet that has not entered the packet buffer. The present invention is primarily applied in a packet buffering process.
Claims10
A packet transmission method, comprising:
- determining, when packet congestion occurs or network bandwidth decreases, at least one to-be-discarded packet in a packet buffer;
- and
- discarding the at least one to-be-discarded packet so that at least one unbuffered packet enters the packet buffer to prevent discarding too many unbuffered packets, wherein the unbuffered packet is a packet that has not entered the packet buffer, wherein discarding the at least one to-be-discarded packet comprises:
- discarding the at least one to-be-discarded packet according to a preset packet discarding rule, wherein discarding the at least one to-be-discarded packet according to the preset packet discarding rule comprises:
- acquiring an index identifier of each of the at least one to-be-discarded packet to generate a to-be-discarded packet group, wherein the index identifier is a combination of a queue identifier of each of the at least one to-be-discarded packet and a location identifier of each of the at least one to-be-discarded packet,
- determining whether a to-be-discarded packet that is not discarded remains in the to-be-discarded packet group, and
- selecting, when a to-be-discarded packet that is not discarded remains in the to-be-discarded packet group, a to-be-discarded packet corresponding to at least one index identifier to discard it.
A packet transmission method, comprising:
- determining, when packet congestion occurs or network bandwidth decreases, at least one to-be-discarded packet in a packet buffer;
- and
- discarding the at least one to-be-discarded packet so that at least one unbuffered packet enters the packet buffer to prevent discarding too many unbuffered packets, wherein the unbuffered packet is a packet that has not entered the packet buffer;
- wherein before determining the at least one to-be-discarded packet in the packet buffer, the method further comprises:
- determining a total quantity of to-be-discarded packets, and
- allocating a first quantity of the to-be-discarded packets to the packet buffer for discarding, wherein the first quantity of the to-be-discarded packets is less than or equal to the total quantity of the to-be-discarded packets;
- and
- determining the at least one to-be-discarded packet in the packet buffer comprises:
- determining that packets, of the first quantity of the to-be-discarded packets, in the packet buffer are the to-be-discarded packets.
A packet transmission apparatus, comprising:
- a receiver, configured to receive a packet;
- a buffer, configured to buffer the packet received by the receiver;
- and
- a processor, configured to:
- when packet congestion occurs or network bandwidth decreases, determine at least one to-be-discarded packet in packets buffered by the buffer;
- discard the at least one to-be-discarded packet so that at least one unbuffered packet enters the buffer to prevent discarding too many unbuffered packets, wherein the unbuffered packet is a packet that has not entered the buffer;
- discard the at least one to-be-discarded packet according to a preset packet discarding rule;
- acquire an index identifier of each of the at least one to-be-discarded packet to generate a to-be-discarded packet group, wherein the index identifier is a combination of a queue identifier of each of the at least one to-be-discarded packet and a location identifier of each of the at least one to-be-discarded packet;
- determine whether a to-be-discarded packet that is not discarded remains in the to-be-discarded packet group;
- and
- select, when a to-be-discarded packet that is not discarded remains in the to-be-discarded packet group, a to-be-discarded packet corresponding to at least one index identifier to discard it.
A packet transmission apparatus, comprising:
- a receiver, configured to receive a packet;
- a buffer, configured to buffer the packet received by the receiver;
- and
- a processor, configured to:
- when packet congestion occurs or network bandwidth decreases, determine at least one to-be-discarded packet in packets buffered by the buffer;
- discard the at least one to-be-discarded packet so that at least one unbuffered packet enters the buffer to prevent discarding too many unbuffered packets, wherein the unbuffered packet is a packet that has not entered the buffer;
- determine a total quantity of the to-be-discarded packets;
- allocate a first quantity of the to-be-discarded packets to the buffer, wherein the first quantity of the to-be-discarded packets is less than or equal to the total quantity of the to-be-discarded packets;
- and
- determine that packets, of the first quantity of the to-be-discarded packets, in the buffer are the to-be-discarded packets.
Dependencies are inferred from the claim text.