Date: Thu, 18 Sep 2014 10:01:56 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271752 - head/sys/net Message-ID: <201409181001.s8IA1uLN039507@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Sep 18 10:01:56 2014 New Revision: 271752 URL: http://svnweb.freebsd.org/changeset/base/271752 Log: While not too late rename if_get_counter_compat() to if_get_counter_default(). The compat counters will go away, but the function will remain in its place, and in all places where it is going to be called. Discussed with: melifaro Modified: head/sys/net/if.c head/sys/net/if_var.h head/sys/net/if_vlan.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Sep 18 09:54:57 2014 (r271751) +++ head/sys/net/if.c Thu Sep 18 10:01:56 2014 (r271752) @@ -616,7 +616,7 @@ if_attach_internal(struct ifnet *ifp, in } if (ifp->if_get_counter == NULL) - ifp->if_get_counter = if_get_counter_compat; + ifp->if_get_counter = if_get_counter_default; if (!vmove) { #ifdef MAC @@ -1389,7 +1389,7 @@ if_rtdel(struct radix_node *rn, void *ar * Return counter values from old racy non-pcpu counters. */ uint64_t -if_get_counter_compat(struct ifnet *ifp, ifnet_counter cnt) +if_get_counter_default(struct ifnet *ifp, ifnet_counter cnt) { switch (cnt) { Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 18 09:54:57 2014 (r271751) +++ head/sys/net/if_var.h Thu Sep 18 10:01:56 2014 (r271752) @@ -527,7 +527,7 @@ typedef void if_com_free_t(void *com, u_ void if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f); void if_deregister_com_alloc(u_char type); void if_data_copy(struct ifnet *, struct if_data *); -uint64_t if_get_counter_compat(struct ifnet *, ifnet_counter); +uint64_t if_get_counter_default(struct ifnet *, ifnet_counter); void if_inc_counter(struct ifnet *, ifnet_counter, int64_t); #define IF_LLADDR(ifp) \ Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Sep 18 09:54:57 2014 (r271751) +++ head/sys/net/if_vlan.c Thu Sep 18 10:01:56 2014 (r271752) @@ -1152,7 +1152,7 @@ vlan_get_counter(struct ifnet *ifp, ifne case IFCOUNTER_OERRORS: return (counter_u64_fetch(ifv->ifv_oerrors)); default: - return (if_get_counter_compat(ifp, cnt)); + return (if_get_counter_default(ifp, cnt)); } /* NOTREACHED */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409181001.s8IA1uLN039507>