US 12,425,345 B2
Traffic shaping method and apparatus
Rui Meng, Beijing (CN); Shoushou Ren, Beijing (CN); and Chuang Wang, Shenzhen (CN)
Assigned to HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed by HUAWEI TECHNOLOGIES CO., LTD., Guangdong (CN)
Filed on Mar. 29, 2023, as Appl. No. 18/192,063.
Application 18/192,063 is a continuation of application No. PCT/CN2021/119119, filed on Sep. 17, 2021.
Claims priority of application No. 202011063588.7 (CN), filed on Sep. 30, 2020.
Prior Publication US 2023/0239248 A1, Jul. 27, 2023
Int. Cl. G06F 15/173 (2006.01); H04L 47/22 (2022.01); H04L 47/2483 (2022.01); H04L 47/30 (2022.01); H04L 47/62 (2022.01)
CPC H04L 47/22 (2013.01) [H04L 47/2483 (2013.01); H04L 47/30 (2013.01); H04L 47/621 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A traffic shaping method, comprising:
receiving, by a packet marking apparatus, a packet in a first flow among a plurality of flows;
determining, by the packet marking apparatus, an enqueuing queue of the packet;
marking, by the packet marking apparatus, a queue identifier of the packet as a queue identifier of the enqueuing queue of the packet; and
after marking the queue identifier of the packet, sending, by the packet marking apparatus, the queue identifier of the packet to a packet output apparatus, wherein the packet output apparatus is configured to use the received queue identifier of the packet to send the packet to a corresponding queue for outputting,
wherein the determining, by the packet marking apparatus, an enqueuing queue of the packet comprises:
determining, by the packet marking apparatus based on an arrival time of the packet, queues to which the packet can enqueue; and
determining, by the packet marking apparatus, the enqueuing queue of the packet from the determined queues to which the packet can enqueue, wherein the enqueuing queue is one queue in a group of gating queues, the group of gating queues comprise N queues, T is a duration in which each queue in the N queues is continuously enabled, and the N queues are cyclically enabled in a preset order,
wherein the determining, by the packet marking apparatus based on an arrival time of the packet, queues to which the packet can enqueue comprises:
calculating, by the packet marking apparatus based on the arrival time t0 of the packet and tmax, a latest moment t1=t0+tmax at which the packet arrives at the packet output apparatus, and
calculating, by the packet marking apparatus based on the arrival time t0 of the packet and tmin, an earliest moment t1′=t0+tmin at which the packet arrives at the packet output apparatus; and
determining, by the packet marking apparatus based on a first queue that is enabled at the latest moment t1 and a second queue that is enabled at the earliest moment t1′, the queues to which the packet can enqueue,
wherein the determined queues to which the packet can enqueue are queues in the N queues other than the first queue and the second queue.