Index: ifq.c =================================================================== RCS file: /cvs/src/sys/net/ifq.c,v retrieving revision 1.34 diff -u -p -r1.34 ifq.c --- ifq.c 16 Aug 2019 04:09:02 -0000 1.34 +++ ifq.c 7 Oct 2019 23:04:13 -0000 @@ -499,8 +499,12 @@ ifiq_destroy(struct ifiqueue *ifiq) ml_purge(&ifiq->ifiq_ml); } -unsigned int ifiq_pressure_drop = 8; -unsigned int ifiq_pressure_return = 6; +unsigned int ifiq_maxlen_drop = 2048 * 5; +unsigned int ifiq_maxlen_return = 2048 * 3; + +/* pressure is a nop for 6.6-release */ +unsigned int ifiq_pressure_drop = 0; +unsigned int ifiq_pressure_return = 0; int ifiq_input(struct ifiqueue *ifiq, struct mbuf_list *ml) @@ -509,7 +513,7 @@ ifiq_input(struct ifiqueue *ifiq, struct struct mbuf *m; uint64_t packets; uint64_t bytes = 0; - unsigned int pressure; + unsigned int len; #if NBPFILTER > 0 caddr_t if_bpf; #endif @@ -553,8 +557,8 @@ ifiq_input(struct ifiqueue *ifiq, struct ifiq->ifiq_packets += packets; ifiq->ifiq_bytes += bytes; - pressure = ++ifiq->ifiq_pressure; - if (pressure > ifiq_pressure_drop) + len = ml_len(&ifiq->ifiq_ml); + if (len > ifiq_maxlen_drop) ifiq->ifiq_qdrops += ml_len(ml); else ml_enlist(&ifiq->ifiq_ml, ml); @@ -565,7 +569,7 @@ ifiq_input(struct ifiqueue *ifiq, struct else ml_purge(ml); - return (pressure > ifiq_pressure_return); + return (len > ifiq_maxlen_return); } void @@ -600,7 +604,6 @@ ifiq_process(void *arg) return; mtx_enter(&ifiq->ifiq_mtx); - ifiq->ifiq_pressure = 0; ml = ifiq->ifiq_ml; ml_init(&ifiq->ifiq_ml); mtx_leave(&ifiq->ifiq_mtx); @@ -612,8 +615,10 @@ int net_ifiq_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen) { + int error = EOPNOTSUPP; +/* pressure is disabled for 6.6-release */ +#if 0 int val; - int error; if (namelen != 1) return (EISDIR); @@ -641,6 +646,7 @@ net_ifiq_sysctl(int *name, u_int namelen error = EOPNOTSUPP; break; } +#endif return (error); }