Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2016 15:41:03 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293970 - stable/10/sys/dev/sfxge
Message-ID:  <201601141541.u0EFf33F046739@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Thu Jan 14 15:41:03 2016
New Revision: 293970
URL: https://svnweb.freebsd.org/changeset/base/293970

Log:
  MFC r292086
  
  sfxge: add tunable for maximum start attetmps after reset
  
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/sfxge.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge.c	Thu Jan 14 15:33:50 2016	(r293969)
+++ stable/10/sys/dev/sfxge/sfxge.c	Thu Jan 14 15:41:03 2016	(r293970)
@@ -102,6 +102,13 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, stats_up
 	   &sfxge_stats_update_period, 0,
 	   "netstat interface statistics update period in ticks");
 
+#define	SFXGE_PARAM_RESTART_ATTEMPTS	SFXGE_PARAM(restart_attempts)
+static int sfxge_restart_attempts = 3;
+TUNABLE_INT(SFXGE_PARAM_RESTART_ATTEMPTS, &sfxge_restart_attempts);
+SYSCTL_INT(_hw_sfxge, OID_AUTO, restart_attempts, CTLFLAG_RDTUN,
+	   &sfxge_restart_attempts, 0,
+	   "Maximum number of attempts to bring interface up after reset");
+
 #if EFSYS_OPT_MCDI_LOGGING
 #define	SFXGE_PARAM_MCDI_LOGGING	SFXGE_PARAM(mcdi_logging)
 static int sfxge_mcdi_logging = 0;
@@ -1018,7 +1025,7 @@ sfxge_reset(void *arg, int npending)
 
 	sfxge_stop(sc);
 	efx_nic_reset(sc->enp);
-	for (attempt = 0; attempt < 3; ++attempt) {
+	for (attempt = 0; attempt < sfxge_restart_attempts; ++attempt) {
 		if ((rc = sfxge_start(sc)) == 0)
 			goto done;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601141541.u0EFf33F046739>