diff options
author | np <np@FreeBSD.org> | 2015-08-04 04:00:36 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2015-08-04 04:00:36 +0000 |
commit | 84fadb8369de638f4c3fdfc967e46a69c7ce40ed (patch) | |
tree | 910c8c9478be087fe769c9ca900bd5890d844994 /sys/dev/cxgbe/t4_netmap.c | |
parent | 79c68b3bae787ed4e791c7378acfadfa8e9a7968 (diff) | |
download | FreeBSD-src-84fadb8369de638f4c3fdfc967e46a69c7ce40ed.zip FreeBSD-src-84fadb8369de638f4c3fdfc967e46a69c7ce40ed.tar.gz |
MFC r284988, r285220, and r285221.
r284988:
cxgbe(4): request an automatic tx update when a netmap tx queue idles.
The NIC tx queues already do this.
r285220:
cxgbe(4): Do not override the the global defaults for congestion drops.
The hw.cxgbe.cong_drop knob is not affected by this change because the
driver sets up congestion drop on a per-queue basis.
r285221:
cxgbe(4): Add a new knob that controls the congestion response of netmap
rx queues. The default is to drop rather than backpressure.
This decouples the congestion settings of NIC and netmap rx queues.
Diffstat (limited to 'sys/dev/cxgbe/t4_netmap.c')
-rw-r--r-- | sys/dev/cxgbe/t4_netmap.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index c739146..f54a67f 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -77,6 +77,15 @@ int holdoff_tmr_idx = 2; SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_holdoff_tmr_idx, CTLFLAG_RWTUN, &holdoff_tmr_idx, 0, "Holdoff timer index for netmap rx queues."); +/* + * Congestion drops. + * -1: no congestion feedback (not recommended). + * 0: backpressure the channel instead of dropping packets right away. + * 1: no backpressure, drop packets for the congested queue immediately. + */ +static int nm_cong_drop = 1; +TUNABLE_INT("hw.cxgbe.nm_cong_drop", &nm_cong_drop); + /* netmap ifnet routines */ static void cxgbe_nm_init(void *); static int cxgbe_nm_ioctl(struct ifnet *, unsigned long, caddr_t); @@ -405,8 +414,8 @@ alloc_nm_txq_hwq(struct port_info *pi, struct sge_nm_txq *nm_txq) V_FW_EQ_ETH_CMD_VFN(0)); c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_ALLOC | F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c)); - c.autoequiqe_to_viid = htobe32(F_FW_EQ_ETH_CMD_AUTOEQUEQE | - V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); + c.autoequiqe_to_viid = htobe32(F_FW_EQ_ETH_CMD_AUTOEQUIQE | + F_FW_EQ_ETH_CMD_AUTOEQUEQE | V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); c.fetchszm_to_iqid = htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | @@ -503,7 +512,7 @@ cxgbe_netmap_on(struct adapter *sc, struct port_info *pi, struct ifnet *ifp, nm_set_native_flags(na); for_each_nm_rxq(pi, i, nm_rxq) { - alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi)); + alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi, nm_cong_drop)); nm_rxq->fl_hwidx = hwidx; slot = netmap_reset(na, NR_RX, i, 0); MPASS(slot != NULL); /* XXXNM: error check, not assert */ |