[tsvwg] qdisc hash customization as a path to shared RFC3168 queues

Pete Heist <pete@heistp.net> Tue, 29 June 2021 09:41 UTC

Return-Path: <pete@heistp.net>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CDE813A2D28 for <tsvwg@ietfa.amsl.com>; Tue, 29 Jun 2021 02:41:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=heistp.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id co9TF4XlN-Jf for <tsvwg@ietfa.amsl.com>; Tue, 29 Jun 2021 02:41:14 -0700 (PDT)
Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3671E3A2D24 for <tsvwg@ietf.org>; Tue, 29 Jun 2021 02:41:13 -0700 (PDT)
Received: by mail-ed1-x530.google.com with SMTP id i5so30464038eds.1 for <tsvwg@ietf.org>; Tue, 29 Jun 2021 02:41:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heistp.net; s=google; h=message-id:subject:from:to:date:user-agent:mime-version :content-transfer-encoding; bh=z+smwnluI/1vxkHDKYIv7mk/FRS/WPkW7JoLBrHxhQ4=; b=Z9PIKkavY0jx3IWJqLTJCWYu29hh1WEe6jIgOmwKJ7EdViNNU7IUj+84m0cY9SsjK+ nSAtONMtDjpsG//uyApCl5tL5fy8QoXtrtE9dJb9nsToV6An9LNux40PZQB3Lvdg/qB5 dQW86hrHA6ujYCj3UTPF1+PABKys4qnKc5Xu/zRRXn0OopY4Rx16djFA8imRts4oAKuY uA5KX+Dk4TcL83PXEDI/X1TBKTBtlfVPSRsRX/rc4fbE8aEX+MpBQBtlxEjqf8DEuuMD 3HXqVFZK7EzNITELoaQQKj0xDfJlzBH7a7dDlLh6Cg5dqp3wne16QlxHdSTz3dYAJlnl pJvg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:user-agent :mime-version:content-transfer-encoding; bh=z+smwnluI/1vxkHDKYIv7mk/FRS/WPkW7JoLBrHxhQ4=; b=YMKIQDnuVtpxxOBV+zsjizFmkIiamFRynbIb7cb4sNgeGLvbkvGygPJt8iAsKU3S+Y rgsOjSwAJ64+BpWmHNxIq7n5u2zyHtODxNKu2qnyRLxfymHBH8StMmoJAxv/wryShSmn iRwq2M3X2i+1hI/2PLH67u7+9BzuS+PTSRKY9CxMJ/Co8L57zc7g2HrcFKsRXYUoXozr CLUlm06fi8WO1cjJVLeqrjUg+v+06VqU0GZq8t7Knm7Q79/LtIicWZub0G1XBhI5bEfj T+tu0TB/mtUNJG8/hpXGNDb6TVefCj+Lm0RBpMniRFq/dZwswwdoRVphoHHEbo/boBzJ 8nNA==
X-Gm-Message-State: AOAM531/NBpsT83ZGmN/ayI8gI0zp4B4G0+WEfVqWFL9piyzkDxn9OcJ EhbRlYZjNiY4nEgUBvwhtFZPhHNMNtQPfw==
X-Google-Smtp-Source: ABdhPJz4yc7YGdRLCcuKAV4QegOw+qUWEqaLMk1V9u8d4fnGt7NkblDt9GoFvXgxiGJG828bHZP2gQ==
X-Received: by 2002:a05:6402:268b:: with SMTP id w11mr7043612edd.341.1624959671669; Tue, 29 Jun 2021 02:41:11 -0700 (PDT)
Received: from [10.72.0.88] (h-1169.lbcfree.net. [185.193.85.130]) by smtp.gmail.com with ESMTPSA id j22sm8409133ejt.11.2021.06.29.02.41.10 for <tsvwg@ietf.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 02:41:11 -0700 (PDT)
Message-ID: <89c90eb3000ea6cb0461735c16a57c016cc4e6f9.camel@heistp.net>
From: Pete Heist <pete@heistp.net>
To: tsvwg IETF list <tsvwg@ietf.org>
Date: Tue, 29 Jun 2021 11:41:08 +0200
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.40.2
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/aTgmwGJoIwr_NHcNO5K-__1LQS0>
Subject: [tsvwg] qdisc hash customization as a path to shared RFC3168 queues
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Jun 2021 09:41:19 -0000

In the L4S safety discussion we've talked about ways that L4S and non-
L4S traffic can wind up in the same RFC3168 queue, even with FQ:

https://github.com/heistp/l4s-tests/#unsafety-in-shared-rfc3168-queues

I don't think we've mentioned that the hash used for Linux's FQ qdiscs
(fq_codel and cake included) can be customized, for example to provide
host fairness, "subscriber" fairness, or otherwise. I wrote this up
with a test script showing some ways to use it:

https://github.com/heistp/qdisc-custom-classification/

It's easy to see how this could lead to L4S and non-L4S traffic sharing
the same queue. If an operator does not want flow-fairness, but wants
fairness e.g. among destination hosts, this can be done by attaching a
flow filter to fq_codel (where 10: is the fq_codel handle):

tc filter add dev enp1s0 protocol all parent 10: handle 1 \
        flow hash keys dst divisor 1024

That would cause all traffic to a given IP to share one queue.

This has been in the wild for some years, so it might be worth adding
to the l4sops draft.

Pete