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 A40AF5A004F for ; Wed, 10 Jul 2024 23:36:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720647363; 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=9dheCy5Stnq5x6uEQVPdAVDiKkvgaIX6hdGj0p+YZes=; b=hjxgCBHz+P1+1EXTLGFuxd7k2CkTLx5xKvN7pmEr19SpJJYkpIaNljx8M9LBjpSFULSFmA rfw5UAa51DEYIiASa2A/i/OGi29Bv1MVefsMyvTkJQeXwoMTxoRFbXWeEKGyZ7AO6ANjYL j4jYcvslq58gvwOlAqjCzdZN8HSLYO0= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-540-jnrKroNGNw-4DgNiaKiLEQ-1; Wed, 10 Jul 2024 17:36:02 -0400 X-MC-Unique: jnrKroNGNw-4DgNiaKiLEQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6b5cec74f1dso1872136d6.3 for ; Wed, 10 Jul 2024 14:36:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720647361; x=1721252161; 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=9dheCy5Stnq5x6uEQVPdAVDiKkvgaIX6hdGj0p+YZes=; b=CMaFrMPQSKT1G5B5Nb3HyHh+G6O/+YUK1BEp+r53i0avKCVfs8XR1DsaU8p7UA0Uql FKcP6U/RwZO+IiDb6ObiNIp3/Y3r+M/gCwhH9K7i2/MBDB70r01Kr2qe3/A2tuWVM+gh qt2ivk2rbwTJgk67Z1Gl36uh4II9aPcgFeJ5TIk4ZOQJoLtrjdewbq7XC/309IXQk0DV 8w5PlfBBZG03/7RAt5FpUL0ICexCow4CH/dQ71EnsehoePHTs61HjcKPJ3idNfOoWZtC 0/Hk5cY6N1BYFiio0qeLpXfsXvXKFpyRFBgEFB9Yw9R+1fcU51PQyJHZ/ZLz2d5LrQFM Y/Kg== X-Gm-Message-State: AOJu0Yzc1Ykv2ntkkqYAOZTk91Y9Gnyx1zV+k6oALSi9xWcjfS74BJdZ JOpscQNi4OGsTvS+14e2p9BYMWfRzRrd0ZTaAKZexH+ErdDss2So2d1yYe6fNvn6GqwKGHElvBU Vvcr8P2bZe/gU8dXnmVpmEdtkOy+5FiRr0N6VWkp8I+ZRxg6iGQ== X-Received: by 2002:a05:6214:27ef:b0:6b7:42bd:99f6 with SMTP id 6a1803df08f44-6b742bd9e07mr32030856d6.33.1720647361624; Wed, 10 Jul 2024 14:36:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvP324M6UWAhKCw8H9bprGjdIfv15jHuw9+ooH/wg9QGl2S2P8bgrz1nNg2PhaatOl7wefkw== X-Received: by 2002:a05:6214:27ef:b0:6b7:42bd:99f6 with SMTP id 6a1803df08f44-6b742bd9e07mr32030726d6.33.1720647361291; Wed, 10 Jul 2024 14:36:01 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b61ba73984sm20120136d6.75.2024.07.10.14.36.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2024 14:36:00 -0700 (PDT) Date: Wed, 10 Jul 2024 23:35:23 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v7 20/27] udp: Create flows for datagrams from originating sockets Message-ID: <20240710233503.03147137@elisabeth> In-Reply-To: References: <20240705020724.3447719-1-david@gibson.dropbear.id.au> <20240705020724.3447719-21-david@gibson.dropbear.id.au> <20240710003202.2909199a@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: GETABJGA6ZLJ4HYJZTMZSMLROOZVHMTK X-Message-ID-Hash: GETABJGA6ZLJ4HYJZTMZSMLROOZVHMTK 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 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). 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? 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. -- Stefano