aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/xenbus.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2014-10-22 09:08:55 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-25 14:15:20 -0400
commitecf08d2dbb96d5a4b4bcc53a39e8d29cc8fef02e (patch)
tree081341a32e4d7954ea805b145c18176876905ca7 /drivers/net/xen-netback/xenbus.c
parentf48da8b14d04ca87ffcffe68829afd45f926ec6a (diff)
xen-netback: reintroduce guest Rx stall detection
If a frontend not receiving packets it is useful to detect this and turn off the carrier so packets are dropped early instead of being queued and drained when they expire. A to-guest queue is stalled if it doesn't have enough free slots for a an extended period of time (default 60 s). If at least one queue is stalled, the carrier is turned off (in the expectation that the other queues will soon stall as well). The carrier is only turned on once all queues are ready. When the frontend connects, all the queues start in the stalled state and only become ready once the frontend queues enough Rx requests. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/xenbus.c')
-rw-r--r--drivers/net/xen-netback/xenbus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 96a754d8e517..4e56a27f9689 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -711,6 +711,7 @@ static void connect(struct backend_info *be)
711 be->vif->queues = vzalloc(requested_num_queues * 711 be->vif->queues = vzalloc(requested_num_queues *
712 sizeof(struct xenvif_queue)); 712 sizeof(struct xenvif_queue));
713 be->vif->num_queues = requested_num_queues; 713 be->vif->num_queues = requested_num_queues;
714 be->vif->stalled_queues = requested_num_queues;
714 715
715 for (queue_index = 0; queue_index < requested_num_queues; ++queue_index) { 716 for (queue_index = 0; queue_index < requested_num_queues; ++queue_index) {
716 queue = &be->vif->queues[queue_index]; 717 queue = &be->vif->queues[queue_index];