[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH net-next] xen-netback: Adding debugfs "io_ring_qX" files
On Mon, 2014-06-30 at 21:33 +0100, Zoltan Kiss wrote: > This patch adds debugfs capabilities to netback. There used to be a similar > patch floating around for classic kernel, but it used procfs. It is based on a > very similar blkback patch. > It creates xen-netback/[vifname]/io_ring_q[queueno] files, reading them output > various ring variables etc. Writing "kick" into it imitates an interrupt > happened, it can be useful to check whether the ring is just stalled due to a > missed interrupt. Shouldn't there be some CONFIG_XEN_DEBUG_FS ifdefs sprinkled around here? > if (tx_ring->sring) { > + struct xen_netif_tx_sring *sring = tx_ring->sring; > + > + err = snprintf(buf + rv, XEN_NETBACK_DBG_IORING_BUF_SIZE - rv, > + "TX queue %d: nr_ents %u\n", i, > + tx_ring->nr_ents); > + if (err >= XEN_NETBACK_DBG_IORING_BUF_SIZE - rv) > + return XEN_NETBACK_DBG_IORING_BUF_SIZE; > + else > + rv += err; Does debugfs not provide helpers which let this be done in some more palatable way? arch/x86/xen/p2m.c seems to use some useful seq_*/single_* helpers for something very similar and it looks much cleaner. > + if (vif->xenvif_dbg_root) No IS_ERR check? And in backend_disconnect/connect too. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |