@@ -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;
@@ -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.
@@ -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);
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@amazon.com> --- 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(-)