From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dG99KRlt; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 11A2C5A004C for ; Fri, 30 Aug 2024 09:07:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725001646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WdaswK/1kkm7jNoyEGxmbf1EDjgwI2e9iMQNrDgk4CY=; b=dG99KRltnNsTN5IQEOAwWkXk1SawhxoJI3warSaRJSvGdK2OLyEadVER+7IIb/UeVBuNMI 7HsZ2jOgEGpnZnTImzW+8RDx9YaPO+XXty0LN+AvmJEmOWexWJ7md2KiMcdISpgf62EkA3 l8FXd5/sn3e3NxNadoeh9/r/Z28N6E8= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-_qsXiovpNcGzJozkHozFzg-1; Fri, 30 Aug 2024 03:07:25 -0400 X-MC-Unique: _qsXiovpNcGzJozkHozFzg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4280a434147so13721075e9.3 for ; Fri, 30 Aug 2024 00:07:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725001643; x=1725606443; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WdaswK/1kkm7jNoyEGxmbf1EDjgwI2e9iMQNrDgk4CY=; b=NZSkUTT0hFLOf1/QXRFNSZYf6ZmxocWjmTeoeLSuPDDcKgC58EGF4kABtdwMGMwF6V 5JurU/ivSLJgJQie20fQUuXQSRNbbClMKeTSPpMkcCElcpZg7ekWPKWRJNVwCBCEYwkI sj8834fOuOTtgCUtTU07bK1Pt22YV8GOeCagh0BIHzTW34/lL7x1JeZ/wUbFQShcnQ2E TdAJfgaXjqaoN7mgU7PbR1lzutsq+9uUMHTzDrPhZD3UsURKPpWxb88HnGM6cygv1p4Z Tu85n+Eu9Av/N/pZ7PlH0zE8FkzQ1sYg42UBQIKbmiQNrnqKfoaBi72IDc6pjymcVM02 hZAQ== X-Gm-Message-State: AOJu0YwyDj0byCWXPSc2FpgkANTx4TrtbqMqlER9Cs4nj+2sirWD9Uap oJE7oduuuT0/Xj2qJwH0Z8x1SYgId6ODVdkAivP7buxzXjb7KlxDmpMwddjbnjSisbUO6x8wBwA AamrDAyrNXCrxwt5eQb5XB1O7yt1/n6OLugQuWvIse2KFFDk6+IIB1TOQ+g== X-Received: by 2002:a5d:65d1:0:b0:371:8c75:a085 with SMTP id ffacd0b85a97d-3749b588137mr3100540f8f.58.1725001643082; Fri, 30 Aug 2024 00:07:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsl/dGh7YOX5gQtsVjGjUe1IvmGNEDvpPZ+OrlgQIYS/xVu0dxhnvuDaZIxZAqSbabHvLAzA== X-Received: by 2002:a5d:65d1:0:b0:371:8c75:a085 with SMTP id ffacd0b85a97d-3749b588137mr3100511f8f.58.1725001642438; Fri, 30 Aug 2024 00:07:22 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3749ee4ddc8sm3146347f8f.21.2024.08.30.00.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 00:07:21 -0700 (PDT) Date: Fri, 30 Aug 2024 09:07:20 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3 0/3] Probe host's ephemeral ports, rather than using RFC values Message-ID: <20240830090720.02af31ea@elisabeth> In-Reply-To: <20240829095847.286660-1-david@gibson.dropbear.id.au> References: <20240829095847.286660-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: LGAGR3C4FENXVBE2TQ5A76X37XY2GHN3 X-Message-ID-Hash: LGAGR3C4FENXVBE2TQ5A76X37XY2GHN3 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 29 Aug 2024 19:58:44 +1000 David Gibson wrote: > As discussed on our recent call, this implements basing which ports we > consider "ephemeral" on probing the host's settings, rather than just > assuming the RFC 6335 recommended values, which are not what Linux > uses by default. > > I think this is more correct, but additionally using the Linux values > means we consider more ports ephemeral, reducing kernel memory > consumption for -t all -u all. > > Changes in v3: > * Used in_port_t instead of plan uint16_t > * Considered using sscanf() rather than strchr() + strtol(), but > decided against it. I can never remember exactly what is and isn't > accepted by scanf(), plus clang-tidy complained about it. > Changes in v2: > * Add missing close() for the sysctl file Applied. -- Stefano