CPC H04L 47/2483 (2013.01) [H04L 43/026 (2013.01); H04L 47/11 (2013.01); H04L 47/2425 (2013.01); H04L 47/621 (2013.01)] | 17 Claims |
1. A data packet marking method, applied to a switching device, wherein the method comprises:
collecting statistics about a target parameter of a first data flow, wherein a target queue of the switching device is used to buffer a data packet in the first data flow, wherein the target parameter is used to reflect an amount of data in the first data flow;
when a length of the target queue meets a first length condition, determining, based on at least one of the target parameter and an auxiliary parameter of the first data flow, a marking probability corresponding to the first data flow; and
performing congestion marking on a data packet in the first data flow based on the marking probability corresponding to the first data flow,
wherein the auxiliary parameter of the first data flow is related to the target parameter of the first data flow, the auxiliary parameter comprises a level of the first data flow,
wherein the target parameter of the first data flow falls within one of a plurality of target parameter ranges, the plurality of target parameter ranges are in a one-to-one correspondence with a plurality of data flow levels, and the level of the first data flow is a data flow level that is in the plurality of data flow levels and that corresponds to one target parameter range.
|