diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-19 06:08:03 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-19 06:08:03 +0000 |
commit | 6c64d03c9114dd305abf5d1a827561c7bbcbe78c (patch) | |
tree | 211fe231daac166272e76c04a5bb7be2fa85d8e0 /sys/net/rtsock.c | |
parent | 966482dc6f95f89a086c277038dbb477cc5ed5fa (diff) | |
download | FreeBSD-src-6c64d03c9114dd305abf5d1a827561c7bbcbe78c.zip FreeBSD-src-6c64d03c9114dd305abf5d1a827561c7bbcbe78c.tar.gz |
When exporting ifnet via sysctl, add ifqueue(9) drop count to the
ifi_oqdrops. This is a temporary workaround until ifqueue(9) vanishes.
While here, remove the pointless ifi_vhid assignment. It has
sense only when we are exporting ifaddrs, not ifnets.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 324520f..a575e6a 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1598,9 +1598,8 @@ sysctl_iflist_ifml(struct ifnet *ifp, struct rt_addrinfo *info, *ifd = ifp->if_data; - /* Fixup if_data carp(4) vhid. */ - if (carp_get_vhid_p != NULL) - ifd->ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + /* Some drivers still use ifqueue(9), add its stats. */ + ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } @@ -1633,9 +1632,9 @@ sysctl_iflist_ifm(struct ifnet *ifp, struct rt_addrinfo *info, } *ifd = ifp->if_data; - /* Fixup if_data carp(4) vhid. */ - if (carp_get_vhid_p != NULL) - ifd->ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + + /* Some drivers still use ifqueue(9), add its stats. */ + ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } |