aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r--drivers/net/xen-netback/common.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 2532ce85d718..ef3026f46a37 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
48typedef unsigned int pending_ring_idx_t; 49typedef unsigned int pending_ring_idx_t;
49#define INVALID_PENDING_RING_IDX (~0U) 50#define INVALID_PENDING_RING_IDX (~0U)
@@ -175,9 +176,9 @@ struct xenvif_queue { /* Per-queue data for xenvif */
175 struct xen_netif_rx_back_ring rx; 176 struct xen_netif_rx_back_ring rx;
176 struct sk_buff_head rx_queue; 177 struct sk_buff_head rx_queue;
177 RING_IDX rx_last_skb_slots; 178 RING_IDX rx_last_skb_slots;
178 bool rx_queue_purge; 179 unsigned long status;
179 180
180 struct timer_list wake_queue; 181 struct timer_list rx_stalled;
181 182
182 struct gnttab_copy grant_copy_op[MAX_GRANT_COPY_OPS]; 183 struct gnttab_copy grant_copy_op[MAX_GRANT_COPY_OPS];
183 184
@@ -197,6 +198,20 @@ struct xenvif_queue { /* Per-queue data for xenvif */
197 struct xenvif_stats stats; 198 struct xenvif_stats stats;
198}; 199};
199 200
201enum state_bit_shift {
202 /* This bit marks that the vif is connected */
203 VIF_STATUS_CONNECTED,
204 /* This bit signals the RX thread that queuing was stopped (in
205 * start_xmit), and either the timer fired or an RX interrupt came
206 */
207 QUEUE_STATUS_RX_PURGE_EVENT,
208 /* This bit tells the interrupt handler that this queue was the reason
209 * for the carrier off, so it should kick the thread. Only queues which
210 * brought it down can turn on the carrier.
211 */
212 QUEUE_STATUS_RX_STALLED
213};
214
200struct xenvif { 215struct xenvif {
201 /* Unique identifier for this interface. */ 216 /* Unique identifier for this interface. */
202 domid_t domid; 217 domid_t domid;
@@ -219,11 +234,16 @@ struct xenvif {
219 * frontend is rogue. 234 * frontend is rogue.
220 */ 235 */
221 bool disabled; 236 bool disabled;
237 unsigned long status;
222 238
223 /* Queues */ 239 /* Queues */
224 struct xenvif_queue *queues; 240 struct xenvif_queue *queues;
225 unsigned int num_queues; /* active queues, resource allocated */ 241 unsigned int num_queues; /* active queues, resource allocated */
226 242
243#ifdef CONFIG_DEBUG_FS
244 struct dentry *xenvif_dbg_root;
245#endif
246
227 /* Miscellaneous private stuff. */ 247 /* Miscellaneous private stuff. */
228 struct net_device *dev; 248 struct net_device *dev;
229}; 249};
@@ -297,10 +317,16 @@ static inline pending_ring_idx_t nr_pending_reqs(struct xenvif_queue *queue)
297/* Callback from stack when TX packet can be released */ 317/* Callback from stack when TX packet can be released */
298void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success); 318void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success);
299 319
320irqreturn_t xenvif_interrupt(int irq, void *dev_id);
321
300extern bool separate_tx_rx_irq; 322extern bool separate_tx_rx_irq;
301 323
302extern unsigned int rx_drain_timeout_msecs; 324extern unsigned int rx_drain_timeout_msecs;
303extern unsigned int rx_drain_timeout_jiffies; 325extern unsigned int rx_drain_timeout_jiffies;
304extern unsigned int xenvif_max_queues; 326extern unsigned int xenvif_max_queues;
305 327
328#ifdef CONFIG_DEBUG_FS
329extern struct dentry *xen_netback_dbg_root;
330#endif
331
306#endif /* __XEN_NETBACK__COMMON_H__ */ 332#endif /* __XEN_NETBACK__COMMON_H__ */