From patchwork Thu Dec 2 12:37:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4880 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 4J4b8P439Nz3wt3 for ; Thu, 2 Dec 2021 12:37:57 +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 4J4b8P0rN2z1X5; Thu, 2 Dec 2021 12:37:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4J4b8P0hC2z30Hd; 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 4J4b8M3HJkz2xSB for ; Thu, 2 Dec 2021 12:37:55 +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 4J4b8L6JFDz1sh; Thu, 2 Dec 2021 12:37:54 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1638448674; 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; bh=WVDNXPxMxsSf4gY/B+KD2wyXQATfDe3up8v7U7+h+z8=; b=nT0tY4ixvUDw8YTvPVyyLV6bYRnykTJNErlT5pDaC2QfmxJIXPuK5+7gza/Hq8x6H2W+vL 9TEaJEtOUDZ2jDBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1638448674; 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; bh=WVDNXPxMxsSf4gY/B+KD2wyXQATfDe3up8v7U7+h+z8=; b=ubj3zrb3PqV4myASVjAD4DlwCec6wObm0Srp2NVPnjTNNVjjZkvb0NyO3BlC/Ouvg6wpst pDMJmx+78Hp7Q/QZzPa1+g8Azq1TSga8xPcF6vCabbT1221X41cozwRI4HbectXSQlQmZH VTx+FeJutvtClZyEG7KI7qne0WwPk4nRpJ8aqcFpnvs6xUUES8DDDhE+lhE5HiE+b15saN VK4ykdS1G8kDSvZC008I/U2FetGwPHcaY97H047gjlhF1cwJk+FEZGbdeESZFEhD9FhQbf 8ymHSukWAm+WP1MQc83hslD8nYiF6sXEqLfKLLlieAFZbJi2QUxq8LUUuMGlBw== From: Michael Tremer To: development@lists.ipfire.org Subject: [RFC PATCH 1/8] AQM: Use CAKE as default qdisc where appropriate instead of fq_codel Date: Thu, 2 Dec 2021 12:37:41 +0000 Message-Id: <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" This script configures CAKE as default qdisc where appropriate: * It is not suitable to use any queue management on bridges/GRE/VTI/tun interfaces. * On Internet-facing interfaces, CAKE is configured in "internet" mode whereas on any zones except RED, it is configured in "metro" mode Signed-off-by: Michael Tremer --- config/udev/enable_codel | 65 ++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/config/udev/enable_codel b/config/udev/enable_codel index 6cafd9b26..3ef9b0f59 100644 --- a/config/udev/enable_codel +++ b/config/udev/enable_codel @@ -21,9 +21,9 @@ # # ############################################################################ -LOG_FACILITY="codel" +LOG_FACILITY="aqm" -function log() { +log() { logger -t "${LOG_FACILITY}" $@ } @@ -32,19 +32,58 @@ if [ -z "${INTERFACE}" ]; then exit 1 fi -# Do nothing for the loopback device. -[ "${INTERFACE}" = "lo" ] && exit 0 - case "${ACTION}" in add|register) - # Change root qdisc to use fq_codel. - /sbin/tc qdisc add root dev ${INTERFACE} fq_codel - ret=$? - - if [ ${ret} -eq 0 ]; then - log "Codel AQM has been enabled on '${INTERFACE}'." - else - log "Codel AQM could not be enabled on '${INTERFACE}'. Error code: ${ret}" + TYPE="$(