diff options
author | Zoltan Kiss <zoltan.kiss@citrix.com> | 2014-07-08 14:49:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 23:48:36 -0400 |
commit | f51de24356e49e4dcb5095e87717065580912120 (patch) | |
tree | 33439ff1f49a3d2d61455f0c6585b3369088b25c /drivers/net/xen-netback/common.h | |
parent | a37934fc0d0c087dd120dba229077048f1abfd37 (diff) |
xen-netback: Adding debugfs "io_ring_qX" files
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.
Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r-- | drivers/net/xen-netback/common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index 2532ce85d718..28c98229e95f 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <xen/interface/grant_table.h> | 44 | #include <xen/interface/grant_table.h> |
45 | #include <xen/grant_table.h> | 45 | #include <xen/grant_table.h> |
46 | #include <xen/xenbus.h> | 46 | #include <xen/xenbus.h> |
47 | #include <linux/debugfs.h> | ||
47 | 48 | ||
48 | typedef unsigned int pending_ring_idx_t; | 49 | typedef unsigned int pending_ring_idx_t; |
49 | #define INVALID_PENDING_RING_IDX (~0U) | 50 | #define INVALID_PENDING_RING_IDX (~0U) |
@@ -224,6 +225,10 @@ struct xenvif { | |||
224 | struct xenvif_queue *queues; | 225 | struct xenvif_queue *queues; |
225 | unsigned int num_queues; /* active queues, resource allocated */ | 226 | unsigned int num_queues; /* active queues, resource allocated */ |
226 | 227 | ||
228 | #ifdef CONFIG_DEBUG_FS | ||
229 | struct dentry *xenvif_dbg_root; | ||
230 | #endif | ||
231 | |||
227 | /* Miscellaneous private stuff. */ | 232 | /* Miscellaneous private stuff. */ |
228 | struct net_device *dev; | 233 | struct net_device *dev; |
229 | }; | 234 | }; |
@@ -297,10 +302,16 @@ static inline pending_ring_idx_t nr_pending_reqs(struct xenvif_queue *queue) | |||
297 | /* Callback from stack when TX packet can be released */ | 302 | /* Callback from stack when TX packet can be released */ |
298 | void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success); | 303 | void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success); |
299 | 304 | ||
305 | irqreturn_t xenvif_interrupt(int irq, void *dev_id); | ||
306 | |||
300 | extern bool separate_tx_rx_irq; | 307 | extern bool separate_tx_rx_irq; |
301 | 308 | ||
302 | extern unsigned int rx_drain_timeout_msecs; | 309 | extern unsigned int rx_drain_timeout_msecs; |
303 | extern unsigned int rx_drain_timeout_jiffies; | 310 | extern unsigned int rx_drain_timeout_jiffies; |
304 | extern unsigned int xenvif_max_queues; | 311 | extern unsigned int xenvif_max_queues; |
305 | 312 | ||
313 | #ifdef CONFIG_DEBUG_FS | ||
314 | extern struct dentry *xen_netback_dbg_root; | ||
315 | #endif | ||
316 | |||
306 | #endif /* __XEN_NETBACK__COMMON_H__ */ | 317 | #endif /* __XEN_NETBACK__COMMON_H__ */ |