svn commit: r342483 - stable/10/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Wed Dec 26 09:37:32 UTC 2018
Author: arybchik
Date: Wed Dec 26 09:37:30 2018
New Revision: 342483
URL: https://svnweb.freebsd.org/changeset/base/342483
Log:
MFC r340800
sfxge(4): let caller know that queue is already flushed
Tx/Rx queue may be already flushed due to Tx/Rx error on the queue or
MC reboot. Caller needs to know that the queue is already flushed to
avoid waiting for flush done event.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18070
Modified:
stable/10/sys/dev/sfxge/common/ef10_ev.c
stable/10/sys/dev/sfxge/common/ef10_rx.c
stable/10/sys/dev/sfxge/common/ef10_tx.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_ev.c Wed Dec 26 09:36:42 2018 (r342482)
+++ stable/10/sys/dev/sfxge/common/ef10_ev.c Wed Dec 26 09:37:30 2018 (r342483)
@@ -434,7 +434,12 @@ efx_mcdi_fini_evq(
return (0);
fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ /*
+ * EALREADY is not an error, but indicates that the MC has rebooted and
+ * that the EVQ has already been destroyed.
+ */
+ if (rc != EALREADY)
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
Modified: stable/10/sys/dev/sfxge/common/ef10_rx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_rx.c Wed Dec 26 09:36:42 2018 (r342482)
+++ stable/10/sys/dev/sfxge/common/ef10_rx.c Wed Dec 26 09:37:30 2018 (r342483)
@@ -130,7 +130,7 @@ efx_mcdi_fini_rxq(
efx_mcdi_execute_quiet(enp, &req);
- if ((req.emr_rc != 0) && (req.emr_rc != EALREADY)) {
+ if (req.emr_rc != 0) {
rc = req.emr_rc;
goto fail1;
}
@@ -138,7 +138,12 @@ efx_mcdi_fini_rxq(
return (0);
fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ /*
+ * EALREADY is not an error, but indicates that the MC has rebooted and
+ * that the RXQ has already been destroyed.
+ */
+ if (rc != EALREADY)
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
@@ -720,7 +725,14 @@ ef10_rx_qflush(
return (0);
fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ /*
+ * EALREADY is not an error, but indicates that the MC has rebooted and
+ * that the RXQ has already been destroyed. Callers need to know that
+ * the RXQ flush has completed to avoid waiting until timeout for a
+ * flush done event that will not be delivered.
+ */
+ if (rc != EALREADY)
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
Modified: stable/10/sys/dev/sfxge/common/ef10_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_tx.c Wed Dec 26 09:36:42 2018 (r342482)
+++ stable/10/sys/dev/sfxge/common/ef10_tx.c Wed Dec 26 09:37:30 2018 (r342483)
@@ -151,7 +151,7 @@ efx_mcdi_fini_txq(
efx_mcdi_execute_quiet(enp, &req);
- if ((req.emr_rc != 0) && (req.emr_rc != EALREADY)) {
+ if (req.emr_rc != 0) {
rc = req.emr_rc;
goto fail1;
}
@@ -159,7 +159,12 @@ efx_mcdi_fini_txq(
return (0);
fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ /*
+ * EALREADY is not an error, but indicates that the MC has rebooted and
+ * that the TXQ has already been destroyed.
+ */
+ if (rc != EALREADY)
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
@@ -690,7 +695,14 @@ ef10_tx_qpace(
return (0);
fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ /*
+ * EALREADY is not an error, but indicates that the MC has rebooted and
+ * that the TXQ has already been destroyed. Callers need to know that
+ * the TXQ flush has completed to avoid waiting until timeout for a
+ * flush done event that will not be delivered.
+ */
+ if (rc != EALREADY)
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
More information about the svn-src-stable-10
mailing list