History

net: rtnetlink: Add UAPI toggle for IFLA_OFFLOAD_XSTATS_L3_STATS

The offloaded HW stats are designed to allow per-netdevice enablement and disablement. Add an attribute, IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, which should be carried by the RTM_SETSTATS message, and expresses a desire to toggle L3 offload xstats on or off. As part of the above, add an exported function rtnl_offload_xstats_notify() that drivers can use when they have installed or deinstalled the counters backing the HW stats. At this point, it is possible to enable, disable and query L3 offload xstats on netdevices. (However there is no driver actually implementing these.)

Petr Machata committed 4 years ago

Commit 5fd0b831 parent 03ba3564 files · +64 −17Browse files

Showing the changes to include/uapi (2 of 4 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/if_link.h +1 −0
  2. include/uapi/linux/rtnetlink.h +2 −0
include/uapi/linux/if_link.h+1−0
@@ -1227,6 +1227,7 @@ enum { · 1226 unmodified lines
1227 IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with1227 IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with
1228 * a filter mask for the corresponding group.1228 * a filter mask for the corresponding group.
1229 */1229 */
1230 IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */
1230 __IFLA_STATS_GETSET_MAX,1231 __IFLA_STATS_GETSET_MAX,
1231};1232};
1232 1233
include/uapi/linux/rtnetlink.h+2−0
@@ -767,6 +767,8 @@ enum rtnetlink_groups { · 766 unmodified lines
767#define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR767#define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR
768 RTNLGRP_TUNNEL,768 RTNLGRP_TUNNEL,
769#define RTNLGRP_TUNNEL RTNLGRP_TUNNEL769#define RTNLGRP_TUNNEL RTNLGRP_TUNNEL
770 RTNLGRP_STATS,
771#define RTNLGRP_STATS RTNLGRP_STATS
770 __RTNLGRP_MAX772 __RTNLGRP_MAX
771};773};
772#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)774#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t