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.
This commit is contained in:
parent
b369bd548c
commit
1b7fb1d93f
@ -1389,7 +1389,7 @@ if_rtdel(struct radix_node *rn, void *arg)
|
||||
* 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, ifnet_counter cnt)
|
||||
* 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) {
|
||||
|
@ -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_long, caddr_t);
|
||||
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_char type);
|
||||
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))
|
||||
|
@ -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 mbuf *m)
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
vlan_get_counter(struct ifnet *ifp, ifnet_counter cnt)
|
||||
vlan_get_counter(struct ifnet *ifp, ift_counter cnt)
|
||||
{
|
||||
struct ifvlan *ifv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user