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.133.124]) by passt.top (Postfix) with ESMTP id 417A95A004E for ; Thu, 11 Jul 2024 10:20:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720686040; 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=o8LrXZLHNzNlKI6OEylRYZq64XB0k5Ms+IfRCKACY2M=; b=ZBaeMl5iDSRS0HDRRv7yvMrYbxhyEZDXFI53JJsJqiwq8/pijP+MDrhj0RRZbO7CcKTMux c4mragy3VixkU7RhD2sW+Etm4RmoDB/crp1O+z0/t8mM1P515DPnqkHqak8x697AJMFiGG sVVU0mmsbqskbPomuIMVc7O27pbstyQ= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-nCNx5RsVObiwVxOFrZk1iA-1; Thu, 11 Jul 2024 04:20:38 -0400 X-MC-Unique: nCNx5RsVObiwVxOFrZk1iA-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a141e44419so87012285a.1 for ; Thu, 11 Jul 2024 01:20:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720686038; x=1721290838; 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=o8LrXZLHNzNlKI6OEylRYZq64XB0k5Ms+IfRCKACY2M=; b=kavSQKmJJaxsQ0Gc+dSJVPf6ecS9+utnoUT26aptdRZyIkUeRazKLUMr4j666Qp8L4 IVOL6YMn0QNQy+PGBC2ILwZlD/kRLjiXktASzI9Csxk4aI6e6mhl9F1M/S8zEvVbdh9q aEkenK37Z8mKzeTxd4UDyrvomuod/+2VP76ak3F6gZ7klVRa719FTl5RWOqsAzQA9IJA MB3vg7U9sMOnVpVF9qTdw6sdwPnRTUnv/RTvyldslcpZ9XaEYlisG4MawG5H48+PstAF F9dcIyAnOPW39VHJi2nOSD3nyyXgwdMfURNowBTid9aGUkk42Eyval+tWr5hO03GYYKI o2SQ== X-Gm-Message-State: AOJu0Yx0XD+rTNyeL9SfsM4msPqa51FyHiNj+s+scL5f8VXfnv90wQGG Dh9n+VKVCXBFtyLuHmSv/fW8AfhR0GpxirjY7F/4XGre1xLVBs6Lk+E8vLz5Z+No4PXF3FeWavc r9MfPgSEcBpWoNg5D7LsIymLi6FHQx7Ti10YQ2iehKvWLWjpIvw== X-Received: by 2002:a05:620a:2013:b0:79d:569a:6997 with SMTP id af79cd13be357-79f19befed9mr714318285a.70.1720686037766; Thu, 11 Jul 2024 01:20:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYykIDwswJNDp1pOky4augr109mFx3E7vNPy2awrUiz/Xf80Ok4FvttCU950AJHUaZ8GD4Ow== X-Received: by 2002:a05:620a:2013:b0:79d:569a:6997 with SMTP id af79cd13be357-79f19befed9mr714317085a.70.1720686037448; Thu, 11 Jul 2024 01:20:37 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79f190ab788sm268223085a.120.2024.07.11.01.20.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jul 2024 01:20:36 -0700 (PDT) Date: Thu, 11 Jul 2024 10:20:01 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v7 20/27] udp: Create flows for datagrams from originating sockets Message-ID: <20240711101937.2f7fb626@elisabeth> In-Reply-To: References: <20240705020724.3447719-1-david@gibson.dropbear.id.au> <20240705020724.3447719-21-david@gibson.dropbear.id.au> <20240710003202.2909199a@elisabeth> <20240710233503.03147137@elisabeth> 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: G33K3MTPYCQCZYTPLKXNMTHSMAKX727K X-Message-ID-Hash: G33K3MTPYCQCZYTPLKXNMTHSMAKX727K 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, jmaloy@redhat.com 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, 11 Jul 2024 14:26:38 +1000 David Gibson wrote: > On Wed, Jul 10, 2024 at 11:35:23PM +0200, Stefano Brivio wrote: > > On Wed, 10 Jul 2024 09:59:08 +1000 > > David Gibson wrote: > > > > > On Wed, Jul 10, 2024 at 12:32:02AM +0200, Stefano Brivio wrote: > > > > Nits only, here: > > > > > > > > On Fri, 5 Jul 2024 12:07:17 +1000 > > > > David Gibson wrote: > > > > > > > > > [...] > > > > > > > > > > + * @c: Execution context > > > > > + * @proto: Protocol of the flow (IP L4 protocol number) > > > > > + * @pif: Interface of the flow > > > > > + * @esa: Socket address of the endpoint > > > > > + * @fport: Forwarding port number > > > > > + * > > > > > + * Return: sidx of the matching flow & side, FLOW_SIDX_NONE if not found > > > > > + */ > > > > > +flow_sidx_t flow_lookup_sa(const struct ctx *c, uint8_t proto, uint8_t pif, > > > > > + const void *esa, in_port_t fport) > > > > > +{ > > > > > + struct flowside fside = { > > > > > > > > And the "f" in "fside" stands for "forwarding"... I don't have any > > > > quick fix in mind, and it's _kind of_ clear anyway, but this makes me > > > > doubt a bit about the "forwarding" / "endpoint" choice of words. > > > > > > Heh, no, here "fside" is simply short for "flowside". Every flowside > > > has both forwarding and endpoint elements. > > > > Oh, I thought you called it fside here because you're setting the > > forwarding part of it directly, or something like that. > > > > > So it is confusing, but > > > for a different reason. I need to find a different convention for > > > naming struct flowside variables. I'd say 'side', but sometimes > > > that's used for the 1-bit integer indicating which side in a flow. > > > > > > Hrm.. now that pif has been removed from here, maybe I could rename > > > struct flowside back to 'flowaddrs' or 'sideaddrs' perhaps? > > > > That's also confusing because it contains ports too (even though sure, > > in some sense they're part of the address). > > Right :/. > > > I would suggest keeping it > > like it is in for this series, but after that, if it's not too long, > > what about flow_addrs_ports? > > Still need a conventional name for the variables. "fap" probably > isn't the best look, and still has the potentially confusing "f" in > it. > > > Actually, I don't think flowside is that bad. What I'm struggling with > > is rather 'forwarding' and 'endpoint'. I don't have any good suggestion > > at the moment, anyway. Using 'local' and 'remote' (laddr/lport, > > raddr/rport) would be clearer to me and avoid the conflict with 'f' of > > flowside, but you had good reasons to avoid that, if I recall correctly. > > Kind of, yeah. Local and remote are great when it's clear we're > talking specifically from the point of view of the passt process. > There are a bunch of cases where it's not necessarily obvious if we're > talking from that point of view, the point of view of the guest, or > the point of view of the host (the last usually when the endpoint is > somewhere on an entirely different system). I wanted something that > wherever we were talking about it is specifically relative to the > passt process itself. > > I get the impression that "forwarding" is causing more trouble here > than "endpoint". "midpoint address"? "intercepted address"? > "redirected address" (probably not, that's 'r' like remote but this > would be the local address)? I think "forwarding" is still better than any of those. Perhaps "passt address" (and paddr/pport)... but I'm not sure it's much better than "forwarding". -- Stefano