summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-06-17 09:02:51 +0000
committerarybchik <arybchik@FreeBSD.org>2016-06-17 09:02:51 +0000
commitd199b46bf40d3336ca742d50fb6e8a6564fb9518 (patch)
tree6624d7ef18a205946f95202b74037358d9bbfa63
parent0d2b23ac5912c32e9222c066a0671985d721c732 (diff)
downloadFreeBSD-src-d199b46bf40d3336ca742d50fb6e8a6564fb9518.zip
FreeBSD-src-d199b46bf40d3336ca742d50fb6e8a6564fb9518.tar.gz
MFC r301309
sfxge(4): always be ready to receive batched events When the low-latency firmware variant is running, it is reported as not being capable of batching RX events, but it can still do so if the FORCE_EV_MERGING flag is set on an RXQ. Therefore we need to handle batched RX events even if the capability isn't set. If this bug is fixed in the firmware such that the capability is set even when running the low-latency firmware variant, it will almost always be reported so I don't think we lose much by removing the check. Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6705
-rw-r--r--sys/dev/sfxge/common/ef10_nic.c7
-rw-r--r--sys/dev/sfxge/sfxge_ev.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/sfxge/common/ef10_nic.c b/sys/dev/sfxge/common/ef10_nic.c
index c607f2d..6d04bcd 100644
--- a/sys/dev/sfxge/common/ef10_nic.c
+++ b/sys/dev/sfxge/common/ef10_nic.c
@@ -1003,8 +1003,11 @@ ef10_get_datapath_caps(
encp->enc_rx_batching_enabled =
CAP_FLAG(flags, RX_BATCHING) ? B_TRUE : B_FALSE;
- if (encp->enc_rx_batching_enabled)
- encp->enc_rx_batch_max = 16;
+ /*
+ * Even if batching isn't reported as supported, we may still get
+ * batched events.
+ */
+ encp->enc_rx_batch_max = 16;
/* Check if the firmware supports disabling scatter on RXQs */
encp->enc_rx_disable_scatter_supported =
diff --git a/sys/dev/sfxge/sfxge_ev.c b/sys/dev/sfxge/sfxge_ev.c
index cfa106a..d5aff5f 100644
--- a/sys/dev/sfxge/sfxge_ev.c
+++ b/sys/dev/sfxge/sfxge_ev.c
@@ -123,8 +123,7 @@ sfxge_ev_rx(void *arg, uint32_t label, uint32_t id, uint32_t size,
rxq->pending += delta;
if (delta != 1) {
- if ((!efx_nic_cfg_get(sc->enp)->enc_rx_batching_enabled) ||
- (delta <= 0) ||
+ if ((delta <= 0) ||
(delta > efx_nic_cfg_get(sc->enp)->enc_rx_batch_max)) {
evq->exception = B_TRUE;
OpenPOWER on IntegriCloud