[pve-devel] [PATCH v1 pve-common 2/5] add out/in-rate parameter to tap_plug sub, keep version with just rate param

Thomas Lamprecht t.lamprecht at proxmox.com
Sat Feb 6 15:22:44 CET 2021


On 11.09.20 12:08, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
>  src/PVE/Network.pm | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
> index 3e7a1c1..3b09cec 100644
> --- a/src/PVE/Network.pm
> +++ b/src/PVE/Network.pm
> @@ -389,6 +389,11 @@ my $cleanup_firewall_bridge = sub {
>  
>  sub tap_plug {
>      my ($iface, $bridge, $tag, $firewall, $trunks, $rate) = @_;
> +    tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate, $rate);
> +}
> +
> +sub tap_plug {

why do you duplicate the tap_plug? that seems wrong!

> +    my ($iface, $bridge, $tag, $firewall, $trunks, $inrate, $outrate) = @_;
>  
>      #cleanup old port config from any openvswitch bridge
>      eval {run_command("/usr/bin/ovs-vsctl del-port $iface", outfunc => sub {}, errfunc => sub {}) };
> @@ -422,7 +427,7 @@ sub tap_plug {
>  	}
>      }
>  
> -    tap_rate_limit($iface, $rate);
> +    tap_rate_limit($iface, $outrate, $inrate);
>  }
>  
>  sub tap_unplug {
> 






More information about the pve-devel mailing list