diff options
author | 2015-06-24 09:40:53 +0000 | |
---|---|---|
committer | 2015-06-24 09:40:53 +0000 | |
commit | db4dc9aafbed936e879d4362ca141e998a6e925c (patch) | |
tree | df98e73a3cab3c7738c665fd003541280cfc7446 /sys/net | |
parent | Introduce Linux work queue APIs and use them. As a side-effect, this will (diff) | |
download | wireguard-openbsd-db4dc9aafbed936e879d4362ca141e998a6e925c.tar.xz wireguard-openbsd-db4dc9aafbed936e879d4362ca141e998a6e925c.zip |
Increment if_ipackets in if_input().
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 4 | ||||
-rw-r--r-- | sys/net/if_bridge.c | 5 | ||||
-rw-r--r-- | sys/net/if_trunk.c | 3 | ||||
-rw-r--r-- | sys/net/if_tun.c | 3 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 3 | ||||
-rw-r--r-- | sys/net/if_vxlan.c | 4 |
6 files changed, 8 insertions, 14 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 453c43e0a07..c4bff326dd9 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.341 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.342 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -485,6 +485,8 @@ if_input(struct ifnet *ifp, struct mbuf_list *ml) splassert(IPL_NET); + ifp->if_ipackets += ml_len(ml); + MBUF_LIST_FOREACH(ml, m) { m->m_pkthdr.ph_ifidx = ifp->if_index; m->m_pkthdr.ph_rtableid = ifp->if_rdomain; diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 9bf5fda2476..122dab66d59 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.245 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.246 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1387,7 +1387,6 @@ bridge_input(struct mbuf *m) m->m_flags |= M_PROTO1; ml_enqueue(&ml, m); if_input(ifl->ifp, &ml); - ifl->ifp->if_ipackets++; return (NULL); } } @@ -1432,7 +1431,6 @@ bridge_input(struct mbuf *m) m->m_flags |= M_PROTO1; ml_enqueue(&ml, m); if_input(ifl->ifp, &ml); - ifl->ifp->if_ipackets++; return (NULL); } if (bcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0 @@ -1596,7 +1594,6 @@ bridge_localbroadcast(struct bridge_softc *sc, struct ifnet *ifp, s = splnet(); if_input(ifp, &ml); splx(s); - ifp->if_ipackets++; } void diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index ba3887168db..ebd3211d57b 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.103 2015/06/16 11:09:39 mpi Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.104 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -1130,7 +1130,6 @@ trunk_input(struct mbuf *m) ml_enqueue(&ml, m); if_input(trifp, &ml); - trifp->if_ipackets++; return (1); bad: diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 41ef1053770..70a9df3f289 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.146 2015/06/16 11:09:39 mpi Exp $ */ +/* $OpenBSD: if_tun.c,v 1.147 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -879,7 +879,6 @@ tunwrite(dev_t dev, struct uio *uio, int ioflag) s = splnet(); if_input(ifp, &ml); splx(s); - ifp->if_ipackets++; return (0); } diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 8c359fde4e9..1ed43aff7ca 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.130 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.131 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -339,7 +339,6 @@ vlan_input(struct mbuf *m) ml_enqueue(&ml, m); if_input(&ifv->ifv_if, &ml); - ifv->ifv_if.if_ipackets++; return (1); } diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 4ffa46ec6a7..bde92058a93 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.24 2015/04/13 08:40:32 mpi Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.25 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -529,9 +529,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, pf_pkt_addr_changed(m); #endif - ifp->if_ipackets++; ml_enqueue(&ml, m); - if_input(ifp, &ml); /* success */ |