Date: Mon, 20 Apr 2015 21:27:25 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r281794 - in projects/em_mq/sys: dev/e1000 modules/em Message-ID: <201504202127.t3KLRPIl059488@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Mon Apr 20 21:27:25 2015 New Revision: 281794 URL: https://svnweb.freebsd.org/changeset/base/281794 Log: Add DB_COMMAND to display the queue status for em adapters. Ensure opt_ddb.h is a dependency for the module. Modified: projects/em_mq/sys/dev/e1000/if_em.c projects/em_mq/sys/modules/em/Makefile Modified: projects/em_mq/sys/dev/e1000/if_em.c ============================================================================== --- projects/em_mq/sys/dev/e1000/if_em.c Mon Apr 20 21:19:26 2015 (r281793) +++ projects/em_mq/sys/dev/e1000/if_em.c Mon Apr 20 21:27:25 2015 (r281794) @@ -5972,3 +5972,25 @@ em_enable_vectors_82574(struct adapter * } } #endif + +#ifdef DDB +DB_COMMAND(em_dump_queue, em_ddb_dump_queue) +{ + devclass_t dc; + struct adapter *adapter; + int max_em; + + dc = devclass_find("em"); + max_em = devclass_get_maxunit(dc); + + db_printf("max_em %d\n", max_em); + for (int index = 0; index < (max_em - 1); index++) { + driver_t *em; + adapter = devclass_get_softc(dc, index); + em = device_get_driver(adapter->dev); + if (em == &em_driver) + em_print_debug_info(adapter); + } + +} +#endif Modified: projects/em_mq/sys/modules/em/Makefile ============================================================================== --- projects/em_mq/sys/modules/em/Makefile Mon Apr 20 21:19:26 2015 (r281793) +++ projects/em_mq/sys/modules/em/Makefile Mon Apr 20 21:27:25 2015 (r281794) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h opt_inet6.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504202127.t3KLRPIl059488>