]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: sch_netem: Refactor code in 4-state loss generator
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Fri, 12 Nov 2021 21:36:47 +0000 (13:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Nov 2021 13:23:23 +0000 (13:23 +0000)
commit6a04b8ae3af088151a841199e26f3d3b153174f6
tree6089449ba0ae3f904f158c726876c4432de9e56a
parent46ec9d318faa20c29749376361075019511b40d2
net: sched: sch_netem: Refactor code in 4-state loss generator

Fixed comments to match description with variable names and
refactored code to match the convention as per [1].

To match the convention mapping is done as follows:
State 3 - LOST_IN_BURST_PERIOD
State 4 - LOST_IN_GAP_PERIOD

[1] S. Salsano, F. Ludovici, A. Ordine, "Definition of a general
and intuitive loss model for packet networks and its implementation
in the Netem module in the Linux kernel"

Fixes: 2aa3f4f94298 ("sch_netem: replace magic numbers with enumerate")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c