[ovs-dev] [PATCH 0/2] tc: Fix stats byte count on fragmented packets

Paul Blakey paulb at nvidia.com
Sun Nov 7 11:48:15 UTC 2021


Series fixes the stats count on "later" fragmented packets (frag=later
rule).

Example by running ping above MTU (ping <IP> -s 2000):
ct_state(-trk),recirc_id(0),...,ipv4(proto=1,frag=first),
  packets:14, bytes:19544,..., actions:ct(zone=1),recirc(0x1)
ct_state(-trk),recirc_id(0),...,ipv4(proto=1,frag=later),
  packets:14, bytes:28392,..., actions:ct(zone=1),recirc(0x1)

Second rule should have had bytes=14*<size of 'later' frag>, but instead
it's bytes=14*<size of assembled packets - size of 'first' + 'later'
frags>.

Paul Blakey (2):
  compat: Add gen_stats include to define tc hw stats
  tc: Fix stats byte count on fragmented packets

 acinclude.m4              |  7 ++++
 include/linux/automake.mk |  1 +
 include/linux/gen_stats.h | 81 +++++++++++++++++++++++++++++++++++++++
 lib/netdev-offload-tc.c   | 10 ++---
 lib/tc.c                  | 34 +++++++++++++---
 lib/tc.h                  |  3 +-
 6 files changed, 124 insertions(+), 12 deletions(-)
 create mode 100644 include/linux/gen_stats.h

-- 
2.30.1



More information about the dev mailing list