[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/2] xen-netback: add module parameter to disable dynamic multicast control
In order to support live migration of guests between kernels that do and do not support 'feature-dynamic-multicast-control', we add a module parameter that allows the feature to be disabled at run time, instead of using hardcode value. The default value is enable. Signed-off-by: ChiaHao Hsu <andyhsu@xxxxxxxxxx> --- drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/netback.c | 7 +++++++ drivers/net/xen-netback/xenbus.c | 14 ++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index bfb7a3054917..c166ebb5a81f 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h @@ -415,6 +415,7 @@ static inline pending_ring_idx_t nr_pending_reqs(struct xenvif_queue *queue) irqreturn_t xenvif_interrupt(int irq, void *dev_id); extern bool control_ring; +extern bool dynamic_multicast_control; extern bool separate_tx_rx_irq; extern bool provides_xdp_headroom; diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 20d858f0456a..4c3d92238ae9 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -54,6 +54,13 @@ bool control_ring = true; module_param(control_ring, bool, 0644); +/* Provide an option to extend multicast control protocol. This allows + * request-multicast-control to be set by the frontend at any time, + * the backend will watch the value and re-sample on watch events. + */ +bool dynamic_multicast_control = true; +module_param(dynamic_multicast_control, bool, 0644); + /* Provide an option to disable split event channels at load time as * event channels are limited resource. Split event channels are * enabled by default. diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 8a9169cff9c5..36c699f99da4 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -1092,12 +1092,14 @@ static int netback_probe(struct xenbus_device *dev, goto abort_transaction; } - err = xenbus_printf(xbt, dev->nodename, - "feature-dynamic-multicast-control", - "%d", 1); - if (err) { - message = "writing feature-dynamic-multicast-control"; - goto abort_transaction; + if (dynamic_multicast_control) { + err = xenbus_printf(xbt, dev->nodename, + "feature-dynamic-multicast-control", + "%d", 1); + if (err) { + message = "writing feature-dynamic-multicast-control"; + goto abort_transaction; + } } err = xenbus_transaction_end(xbt, 0); -- 2.23.3
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |