From patchwork Mon Jun 28 15:22:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aljosha Papsch X-Patchwork-Id: 30761 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CDB6A27BC81; Mon, 28 Jun 2021 16:25:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 46E2027BC78 for ; Mon, 28 Jun 2021 16:25:51 +0100 (BST) Received: from localhost ([::1]:60744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxt8w-0006oj-Cb for patchwork@mira.cbaines.net; Mon, 28 Jun 2021 11:25:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxt8B-0005fR-Kc for guix-patches@gnu.org; Mon, 28 Jun 2021 11:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxt8B-0006qz-8e for guix-patches@gnu.org; Mon, 28 Jun 2021 11:25:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lxt8B-0001o4-6Y for guix-patches@gnu.org; Mon, 28 Jun 2021 11:25:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49256] [PATCH 3/4] guix.texi: Document wondershaper-service-type. Resent-From: Aljosha Papsch Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 28 Jun 2021 15:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49256 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49256@debbugs.gnu.org Cc: Aljosha Papsch X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16248938636836 (code B ref -1); Mon, 28 Jun 2021 15:25:03 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2021 15:24:23 +0000 Received: from localhost ([127.0.0.1]:52269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxt7W-0001m6-FF for submit@debbugs.gnu.org; Mon, 28 Jun 2021 11:24:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:45200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxt7T-0001lw-5X for submit@debbugs.gnu.org; Mon, 28 Jun 2021 11:24:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxt7S-0004k0-UV for guix-patches@gnu.org; Mon, 28 Jun 2021 11:24:18 -0400 Received: from mail-fr2deu01on2103.outbound.protection.outlook.com ([40.107.135.103]:22583 helo=DEU01-FR2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxt7Q-0006NH-KK for guix-patches@gnu.org; Mon, 28 Jun 2021 11:24:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OOqLTibUATGGuDiWL5ULco/dR7Y8aiYZaNkndXmtKRX/ZfmONsm6Ul58R/ZAUC0R3cBNlpMab0TEoIRYxuC2F7aaZiRaU/SWHGmUGyXPJYs72szsofMX9yKkIbW26ttCiRkZfQsnh5uteHlmlCWKpEDs/xSBHynDeygSeqFTtwWXoRkAUE6TaUv/Ez0nZ/H19sDbWqGMUwoZPAcB7tTtMVhHI/QmXi89/6LhjfIHuLVo9Pr8zEtYnahwfaQ1f4+/shGIPfDUpCaz0tUl+I+tptMyXEeki0ksypCnYk7QlQKAbF172WewdGw5elLPDWbBrssSrKzmOdYkBwHKCkbbfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SdVwBZFSEt00ckIOY3S8Do+zEbjYedG7MN3DB+XT7Kw=; b=cpxWvNs182GVdYLMhA0ESHQzkbrcfQs/mhXnfAiI/T50aUfLDAnol0GXiHXZ0771eWEAlBSN8mlREgt+xE45BXReeeu837NHAd4DNEyF74XowXgXTUGN2n2hd+l16i/jvoIsWmf3RmAvfRtE+o+PxZQduUsb/xLEaU03fkbxiCWc76hXB6mcB6wJ8UuHxMU1t6qdqhJo6Y00CKSDLzALWfT05IHWMEIBp4xMWoGyXgJRvSI2fBIwOEC6X9CmhR0KS8pEdk622+sVw5udIS4gOLcnfS2+J0vwzbQGYXnzzzO8zQ3c/zfp8e35hVFlWE8dMIGTa0qsUul6ZTurDV1oMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stern-data.com; dmarc=pass action=none header.from=stern-data.com; dkim=pass header.d=stern-data.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sternasset.onmicrosoft.com; s=selector1-sternasset-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SdVwBZFSEt00ckIOY3S8Do+zEbjYedG7MN3DB+XT7Kw=; b=E2S3e8UiynD8fpy9jRhiACMI3oerdSr1ONLTAZrG2FuANDDHkB+pWw160CJCB5iOgAHzzIfdoTnBhnPj2am2WG+Q+MRprAcULrZEBYWS2S8pRS6SL3cdtHGnNGvy2gvLz4EjjJSJd5NlqDRwAor4aJ7YmRDrvY7CYfVqrJuEvhpSBBNLU7J62NztFgIcakd+xgHxlvh9TcVDAsELu8p9LZrx+EwJYGHs2RJzHCqGNxEEMDRiiKFJKJtuqYddVNd8mJJ7/J2rgMZ3cifdf/akDvQfJaiIX5jDO45BUkD2guoSZo9l66TaVjnwxjViC8YL4vCnfzpOI+v5KzIBWF6vVQ== Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=stern-data.com; Received: from BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:f::11) by BE0P281MB0211.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:11::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.17; Mon, 28 Jun 2021 15:24:14 +0000 Received: from BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM ([fe80::b9ef:9f1:8c7c:cb72]) by BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM ([fe80::b9ef:9f1:8c7c:cb72%7]) with mapi id 15.20.4287.021; Mon, 28 Jun 2021 15:24:14 +0000 From: Aljosha Papsch Date: Mon, 28 Jun 2021 17:22:31 +0200 Message-Id: <20210628152232.31073-4-ep@stern-data.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210628152232.31073-1-ep@stern-data.com> References: <20210628152232.31073-1-ep@stern-data.com> X-ClientProxiedBy: PR3P189CA0076.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::21) To BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:f::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:908:c39:9d60:ec9b:bd9a:f3b7:625d) by PR3P189CA0076.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Mon, 28 Jun 2021 15:24:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f673c639-7712-495c-26a4-08d93a48c9bd X-MS-TrafficTypeDiagnostic: BE0P281MB0211: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rbLMTc2+12cI3VImv71be0d85deaDhJXuBLisg4RC6aZoBwuYOWXLHbQVgf2iSwNmdWC3gGmpZGyMARpGkfvbNBhaDjndxAJq7wImrOK0QquXpKoC/MUFamnQVLzQgs3URyK12ez4IdkC85LaU8BrlCpxNoAWvvk19lkzwYvnjsEFbyq09Q0EKcJsjzWNbYN3w9LN0TVQkjtyiSv4jQ84leVNtDLZ2xBllHEfX7cZEtyZhWL5RGFt9OHzHy4PXi2OJvvKthPKViO6usvf1mIfcbJVE6g8gKTuQP4pbsgVF5G17y6VnskrU7XQGU3ApJ9N3uwn9jO2SYBl9i+xhjVqE91Pw0NzkXooEr9uhz/3C6VWptpQY9CvK/kCP9fXTC0uTA+Z38MuyGdm06hC8YRHEwxxfFBw/vSNjs1q0B9p/s/BlFMtlMsNnnXofjhXFu/X56d9osVBkK0s7ppcPACfbtws5jQTVfnnrJntWyvhPyV18UwqhFx5WqQ7H8aajx6pTFemWLDiYN2DN5QCV80cB6jbueMmatMUgFUl+uVdRucc8qM6NXcjJwZPGa6FGtvZ2L4tfWKlspNpJnnBkET9yxPBHlO1hzCBuXk6TzHTs4eBy+UgDJoryhMbC52wn76mPdoJJn31H4OoEkOGzC37BxMZ96bt8iVpsPpTsJ5QingA/4mJE9MR7l662AjHTMIis4o1nYV5lRXX/n0XgWsFPiuElQtzCxI1IknoDvQ71Z4Qz/aH0sJ3wwL0+yZ7cqNJU/WQV3LQK2HI9oEu7gCQQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(366004)(376002)(136003)(39830400003)(52116002)(107886003)(83380400001)(8676002)(6666004)(186003)(478600001)(2906002)(86362001)(8936002)(6512007)(6506007)(6916009)(36756003)(4326008)(2616005)(316002)(38100700002)(5660300002)(6486002)(1076003)(66946007)(66556008)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IAwztACiJJ6SrTytKxKHN7UbIaNPOtDfTPuh/1j021YKok6aC2O06oLAXz07hHyY7xog30VlbxfgfIxlozeBihG6+vjENBSvKSBnenM9q6frbIydyagdBgZsINV79UuGGkfDAqD6tIE71t7U7aaNRYM8Q+fKJw1QFMN1X0uvjG7b/qPSwMmmBF4ManOAo0w6KJafYgneNLYevkxtGb3c8eZ7Szlt3aG6GOWJShRkYSGyAMHD2fFnLpM2cPe5SRtLlQjfPzE1OWBCp0NUfZ0bs9yVt8RK2w0SbR98Vf9TR8ucfw5n2OFdyCnswFUMFlSP8tMMCZ7qzxPca3Svu9ZFV+ZeIw+zTV2vTrQMZlGxJUYdvDgbI3TA/Fj2ejokqIjDnJPE/Px4UwmqA81mig212LbtWJj/dj2i8ICu8zVZW2u27GhkfN7qt5U5xgpF2afMPzwjNORpLHa4tEpulMVsj8JjpJvsMvOwXKqShhw1Dl7l4TCNWuWju8vdIT+EKis2NIJ7JWModrCAFaJFRFTczDHiiEkubDFHw4PhshBVHMP0//PzUsp/QdMqMnWnjw1F6qyHrpFGBRkFesc2GusjjN0ExS9vCiSsBQive2qHwdUi5EIf0FyPDKVIpY94P/YRHBomqLHSfl4yXNBYbXYfe5LNr98Jtrt8iDU1kJGKOh9DAod01s3+/dbM+GyuIm0yDYTedzNVu+I3hMxSpZ6d/5vlBrvcQOIj7IkaL5Xlicbz+BizvJetow1OpjcDwUMqICxb/CmBNT81ipnldCy5zRKM/PPNH/JOkFEtJzGVr6mT3OZu0U2fO9HPGZg2ADc5W0eIkjJRKoEa46P5A/VFs/nPlDrmw/Yo54meN4OyLhWXmJvQNWhTwaokiefGetCiF+fQrmbEtIQcEVFvjLDTikU4CsmE9uxUE3O4R7zxg47fjwVJ76fDqSNt4l0EwiUyRJI+M+/AU5oGwq3OePtXN9MBZrjYeBU5zb70sXyd+L9+WjJbXR7UXbZIBCGii99IggRabdWkwrpnV2aBQHS+CKxTMgaoSp4noVNLVIVL6LVayf6gkfGkb8xfoCOdTRUXr+FNahKN6VfS9VLTiV6hIf4Il3sJV7vbhipIYVHwOcR/suoopCtHBjbN63+Awv8HAConDA3plarDxiim3Okf5vva2SEoifa4pv9oHfaqS5KUfOR2Icr6cwNnu8UMIBdhFci5v1sT8lG1WdLROOjivMxaVXBXPGptXSd57puyCEFELnZgjE1D/wsJR78T7nCzLGFPJu2FSiSTITA0wRA8LGfwEfmnN7R8u25UPCHJPIFaoKTomjel35pwk8uLHfLOcR1cm5YRRnOEChjyjFII5NGh1ftCI57W7D317HuVIxa8ZBsjdOJNmxH9vHnDUuHp X-OriginatorOrg: stern-data.com X-MS-Exchange-CrossTenant-Network-Message-Id: f673c639-7712-495c-26a4-08d93a48c9bd X-MS-Exchange-CrossTenant-AuthSource: BE0P281MB0034.DEUP281.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2021 15:24:14.7224 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e55b1d7b-b6d7-445f-a720-8de54d4464ac X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dCp0Z1QeDfY1B4RaX1Sd82zpMAEbdO+kyBKDDr2YZbJwetPga0UA0N4CqEQT9dwQ/5EJUK4wDnXXff8Ut4lByw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BE0P281MB0211 Received-SPF: pass client-ip=40.107.135.103; envelope-from=ep@stern-data.com; helo=DEU01-FR2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi: Document wondershaper-service-type and wondershaper-configuration fields. --- doc/guix.texi | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index e71ec70859..14764bfae4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16890,6 +16890,79 @@ See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information. @end deffn +@cindex Wondershaper +@defvr {Scheme Variable} wondershaper-service-type +This is the type for a service that runs +@uref{https://github.com/magnific0/wondershaper, Wonder Shaper} once +during boot. It configures traffic control (tc) with a Hierarchy Token +Bucket (htb) queue both for upload and download. For upload three +classes are added in order to prioritize traffic. Priority 1 is the +highest priority and priority 3 is the lowest priority. Interactive +traffic (e.g. ssh) is designated priority 1, while non-interactive +traffic is designated priority 2. Priority 3 is reserved for specially +configured ports and addresses. The service is configured using a +@code{} record. Some options below are not +found in the original upstream release but are maintained +@uref{https://github.com/apapsch/wondershaper, in a fork} until merged. +These options are marked specially. + +@end defvr + +@deftp {Data Type} wondershaper-configuration +@table @asis +@item @code{wondershaper} (default: @code{wondershaper}) +The package that provides Wonder Shaper. This package is expected to +provide the script at @file{bin/wondershaper} relative to its output +directory. The default package is +@uref{https://github.com/apapsch/wondershaper, a fork of Wonder Shaper} +adding more configuration options. + +@item @code{interface} (default: @code{"eth0"}) +The interface for which the limits shall be applied. + +@item @code{download-speed} (default: @code{2048}) +Maximum download speed in kbits. Tune this parameter to be a bit less than +your actual download speed. + +@item @code{upload-speed} (default: @code{512}) +Maximum upload speed in kbits. Tune this parameter to be a bit less than +your actual upload speed. + +@item @code{prio-3-rate} (default: @code{download-speed * 20 / 100}) +Maximum rate (kbits) for the priority 3 class, which is the lowest priority for +upload traffic. In a desktop environment the default computed value +should suffice, while in a controlled environment you might want to set +a static value. This option exists only in the fork! + +@item @code{prio-3-ceil} (default: @code{download-speed * 90 / 100}) +Maximum burst rate (kbits) for the priority 3 class. The same remarks as +for @code{prio-3-rate} apply. This option exists only in the fork! + +@item @code{high-prio-dest} (default: @code{'()}) +List of destination IP addresses for which traffic is designated +priority 1. This applies to upload only. Note that SSH (not SCP), ICMP +and packets smaller than 64b are automatically designated priority 1 no +matter the destination address. + +@item @code{no-prio-host-src} (default: @code{'()}) +List of source IP addresses for which traffic is designated priority 3. +This applies to upload only. + +@item @code{no-prio-host-dest} (default: @code{'()}) +List of destination IP addresses for which traffic is designated +priority 3. This applies to upload only. + +@item @code{no-prio-port-src} (default: @code{'()}) +List of source port numbers for which traffic is designated priority 3. +This applies to upload only. + +@item @code{no-prio-port-dest} (default: @code{'()}) +List of destination port numbers for which traffic is designated +priority 3. This applies to upload only. + +@end table +@end deftp + The @code{(gnu services rsync)} module provides the following services: You might want an rsync daemon if you have files that you want available