Any action we take in tap_plug() when using OVS will undo
our rate limiting, which means any hotplug change must
restore the previous rate setting.
Since this means tap_plug() would always be followed by a
tap_rate_limit() call anyway we just include the rate
parameter here and let the caller decide whether the full
tap_plug() is required or the simple tap_rate_limit()
suffices.
- my ($iface, $bridge, $tag, $firewall, $trunks) = @_;
+ my ($iface, $bridge, $tag, $firewall, $trunks, $rate) = @_;
#cleanup old port config from any openvswitch bridge
eval {run_command("/usr/bin/ovs-vsctl del-port $iface", outfunc => sub {}, errfunc => sub {}) };
#cleanup old port config from any openvswitch bridge
eval {run_command("/usr/bin/ovs-vsctl del-port $iface", outfunc => sub {}, errfunc => sub {}) };
&$ovs_bridge_add_port($bridge, $iface, $tag, undef, $trunks);
}
}
&$ovs_bridge_add_port($bridge, $iface, $tag, undef, $trunks);
}
}
+
+ tap_rate_limit($iface, $rate);