From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 14:47:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D2D58F5; Thu, 18 Sep 2014 14:47:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08DE9EF0; Thu, 18 Sep 2014 14:47:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IElDGO076952; Thu, 18 Sep 2014 14:47:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IElDm7076946; Thu, 18 Sep 2014 14:47:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409181447.s8IElDm7076946@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 18 Sep 2014 14:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271774 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 14:47:14 -0000 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;