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>
This commit is contained in:
committed by
David S. Miller
parent
a37934fc0d
commit
f51de24356
@@ -44,6 +44,7 @@
|
||||
#include <xen/interface/grant_table.h>
|
||||
#include <xen/grant_table.h>
|
||||
#include <xen/xenbus.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
typedef unsigned int pending_ring_idx_t;
|
||||
#define INVALID_PENDING_RING_IDX (~0U)
|
||||
@@ -224,6 +225,10 @@ struct xenvif {
|
||||
struct xenvif_queue *queues;
|
||||
unsigned int num_queues; /* active queues, resource allocated */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *xenvif_dbg_root;
|
||||
#endif
|
||||
|
||||
/* Miscellaneous private stuff. */
|
||||
struct net_device *dev;
|
||||
};
|
||||
@@ -297,10 +302,16 @@ static inline pending_ring_idx_t nr_pending_reqs(struct xenvif_queue *queue)
|
||||
/* Callback from stack when TX packet can be released */
|
||||
void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success);
|
||||
|
||||
irqreturn_t xenvif_interrupt(int irq, void *dev_id);
|
||||
|
||||
extern bool separate_tx_rx_irq;
|
||||
|
||||
extern unsigned int rx_drain_timeout_msecs;
|
||||
extern unsigned int rx_drain_timeout_jiffies;
|
||||
extern unsigned int xenvif_max_queues;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
extern struct dentry *xen_netback_dbg_root;
|
||||
#endif
|
||||
|
||||
#endif /* __XEN_NETBACK__COMMON_H__ */
|
||||
|
||||
Reference in New Issue
Block a user