mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 04:22:44 +00:00
net: route: convert routing statistics to a sysctl
Exporting the relevant pcpustat is trivial, so let's do that. We will use it in a near-future change in netstat to avoid having to dig around in mem(4) for live kernel statistics. Differential Revision: https://reviews.freebsd.org/D47231
This commit is contained in:
parent
9f718b57b8
commit
3360a15898
@ -75,6 +75,10 @@ VNET_PCPUSTAT_SYSINIT(rtstat);
|
||||
VNET_PCPUSTAT_SYSUNINIT(rtstat);
|
||||
#endif
|
||||
|
||||
SYSCTL_DECL(_net_route);
|
||||
SYSCTL_VNET_PCPUSTAT(_net_route, OID_AUTO, stats, struct rtstat,
|
||||
rtstat, "route statistics");
|
||||
|
||||
EVENTHANDLER_LIST_DEFINE(rt_addrmsg);
|
||||
|
||||
static int rt_ifdelroute(const struct rtentry *rt, const struct nhop_object *,
|
||||
|
@ -239,6 +239,7 @@ struct rtstat {
|
||||
uint64_t rts_add_retry; /* # of route addition retries */
|
||||
uint64_t rts_del_failure; /* # of route deletion failure */
|
||||
uint64_t rts_del_retry; /* # of route deletion retries */
|
||||
uint64_t rts_spare[5];
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user