diff options
author | Zoltan Kiss <zoltan.kiss@citrix.com> | 2014-03-06 21:48:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-07 15:57:15 -0500 |
commit | 093507885ae5dc0288af07fbb922d2f85b3a88a6 (patch) | |
tree | f9fef41eb8e9a433dd8e9f44b7d9d9ff9aa392c8 /drivers/net/xen-netback/common.h | |
parent | e3377f36ca20a034dce56335dc9b89f41094d845 (diff) | |
download | linux-093507885ae5dc0288af07fbb922d2f85b3a88a6.tar.bz2 |
xen-netback: Timeout packets in RX path
A malicious or buggy guest can leave its queue filled indefinitely, in which
case qdisc start to queue packets for that VIF. If those packets came from an
another guest, it can block its slots and prevent shutdown. To avoid that, we
make sure the queue is drained in every 10 seconds.
The QDisc queue in worst case takes 3 round to flush usually.
Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index f2f8a02afc36..0355f8767e3b 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h @@ -148,6 +148,9 @@ struct xenvif { struct xen_netif_rx_back_ring rx; struct sk_buff_head rx_queue; RING_IDX rx_last_skb_slots; + bool rx_queue_purge; + + struct timer_list wake_queue; /* This array is allocated seperately as it is large */ struct gnttab_copy *grant_copy_op; @@ -259,4 +262,7 @@ void xenvif_zerocopy_callback(struct ubuf_info *ubuf, bool zerocopy_success); extern bool separate_tx_rx_irq; +extern unsigned int rx_drain_timeout_msecs; +extern unsigned int rx_drain_timeout_jiffies; + #endif /* __XEN_NETBACK__COMMON_H__ */ |