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 314F55A004F for ; Wed, 10 Jul 2024 23:38:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720647497; 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=rr4drAM8Yf6PH/y3gH96MSRqEKTIbfODLRiLl5/vL/g=; b=fFLfdudecKscr0XGFT2v84P/V0yh9gm681DQ5E8DAsIk4t1wZLdrMIrVtBdQtQL80lm1pF 5l4/DdShK6Rd0SnmtrZXEw/wvdVwE5rOJa7ndATcBNuu8eWSI8bMvLFOTsuGZFaKYkQF2O /wVf3auOs8DLcxWmu4RI8FRzaSPGdKQ= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-402-eNWWbod9O2KFMQxdQCZ-9w-1; Wed, 10 Jul 2024 17:38:16 -0400 X-MC-Unique: eNWWbod9O2KFMQxdQCZ-9w-1 Received: by mail-ua1-f72.google.com with SMTP id a1e0cc1a2514c-80fe896d0e4so58179241.3 for ; Wed, 10 Jul 2024 14:38:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720647495; x=1721252295; 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=rr4drAM8Yf6PH/y3gH96MSRqEKTIbfODLRiLl5/vL/g=; b=LdsZikBtZzBVQCTKzJgXEPJUKJoLc9PqlX98ybVh1p7NppzJEFm13VTp1FdoSm7IW5 GTgBOhZBDlkF93pwhIfyCfQhm45yAqX8DFsrRaFg+16tN0XIwLmdSn4Y3yF7IVC7q04a M29kvoCrbrTcOwKZsyA+P7ITSa4uHc8+NKx/5rsPqFQqfImO1a8sEBSeXDjUvfh1bk3C uU+FKGjlM3NWmJpun6buosyTL/aNxo4Z2SGCGne9FkfsJiElZsCz1R6KY+NXxqf+a/9B 84NtrQJ9+46hK1EZHS5BMLAMsBB29z0a8Hud9r2WekmUfgkxHLeepqGfDtAMdk6P991s jlcw== X-Gm-Message-State: AOJu0Ywozj7Tr1lQBVWYhjlFn8AsRDzo6SvKSBtiTrg/rKhQ6v3RWIou SWGZtDb537dfRACORcDkdDKa0ubxYJRoSvBPstAd8Hl4TYZNtdWQIsDOis3+s0Lf20DZqNUvXsS Q1yNvV8NmeO2folW+br3HIR6BHsCwAY+vhBcfQ+3Boek9nUI03g== X-Received: by 2002:a05:6102:d92:b0:48f:3bcf:58a5 with SMTP id ada2fe7eead31-4903219912bmr6785476137.19.1720647495360; Wed, 10 Jul 2024 14:38:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwgCxGGudZszhIs1zJ0O0ZEWqabmmBhTYnv/OXfa3r6BLEm4w8Z4kGPNHj2oE/BWoEamIzLQ== X-Received: by 2002:a05:6102:d92:b0:48f:3bcf:58a5 with SMTP id ada2fe7eead31-4903219912bmr6785462137.19.1720647495006; Wed, 10 Jul 2024 14:38:15 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-447f9bfb65csm23559921cf.92.2024.07.10.14.38.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2024 14:38:14 -0700 (PDT) Date: Wed, 10 Jul 2024 23:37:36 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v7 24/27] udp: Direct datagrams from host to guest via flow table Message-ID: <20240710233736.15a34a26@elisabeth> In-Reply-To: <20240705020724.3447719-25-david@gibson.dropbear.id.au> References: <20240705020724.3447719-1-david@gibson.dropbear.id.au> <20240705020724.3447719-25-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: TIPTGKUPRLLW6P7DEPWF2MFQLQB7XVRO X-Message-ID-Hash: TIPTGKUPRLLW6P7DEPWF2MFQLQB7XVRO 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: Two nits only: On Fri, 5 Jul 2024 12:07:21 +1000 David Gibson wrote: > This replaces the last piece of existing UDP port tracking with the > common flow table. Specifically use the flow table to direct datagrams > from host sockets to the guest tap interface. Since this now requires > a flow for every datagram, we add some logging if we encounter any > datagrams for which we can't find or create a flow. > > Signed-off-by: David Gibson > --- > flow_table.h | 14 ++++ > udp.c | 188 +++++++++++++++------------------------------------ > 2 files changed, 67 insertions(+), 135 deletions(-) > > diff --git a/flow_table.h b/flow_table.h > index 1faac4a7..da9483b3 100644 > --- a/flow_table.h > +++ b/flow_table.h > @@ -106,6 +106,20 @@ static inline uint8_t pif_at_sidx(flow_sidx_t sidx) > return flow->f.pif[sidx.side]; > } > > +/** flowside_at_sidx - Retrieve a specific flowside flowside_at_sidx() > + * @sidx: Flow & side index > + * > + * Return: Flowside for the flow & side given by @sidx > + */ > +static inline const struct flowside *flowside_at_sidx(flow_sidx_t sidx) > +{ > + const union flow *flow = flow_at_sidx(sidx); > + > + if (!flow) > + return PIF_NONE; Usual extra newline. > + return &flow->f.side[sidx.side]; > +} I finished reviewing all the other patches, no further comments, everything else looks good to me. -- Stefano