From patchwork Thu Dec 2 12:37:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4886 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4J4b8W2jM1z3wtT for ; Thu, 2 Dec 2021 12:38:03 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4J4b8Q6KqKz3vj; Thu, 2 Dec 2021 12:37:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4J4b8P58gPz30HZ; Thu, 2 Dec 2021 12:37:57 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4J4b8N1WWVz2yfp for ; Thu, 2 Dec 2021 12:37:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4J4b8N0JYxzjr; Thu, 2 Dec 2021 12:37:56 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1638448676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uyXkrpAjBbhCjzQNpVIwEXbXMg/IdhO9uFEpsrHq1ZY=; b=EhpgKNlRYGFNnIR76YdyVG4kLzBw/hYJjHOKApX/srBzJcJgsgTOyfo2i7+cmsVXLeQWTt /xC3g3rJSyVvb3AA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1638448676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uyXkrpAjBbhCjzQNpVIwEXbXMg/IdhO9uFEpsrHq1ZY=; b=mGBYW/BSFtG7h9/UI9IqMjfRWei/O+bvl/l9zI3+jDzPBj1F1d94R86rHlJ7spd30kdA4P 9DOEgeJ9fymN8CKtB5+3Nz6yuPTOQv6UvFamdleogb9yfmjimNKZMUfKOmBltooPGVRWp2 9WO3bCP37Ic8bcYrcHH4uAIgnKLlsrgRezr/PZMH98P2IBTNsy5Zx7YRyf+Q4Lhput2sZk JLSlVdbNu0ijIm/pWo1ncO/Eps8F5xYSTS92F4lzTsNL7xXlMiXBE6pz2wz3kya9FO7Eys YvdQ4I8tEWnK7rXApPOnZxjjopjea1GdjG4TSL062mTzA6rPJAlepozDJexMsw== From: Michael Tremer To: development@lists.ipfire.org Subject: [RFC PATCH 8/8] QoS: Add CAKE profile to commmand line Date: Thu, 2 Dec 2021 12:37:48 +0000 Message-Id: <20211202123748.2525617-8-michael.tremer@ipfire.org> In-Reply-To: <20211202123748.2525617-1-michael.tremer@ipfire.org> References: <20211202123748.2525617-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- config/qos/makeqosscripts.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl index 442324b98..cc91124df 100644 --- a/config/qos/makeqosscripts.pl +++ b/config/qos/makeqosscripts.pl @@ -54,7 +54,10 @@ my $classfile = "/var/ipfire/qos/classes"; my $level7file = "/var/ipfire/qos/level7config"; my $portfile = "/var/ipfire/qos/portconfig"; my $tosfile = "/var/ipfire/qos/tosconfig"; -my @cake_options = (); +my @cake_options = ( + # RED is by default connected to the Internet + "internet" +); # Define iptables MARKs my $QOS_INC_MASK = 0x0000ff00; @@ -81,6 +84,12 @@ $qossettings{'VALID'} = 'yes'; &General::readhash("${General::swroot}/qos/settings", \%qossettings); +# Default to "conservative +unless (defined $qossettings{'CAKE_PROFILE'}) { + $qossettings{'CAKE_PROFILE'} = "conservative"; +} +push(@cake_options, $qossettings{'CAKE_PROFILE'}); + my $DEF_OUT_MARK = ($qossettings{'DEFCLASS_OUT'} << $QOS_OUT_SHIFT) . "/$QOS_OUT_MASK"; my $DEF_INC_MARK = ($qossettings{'DEFCLASS_INC'} << $QOS_INC_SHIFT) . "/$QOS_INC_MASK";