From mboxrd@z Thu Jan 1 00:00:00 1970 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 BF93E5A004F for ; Thu, 04 Jul 2024 23:22:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720128119; 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=2nei6ThQtRX0P16DpBn9ahKckhd/KFeXbDQviqTS/Gs=; b=QffwH96/DiesiYJLR05PB7cxxabuCBql2/Lx13enzk9EAXB5Swm5NuuePRun5qy6ovrdqX RFpuQumlFj46wMPKYR/mYGqPjEevx4EV/K4g4bbL4V/qGYNFYN8nLzwOknZ/foCj9S5bhV QOT6NUXE7C6iaga2OCwbF7x9k7VvV7I= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-391-eMCAUuvnPj-qz1EetBklFA-1; Thu, 04 Jul 2024 17:21:58 -0400 X-MC-Unique: eMCAUuvnPj-qz1EetBklFA-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-645eb1025b5so17077447b3.2 for ; Thu, 04 Jul 2024 14:21:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720128117; x=1720732917; 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=2nei6ThQtRX0P16DpBn9ahKckhd/KFeXbDQviqTS/Gs=; b=T4KAol8UFI7KvSmzDB7cRQ2eqaBEVua6NZ385P7ABPkgNfmysxgVsBRni2WWImtpxP ITyXDPTGiacCdAVN6AFNg8Rthtd1vlurmGV+o4tsIiDF8kfXxnXyLFFcNNWT4f/KLE66 //AisPHdhpZBmsXXqAYQNhgi28VR9oog+75hpYZH6z5H1z5aOWfl0qQlHOU21bGvqURx fnTf0qlmDEpXCxY74UOSG/RdCuxSVry0IGC7/m4ilgUx+g4lvfHG8HY/63rx/bRHcC7G Jx7EMuqv65/xtxJDBU2Q0HMGHmWLI4mYFNQcMswCI+tz2wgiBwoX+fdh3c8AFIu69NKn S5vA== X-Gm-Message-State: AOJu0YyyPTbNJlsaLhoioPtSUP8HDslIKstCKha3P4VEZcZQugeURM7g cVfy2pvnOhWlFPobxpjrTcjvknll0BpQVzFTu5bmdV94oBRVVNannjiHC3BzvUCqsrS0Bvcbb/C D98rIbnX4gwGYxsiIAODnGEEs8MlnswIrelruj2XI4l7DAOoIjXUg5HXja8MG X-Received: by 2002:a25:d6c8:0:b0:e03:645f:2099 with SMTP id 3f1490d57ef6-e03c1930956mr3016796276.8.1720128116785; Thu, 04 Jul 2024 14:21:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlnlTdyPK6yMRbT04d/vQRumMXfabOe+PAyDYC6fp02lddHnpZBIW32FPpAyn25T5eF34bdQ== X-Received: by 2002:a25:d6c8:0:b0:e03:645f:2099 with SMTP id 3f1490d57ef6-e03c1930956mr3016780276.8.1720128116432; Thu, 04 Jul 2024 14:21:56 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b5ef41ae4bsm6817256d6.105.2024.07.04.14.21.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2024 14:21:55 -0700 (PDT) Date: Thu, 4 Jul 2024 23:21:21 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 10/11] contrib: Add program to document and test assumptions about SO_REUSEADDR Message-ID: <20240704232121.60bcebee@elisabeth> In-Reply-To: <20240704045835.1149746-11-david@gibson.dropbear.id.au> References: <20240704045835.1149746-1-david@gibson.dropbear.id.au> <20240704045835.1149746-11-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: BWSNLJIFTI4EQQQAN42DIJY7JSEUCXA4 X-Message-ID-Hash: BWSNLJIFTI4EQQQAN42DIJY7JSEUCXA4 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, 4 Jul 2024 14:58:34 +1000 David Gibson wrote: > For the approach we intend to use for handling UDP flows, we have some > pretty specific requirements about how SO_REUSEADDR works with UDP sockets. > Specifically SO_REUSEADDR allows multiple sockets with overlapping bind()s, > and therefore there can be multiple sockets which are eligible to receive > the same datagram. Which one will actually receive it is important to us. > > Add a test program which verifies things work the way we expect, which > documents what those expectations are in the process. > > Signed-off-by: David Gibson > --- > contrib/udp-behaviour/.gitignore | 1 + > contrib/udp-behaviour/Makefile | 45 ++++ > contrib/udp-behaviour/common.c | 66 ++++++ > contrib/udp-behaviour/common.h | 47 ++++ > contrib/udp-behaviour/reuseaddr-priority.c | 240 +++++++++++++++++++++ > 5 files changed, 399 insertions(+) I reviewed these (10/11 and 11/11) a bit lightly, but they look sane to me. I just wonder: wouldn't it be better to have contrib/linux/udp-behaviour instead, so that it's consistent with the other stuff unter contrib/ (project names, kind of)? By the way, I reviewed everything else except for 9/11. That will take me a bit longer. And for the rest, I just have nits that I could also take care of on merge. -- Stefano