Date: Fri, 30 Nov 2018 05:54:19 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341285 - head/sys/dev/sfxge/common Message-ID: <201811300554.wAU5sJY4045939@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Fri Nov 30 05:54:19 2018 New Revision: 341285 URL: https://svnweb.freebsd.org/changeset/base/341285 Log: sfxge(4): remove probes when a Tx queue is too full No need for probe messages when a TxQ is too full for a post to be done. Existing drivers check if there is room in the queue before posting descriptors, even though efx_tx_qdesc_post() does the check itself. The new SFN Windows driver doesn't perform the check before calling efx_tx_qdesc_post(), but that means these probes can get frequently printed out. It's normal driver behaviour so there's no need to print an error. Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18250 Modified: head/sys/dev/sfxge/common/ef10_tx.c head/sys/dev/sfxge/common/efx_tx.c Modified: head/sys/dev/sfxge/common/ef10_tx.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_tx.c Fri Nov 30 05:54:07 2018 (r341284) +++ head/sys/dev/sfxge/common/ef10_tx.c Fri Nov 30 05:54:19 2018 (r341285) @@ -568,12 +568,9 @@ ef10_tx_qdesc_post( { unsigned int added = *addedp; unsigned int i; - efx_rc_t rc; - if (added - completed + ndescs > EFX_TXQ_LIMIT(etp->et_mask + 1)) { - rc = ENOSPC; - goto fail1; - } + if (added - completed + ndescs > EFX_TXQ_LIMIT(etp->et_mask + 1)) + return (ENOSPC); for (i = 0; i < ndescs; i++) { efx_desc_t *edp = &ed[i]; @@ -593,11 +590,6 @@ ef10_tx_qdesc_post( *addedp = added; return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - - return (rc); } void Modified: head/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Fri Nov 30 05:54:07 2018 (r341284) +++ head/sys/dev/sfxge/common/efx_tx.c Fri Nov 30 05:54:19 2018 (r341285) @@ -601,19 +601,10 @@ efx_tx_qdesc_post( { efx_nic_t *enp = etp->et_enp; const efx_tx_ops_t *etxop = enp->en_etxop; - efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); - if ((rc = etxop->etxo_qdesc_post(etp, ed, - ndescs, completed, addedp)) != 0) - goto fail1; - - return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - return (rc); + return (etxop->etxo_qdesc_post(etp, ed, ndescs, completed, addedp)); } void @@ -792,10 +783,9 @@ siena_tx_qpost( { unsigned int added = *addedp; unsigned int i; - int rc = ENOSPC; if (added - completed + ndescs > EFX_TXQ_LIMIT(etp->et_mask + 1)) - goto fail1; + return (ENOSPC); for (i = 0; i < ndescs; i++) { efx_buffer_t *ebp = &eb[i]; @@ -817,11 +807,6 @@ siena_tx_qpost( *addedp = added; return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - - return (rc); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811300554.wAU5sJY4045939>