altq: Add byte based limit and counter
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 7 Jun 2013 09:18:33 +0000 (17:18 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 8 Jun 2013 03:03:09 +0000 (11:03 +0800)
commit68dc191620e70ca9c5313f931ea4a9b4e33267fe
tree00809f13694bfe9c3ac00e897582f11f65157df3
parent0bf2d8eee5228887938273323321653891785fcf
altq: Add byte based limit and counter

- This avoids having too much mbufs sitting on the send queue for TSO
  capable devices.  Even by default, DragonFly has already limited TSO
  burst to at most 4 TCP segments, for TSO capable devices, there still
  could be 4 times mbufs sitting on the send queue compared with non-TSO
  capable devices.
- This paves way for the AQMs, which require send queue byte counter,
  e.g. CoDel.

For ethernet devices, the byte based limit is (1514 x max_packets).

For other devices, e.g. pseudo devices, the byte based limit is
(MCLBYTES x max_packets).
sys/net/altq/altq_cbq.c
sys/net/altq/altq_fairq.c
sys/net/altq/altq_hfsc.c
sys/net/altq/altq_priq.c
sys/net/altq/if_altq.h
sys/net/if.c
sys/net/if_ethersubr.c
sys/net/ifq_var.h
sys/netproto/802_11/ieee80211_dragonfly.h
sys/netproto/802_11/wlan/ieee80211_dragonfly.c
sys/netproto/802_11/wlan/ieee80211_power.c