Update (DSA) netdev stats with offloaded flows
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 3 repliesIn review
- v12 patches 1 replySuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | netfilter: flowtable: update netdev stats with HW_OFFLOAD flowsinclude/ net/ net/ | +145 | 2 replies | |
| 2/2 | net: dsa: update net_device stats with HW offloaded flows statsnet/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH nf-next v2 0/2] Update (DSA) netdev stats with offloaded flows
Some devices (notably DSA) delegate the nft flowtable HW offloaded flows to a parent drivers. The delegating drivers cannot collect or report the offloaded flows stats since they have no access to the underlying hardware. This breaks SNMP-based network monitoring systems that rely on netdev stats to report the network traffic.
Fix by moving the offloaded flow stat reporting to the nft flowtable subsystem. The first patch adds a new stats field "fstats" to net_device that is allocated and updated by the nft subsystem only if the new flag "flow_offload_via_parent" is set by the driver. It also report these stats back to the user in dev_get_stats().
Patch 2 sets the new flag "flow_offload_via_parent" for the DSA driver.
---
v2: - added the new "net_device->fstats" field since the existing
tstats cannot be used since it would double-count on devices that already use tstats for hardware MIBs (P1).
- fixed the outdev ifindex logic based. See new func "flow_offload_egress_ifidx()" in P1.
Ahmed Zaki (2):
netfilter: flowtable: update netdev stats with HW_OFFLOAD flows
net: dsa: update net_device stats with HW offloaded flows stats
include/linux/netdevice.h | 45 ++++++++++++ net/core/dev.c | 8 +++ net/dsa/user.c | 1 + net/netfilter/nf_flow_table_offload.c | 98 +++++++++++++++++++++++++-- 4 files changed, 146 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0