summaryrefslogtreecommitdiff
path: root/drivers/net/xen-netback/common.h
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2017-06-21 10:21:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-11 09:08:56 -0700
commit7c37101cd650d12bf124398eb26ba7eefb235029 (patch)
treefb5ea055222cc7a0a3ca4ba1a56548353b6d3edb /drivers/net/xen-netback/common.h
parent2933fb22de6dc58ec1b8f0b1c8569d3699e5d7ea (diff)
xen-netback: correctly schedule rate-limited queues
[ Upstream commit dfa523ae9f2542bee4cddaea37b3be3e157f6e6b ] Add a flag to indicate if a queue is rate-limited. Test the flag in NAPI poll handler and avoid rescheduling the queue if true, otherwise we risk locking up the host. The rescheduling will be done in the timer callback function. Reported-by: Jean-Louis Dupond <jean-louis@dupond.be> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Tested-by: Jean-Louis Dupond <jean-louis@dupond.be> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r--drivers/net/xen-netback/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 0333ab0fd926..34173b5e886f 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -201,6 +201,7 @@ struct xenvif_queue { /* Per-queue data for xenvif */
unsigned long remaining_credit;
struct timer_list credit_timeout;
u64 credit_window_start;
+ bool rate_limited;
/* Statistics */
struct xenvif_stats stats;