Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 15:08:02 +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: r316027 - head/sys/dev/e1000
Message-ID:  <201703271508.v2RF82Lk034545@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Mon Mar 27 15:08:02 2017
New Revision: 316027
URL: https://svnweb.freebsd.org/changeset/base/316027

Log:
  Access *correct* ifp data structure when debug sysctl is invoked.
  
  Submitted by:	Kevin Bowling <kevin.bowling@kev009.com>
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D10126

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

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Mon Mar 27 14:55:23 2017	(r316026)
+++ head/sys/dev/e1000/if_em.c	Mon Mar 27 15:08:02 2017	(r316027)
@@ -4341,16 +4341,17 @@ em_if_debug(if_ctx_t ctx)
 static void
 em_print_debug_info(struct adapter *adapter)
 {
-	device_t dev = adapter->dev;
+	device_t dev = iflib_get_dev(adapter->ctx);
+	struct ifnet *ifp = iflib_get_ifp(adapter->ctx);
 	struct tx_ring *txr = &adapter->tx_queues->txr;
 	struct rx_ring *rxr = &adapter->rx_queues->rxr;
 
-	if (if_getdrvflags(adapter->ifp) & IFF_DRV_RUNNING)
+	if (if_getdrvflags(ifp) & IFF_DRV_RUNNING)
 		printf("Interface is RUNNING ");
 	else
 		printf("Interface is NOT RUNNING\n");
 
-	if (if_getdrvflags(adapter->ifp) & IFF_DRV_OACTIVE)
+	if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE)
 		printf("and INACTIVE\n");
 	else
 		printf("and ACTIVE\n");



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