aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/common.h
diff options
context:
space:
mode:
authorPalik, Imre <imrep@amazon.de>2015-03-19 06:05:42 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-20 12:55:15 -0400
commitedafc132baac4f5331b7bffd99a7af371776f2b5 (patch)
treeed29dce2d9af57b59272c557552973adab466039 /drivers/net/xen-netback/common.h
parent750f2f9165bafb5fc20a1ec689f46c89dac54658 (diff)
xen-netback: making the bandwidth limiter runtime settable
With the current netback, the bandwidth limiter's parameters are only settable during vif setup time. This patch register a watch on them, and thus makes them runtime changeable. When the watch fires, the timer is reset. The timer's mutex is used for fencing the change. Cc: Anthony Liguori <aliguori@amazon.com> Signed-off-by: Imre Palik <imrep@amazon.de> Acked-by: Wei Liu <wei.liu2@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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 589fa256256b..8a495b318b6f 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -238,6 +238,8 @@ struct xenvif {
238 unsigned int num_queues; /* active queues, resource allocated */ 238 unsigned int num_queues; /* active queues, resource allocated */
239 unsigned int stalled_queues; 239 unsigned int stalled_queues;
240 240
241 struct xenbus_watch credit_watch;
242
241 spinlock_t lock; 243 spinlock_t lock;
242 244
243#ifdef CONFIG_DEBUG_FS 245#ifdef CONFIG_DEBUG_FS
@@ -260,6 +262,8 @@ static inline struct xenbus_device *xenvif_to_xenbus_device(struct xenvif *vif)
260 return to_xenbus_device(vif->dev->dev.parent); 262 return to_xenbus_device(vif->dev->dev.parent);
261} 263}
262 264
265void xenvif_tx_credit_callback(unsigned long data);
266
263struct xenvif *xenvif_alloc(struct device *parent, 267struct xenvif *xenvif_alloc(struct device *parent,
264 domid_t domid, 268 domid_t domid,
265 unsigned int handle); 269 unsigned int handle);