Re: [bmwg] Question regarding the updating of RFC 2544 with the usage of pseudorandom IP addresses

Vasilenko Eduard <vasilenko.eduard@huawei.com> Mon, 02 October 2023 08:30 UTC

Return-Path: <vasilenko.eduard@huawei.com>
X-Original-To: bmwg@ietfa.amsl.com
Delivered-To: bmwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CDA94C14CF17 for <bmwg@ietfa.amsl.com>; Mon, 2 Oct 2023 01:30:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.892
X-Spam-Level:
X-Spam-Status: No, score=-6.892 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sm7B8B6OK0My for <bmwg@ietfa.amsl.com>; Mon, 2 Oct 2023 01:30:07 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF8A3C1524AC for <bmwg@ietf.org>; Mon, 2 Oct 2023 01:29:57 -0700 (PDT)
Received: from mscpeml100001.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RzYzH3wtjz6K7hC; Mon, 2 Oct 2023 16:29:47 +0800 (CST)
Received: from mscpeml500001.china.huawei.com (7.188.26.142) by mscpeml100001.china.huawei.com (7.188.26.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 2 Oct 2023 11:29:54 +0300
Received: from mscpeml500001.china.huawei.com ([7.188.26.142]) by mscpeml500001.china.huawei.com ([7.188.26.142]) with mapi id 15.01.2507.031; Mon, 2 Oct 2023 11:29:54 +0300
From: Vasilenko Eduard <vasilenko.eduard@huawei.com>
To: Gabor LENCSE <lencse@hit.bme.hu>, "bmwg@ietf.org" <bmwg@ietf.org>
Thread-Topic: [bmwg] Question regarding the updating of RFC 2544 with the usage of pseudorandom IP addresses
Thread-Index: AQHZ9H+o7BJtRCc5s0awKG8vnvQHUbA2Jt1A
Date: Mon, 02 Oct 2023 08:29:53 +0000
Message-ID: <a89b6e8181ad4a38b88abb814496aeb6@huawei.com>
References: <7f08f3fd-732c-9495-f100-559020f622a7@hit.bme.hu>
In-Reply-To: <7f08f3fd-732c-9495-f100-559020f622a7@hit.bme.hu>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.199.56.242]
Content-Type: multipart/alternative; boundary="_000_a89b6e8181ad4a38b88abb814496aeb6huaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/bmwg/XwdTuAYT1_3oXwMXgAhzvwpZXKw>
Subject: Re: [bmwg] Question regarding the updating of RFC 2544 with the usage of pseudorandom IP addresses
X-BeenThere: bmwg@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Benchmarking Methodology Working Group <bmwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/bmwg>, <mailto:bmwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/bmwg/>
List-Post: <mailto:bmwg@ietf.org>
List-Help: <mailto:bmwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/bmwg>, <mailto:bmwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2023 08:30:11 -0000

Hi Gabor,
Many specialized network devices (especially middleboxes) are based on RISC processors.
They have many more cores than 32, it is already close to thousands (at least a few hundred are typical).
Hence, “not enough flows” may affect them very much.

But why only this problem is considered for RFC2544 refreshment?
I could propose a couple of additional:
- modern PFEs are capable of distributing resources between ports/interfaces in a very flexible way, especially for headers processing.
It does not make sense to test one port, not at all. At least one PFE (the latest is 51.2Tbps) should be fully loaded to see meaningful results.
- RFC6201 has a discussion that reset could be partial, software, hardware
- RFC9004 has a much deeper discussion on buffer’s size detection.
- and so on

IMHO: if refresh RFC2544 then refresh it all.
But what would happen with this RFC if half of BMWG documents were inserted into it?
Hence, the balance is needed for how much to insert and how much to reference.

Specifically for pseudorandom IP addresses:
It is possible to squeeze the text into 1 page and add it to the primary RFC.

The same is true for RFC 6201: it is possible to move all essence into RFC 2544bis.

But it would be very difficult to insert the essence of RFC 9004 into RFC 2544bis – too big text. Hence, the reference would be better.

Eduard
From: bmwg [mailto:bmwg-bounces@ietf.org] On Behalf Of Gabor LENCSE
Sent: Sunday, October 1, 2023 6:54 PM
To: bmwg@ietf.org
Subject: [bmwg] Question regarding the updating of RFC 2544 with the usage of pseudorandom IP addresses


Dear BMWG Members,

Previously I have consulted with the BMWG chairs about the following issue and they recommended that I should bring this question to the mailing list.

I have encountered with the following issue regarding the benchmarking of the packet forwarding performance of routers.

1. RFC 2544 defined a test frame format using fixed IP addresses and port numbers: https://datatracker.ietf.org/doc/html/rfc2544#appendix-C.2.6.4 (Some old network performance testers literally follow the above test frame format and they send always the very same test frames.)

2. As time passed by, it became common that routers have multiple processing units. (E.g., when a router is implemented by a Linux server, it is common that is has 32 or even more CPU cores.) Internet traffic contains multiple IP addresses and port numbers and RSS (Receive-Side Scaling) uses their entropy to distribute the traffic among the processing units.

3. To keep up with the development of the network interconnect devices, RFC 4814 recommended the usage of pseudorandom port numbers (using uniform distribution over well defined wide ranges): https://datatracker.ietf.org/doc/html/rfc4814#section-4.5

Unless multiple destination networks are used, it means that Testers use a single IP address pair (e.g. 198.18.0.2 and 198.19.0.2) and a high number of pseudorandom source and destination port numbers from the ranges recommended by RFC 4814.

In practice, this solution sometimes works well, sometimes not. For example, Under Debian Linux (at least from version 9 to version 11), the default setting of the RSS is that only the source IP address and destination IP address are included in the tuple for hashing.

root@dut:~# ethtool -n eno1 rx-flow-hash udp4
UDP over IPV4 flows use these fields for computing Hash flow key:
IP SA
IP DA

With these settings, the usage of pseudorandom port numbers is absolutely useless. However, one can set RSS so that the port number are also included in the tuple for hashing:

root@dut:~# ethtool -N eno1 rx-flow-hash udp4 sdfn
root@dut:~# ethtool -n eno1 rx-flow-hash udp4
UDP over IPV4 flows use these fields for computing Hash flow key:
IP SA
IP DA
L4 bytes 0 & 1 [TCP/UDP src port]
L4 bytes 2 & 3 [TCP/UDP dst port]

With the latter settings, the usage of a single IP address pair and pseudorandom port numbers works perfectly.

Under OpenBSD, the default behavior is the same (RSS considers only IP addresses), but there is no such tool that could be used to change it to use also the port numbers: https://marc.info/?l=openbsd-misc&m=166581934723445&w=2

It means that pseudorandom port numbers do not help. This RSS implementation would require the usage of pseudorandom IP addresses.

My suggestion is that we should update RFC 2544 (and RFC 5180 regarding IPv6) to support the usage of multiple, pseudorandom IP addresses in a similar manner as it was recommended regarding the port numbers by RFC 4814.

I have specific suggestions, and also working code: I have implemented the usage of pseudorandom IP addresses in the latest version of siitperf: https://github.com/lencsegabor/siitperf

I am planning to submit and Internet Draft about my recommendation, but before that I would like to know your opinion.

Do you find this idea meaningful?

It is also an important question, how the different router implementations behave. If there are several RSS implementations that use only the IP addresses (and not the port numbers) for hashing, then, IMHO, it is worth working on this update. However, if OpenBSD is the only such exception, then perhaps not.

So, please write me back if you have some knowledge about how commercial routers implement RSS.

Thank you very much for your feedback in advance!

Best regards,

Gábor