Date: Thu, 18 Sep 2014 14:47:13 +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: r271774 - head/sys/net Message-ID: <201409181447.s8IElDm7076946@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Sep 18 14:47:13 2014 New Revision: 271774 URL: http://svnweb.freebsd.org/changeset/base/271774 Log: While not too late rename 'ifnet_counter' to 'ift_counter'. One of the imporant moments that we discussed with Marcel and Anuranjan was that a converted driver should return false for 'grep ifnet if_driver.c' :) Sponsored by: Netflix Sponsored by: Nginx, Inc. 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 14:44:47 2014 (r271773) +++ head/sys/net/if.c Thu Sep 18 14:47:13 2014 (r271774) @@ -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_default(struct ifnet *ifp, ifnet_counter cnt) +if_get_counter_default(struct ifnet *ifp, ift_counter cnt) { switch (cnt) { @@ -1426,7 +1426,7 @@ if_get_counter_default(struct ifnet *ifp * between the stack and a driver, but function supports them all. */ void -if_inc_counter(struct ifnet *ifp, ifnet_counter cnt, int64_t inc) +if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc) { switch (cnt) { Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 18 14:44:47 2014 (r271773) +++ head/sys/net/if_var.h Thu Sep 18 14:47:13 2014 (r271774) @@ -108,7 +108,7 @@ typedef enum { IFCOUNTER_IQDROPS, IFCOUNTER_OQDROPS, IFCOUNTER_NOPROTO, -} ifnet_counter; +} ift_counter; typedef struct ifnet * if_t; @@ -117,7 +117,7 @@ typedef int (*if_ioctl_fn_t)(if_t, u_lon typedef void (*if_init_fn_t)(void *); typedef void (*if_qflush_fn_t)(if_t); typedef int (*if_transmit_fn_t)(if_t, struct mbuf *); -typedef uint64_t (*if_get_counter_t)(if_t, ifnet_counter); +typedef uint64_t (*if_get_counter_t)(if_t, ift_counter); /* * Structure defining a network interface. @@ -527,8 +527,8 @@ 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_default(struct ifnet *, ifnet_counter); -void if_inc_counter(struct ifnet *, ifnet_counter, int64_t); +uint64_t if_get_counter_default(struct ifnet *, ift_counter); +void if_inc_counter(struct ifnet *, ift_counter, int64_t); #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Sep 18 14:44:47 2014 (r271773) +++ head/sys/net/if_vlan.c Thu Sep 18 14:47:13 2014 (r271774) @@ -201,7 +201,7 @@ static void vlan_init(void *foo); static void vlan_input(struct ifnet *ifp, struct mbuf *m); static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); static void vlan_qflush(struct ifnet *ifp); -static uint64_t vlan_get_counter(struct ifnet *ifp, ifnet_counter cnt); +static uint64_t vlan_get_counter(struct ifnet *ifp, ift_counter cnt); static int vlan_setflag(struct ifnet *ifp, int flag, int status, int (*func)(struct ifnet *, int)); static int vlan_setflags(struct ifnet *ifp, int status); @@ -1132,7 +1132,7 @@ vlan_transmit(struct ifnet *ifp, struct } static uint64_t -vlan_get_counter(struct ifnet *ifp, ifnet_counter cnt) +vlan_get_counter(struct ifnet *ifp, ift_counter cnt) { struct ifvlan *ifv;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409181447.s8IElDm7076946>