Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2017 17:42:54 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321336 - head/sys/dev/e1000
Message-ID:  <201707211742.v6LHgs9m041892@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Fri Jul 21 17:42:54 2017
New Revision: 321336
URL: https://svnweb.freebsd.org/changeset/base/321336

Log:
  Do not update stats counter in SWI context.  Defer to the already existing
  admin thread.
  
  Submitted by:	Matt Macy <mmacy@mattmacy.io>
  Sponsored by:	Limelight Networks

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Fri Jul 21 17:11:36 2017	(r321335)
+++ head/sys/dev/e1000/if_em.c	Fri Jul 21 17:42:54 2017	(r321336)
@@ -1663,9 +1663,7 @@ em_if_timer(if_ctx_t ctx, uint16_t qid)
 	if (qid != 0)
 		return;
 
-	em_if_update_admin_status(ctx);
-	em_update_stats_counters(adapter);
-
+	iflib_admin_intr_deferred(ctx);
 	/* Reset LAA into RAR[0] on 82571 */
 	if ((adapter->hw.mac.type == e1000_82571) &&
 	    e1000_get_laa_state_82571(&adapter->hw))
@@ -1781,6 +1779,7 @@ em_if_update_admin_status(if_ctx_t ctx)
 		iflib_link_state_change(ctx, LINK_STATE_DOWN, ifp->if_baudrate);
 		printf("link state changed to down\n");
 	}
+	em_update_stats_counters(adapter);
 
 	E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK | E1000_IMS_LSC);
 }



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