linux-stable/tools
Davide Caratti 7cbcf67ca4 net/sched: act_police: more accurate MTU policing
commit 4ddc844eb8 upstream.

in current Linux, MTU policing does not take into account that packets at
the TC ingress have the L2 header pulled. Thus, the same TC police action
(with the same value of tcfp_mtu) behaves differently for ingress/egress.
In addition, the full GSO size is compared to tcfp_mtu: as a consequence,
the policer drops GSO packets even when individual segments have the L2 +
L3 + L4 + payload length below the configured valued of tcfp_mtu.

Improve the accuracy of MTU policing as follows:
 - account for mac_len for non-GSO packets at TC ingress.
 - compare MTU threshold with the segmented size for GSO packets.
Also, add a kselftest that verifies the correct behavior.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-14 18:41:52 +02:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch x86/tsx: Disable TSX development mode at boot 2022-04-20 09:36:26 +02:00
bootconfig
bpf bpftool: Fix print error when show bpf map 2022-04-08 13:58:22 +02:00
build perf build: Fix btf__load_from_kernel_by_id() feature check 2022-06-09 10:26:14 +02:00
cgroup tools/cgroup/slabinfo: update to work with struct slab 2022-02-21 11:34:49 +01:00
counter
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include bpf: Fix comment for helper bpf_current_task_under_cgroup() 2022-04-08 13:59:00 +02:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Fix logic for finding matching program for CO-RE relocation 2022-06-09 10:25:44 +02:00
memory-model tools/memory-model/README: Update klitmus7 compat table 2022-06-06 08:47:53 +02:00
objtool objtool: Fix symbol creation 2022-06-09 10:26:16 +02:00
pci
pcmcia
perf perf c2c: Fix sorting in percent_rmt_hitm_cmp() 2022-06-14 18:41:26 +02:00
power tools/power turbostat: fix ICX DRAM power numbers 2022-06-09 10:25:20 +02:00
rcu
scripts tools: Ignore errors from `which' when searching a GCC toolchain 2022-02-01 23:04:12 +01:00
spi
testing net/sched: act_police: more accurate MTU policing 2022-06-14 18:41:52 +02:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing rtla/Makefile: Properly handle dependencies 2022-06-14 18:41:28 +02:00
usb
virtio tools/virtio: compile with -pthread 2022-05-25 09:59:00 +02:00
vm tools/vm/page-types.c: print file offset in hexadecimal 2021-11-06 13:30:40 -07:00
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00