? if_mobileip.c ? if_mobileip.h Index: if.c =================================================================== RCS file: /cvs/src/sys/net/if.c,v retrieving revision 1.533 diff -u -p -r1.533 if.c --- if.c 2 Jan 2018 12:52:17 -0000 1.533 +++ if.c 4 Jan 2018 03:51:13 -0000 @@ -716,12 +716,6 @@ if_enqueue(struct ifnet *ifp, struct mbu return (0); } -void -if_input(struct ifnet *ifp, struct mbuf_list *ml) -{ - ifiq_input(&ifp->if_rcv, ml, 2048); -} - int if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) { Index: if_var.h =================================================================== RCS file: /cvs/src/sys/net/if_var.h,v retrieving revision 1.86 diff -u -p -r1.86 if_var.h --- if_var.h 2 Jan 2018 12:52:17 -0000 1.86 +++ if_var.h 4 Jan 2018 03:51:13 -0000 @@ -306,7 +306,7 @@ extern struct ifnet_head ifnet; void if_start(struct ifnet *); int if_enqueue_try(struct ifnet *, struct mbuf *); int if_enqueue(struct ifnet *, struct mbuf *); -void if_input(struct ifnet *, struct mbuf_list *); +#define if_input(_ifp, _ml) ifiq_input(&(_ifp)->if_rcv, (_ml)) void if_input_process(struct ifnet *, struct mbuf_list *); int if_input_local(struct ifnet *, struct mbuf *, sa_family_t); int if_output_local(struct ifnet *, struct mbuf *, sa_family_t); Index: ifq.c =================================================================== RCS file: /cvs/src/sys/net/ifq.c,v retrieving revision 1.20 diff -u -p -r1.20 ifq.c --- ifq.c 2 Jan 2018 07:08:10 -0000 1.20 +++ ifq.c 4 Jan 2018 03:51:13 -0000 @@ -481,6 +481,7 @@ ifiq_init(struct ifiqueue *ifiq, struct ifiq->ifiq_errors = 0; ifiq->ifiq_idx = idx; + ifiq->ifiq_pending = 0; } void @@ -503,7 +504,7 @@ ifiq_destroy(struct ifiqueue *ifiq) } int -ifiq_input(struct ifiqueue *ifiq, struct mbuf_list *ml, unsigned int cwm) +ifiq_input(struct ifiqueue *ifiq, struct mbuf_list *ml) { struct ifnet *ifp = ifiq->ifiq_if; struct mbuf *m; @@ -512,6 +513,7 @@ ifiq_input(struct ifiqueue *ifiq, struct #if NBPFILTER > 0 caddr_t if_bpf; #endif + unsigned int pending; int rv = 1; if (ml_empty(ml)) @@ -553,10 +555,11 @@ ifiq_input(struct ifiqueue *ifiq, struct ifiq->ifiq_packets += packets; ifiq->ifiq_bytes += bytes; - if (ifiq_len(ifiq) >= cwm * 5) + pending = ifiq->ifiq_pending++; + if (pending >= 16) ifiq->ifiq_qdrops += ml_len(ml); else { - rv = (ifiq_len(ifiq) >= cwm * 3); + rv = (pending >= 8); ml_enlist(&ifiq->ifiq_ml, ml); } mtx_leave(&ifiq->ifiq_mtx); @@ -610,6 +613,7 @@ ifiq_process(void *arg) mtx_enter(&ifiq->ifiq_mtx); ml = ifiq->ifiq_ml; ml_init(&ifiq->ifiq_ml); + ifiq->ifiq_pending = 0; mtx_leave(&ifiq->ifiq_mtx); if_input_process(ifiq->ifiq_if, &ml); Index: ifq.h =================================================================== RCS file: /cvs/src/sys/net/ifq.h,v retrieving revision 1.19 diff -u -p -r1.19 ifq.h --- ifq.h 2 Jan 2018 07:08:10 -0000 1.19 +++ ifq.h 4 Jan 2018 03:51:13 -0000 @@ -93,6 +93,7 @@ struct ifiqueue { /* properties */ unsigned int ifiq_idx; + unsigned int ifiq_pending; }; #ifdef _KERNEL @@ -463,8 +464,7 @@ extern const struct ifq_ops * const ifq_ void ifiq_init(struct ifiqueue *, struct ifnet *, unsigned int); void ifiq_destroy(struct ifiqueue *); -int ifiq_input(struct ifiqueue *, struct mbuf_list *, - unsigned int); +int ifiq_input(struct ifiqueue *, struct mbuf_list *); int ifiq_enqueue(struct ifiqueue *, struct mbuf *); void ifiq_add_data(struct ifiqueue *, struct if_data *); void ifiq_barrier(struct ifiqueue *);