]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ipstats: Add offload subgroup "l3_stats"
authorPetr Machata <petrm@nvidia.com>
Fri, 22 Apr 2022 08:30:58 +0000 (10:30 +0200)
committerDavid Ahern <dsahern@kernel.org>
Thu, 28 Apr 2022 02:12:42 +0000 (20:12 -0600)
commit0f1fd40cc9e8f4fdde18b67cd48ec2445ed7dc97
tree6c1f5dcb28819b7558d7beb6b37b6d75d1288e13
parent179030fa6bc714b12776aa5e0a905fadf7f3e402
ipstats: Add offload subgroup "l3_stats"

Add into the group "offload" a subgroup "l3_stats" for showing
L3 statistics.

For example:

 # ip stats show dev swp2.200 group offload subgroup l3_stats
 4212: swp2.200: group offload subgroup l3_stats on used on
     RX: bytes packets errors dropped   mcast
          1920      21      1       0       0
     TX: bytes packets errors dropped
           756       9      0       0

 # ip -j stats show dev swp2.200 group offload subgroup l3_stats | jq
 [
   {
     "ifindex": 4212,
     "ifname": "swp2.200",
     "group": "offload",
     "subgroup": "l3_stats",
     "info": {
       "request": true,
       "used": true
     },
     "stats64": {
       "rx": {
         "bytes": 1920,
         "packets": 21,
         "errors": 1,
         "dropped": 0,
         "multicast": 0
       },
       "tx": {
         "bytes": 756,
         "packets": 9,
         "errors": 0,
         "dropped": 0
       }
     }
   }
 ]

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/ipstats.c