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 B9DBB5A0274 for ; Mon, 12 Feb 2024 00:17:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707693471; 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=/dylPCLeg4PislRgnGH8wpF5MQyYGiG0jODas6fVOEE=; b=QxhtHINluCgLqeGvdD31Jzs6CJfh9Q9fkLqVgWCTKLt5TD5iOV6CCX2Ki+aX1esCxFVkIk 9+9/aUiYWgNfJzu9CkzECfE4fv9xq4Cp2sHavzK3whB3MS2W8tJf3rssrldyOxeSCkWLbi Sj48CdUoBmA97P0aWTegZhaiJ7wzH+I= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-VqhgNBrWOKGSRx9jJlaElQ-1; Sun, 11 Feb 2024 18:17:50 -0500 X-MC-Unique: VqhgNBrWOKGSRx9jJlaElQ-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-560127ce17fso1348215a12.0 for ; Sun, 11 Feb 2024 15:17:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707693468; x=1708298268; 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=/dylPCLeg4PislRgnGH8wpF5MQyYGiG0jODas6fVOEE=; b=X2YP7gWE3PLUG7fnSfT39JrMQuotWn+Dfaw6/Z9hef4i3LwXHoLT8ifmlM172aj4bS 70lZStS4NJwEzjvL9+uolPuhnFs7n7RfVTnZmUTVW6Ohs267iWFrF7ECf46ZzkofbV/7 feHq2s3TqxYZbFrMd4RnHoDqRo9DaB9/JYncmY6Dg0oZlF26hd+2l/gyidbB4ms4U5tN 8bXUW6pbh3TXQEJL4Mvg95K5IlGTCv0fi+DDJzEMYkH/5vN+GwLsdqNJJuAJBLfNBENX k/y+fa7q3nJJGrjhgvQZoVrB1uc/0Shxjk/Z0GuVKMdVBAFkvvapmOZQ+MwKLVxWpDt2 HzXA== X-Forwarded-Encrypted: i=1; AJvYcCWrjuHxlrTp+WyI0To3dO66IULliuchHqptg2fSKsLRFed6EjFhr/KKK5Qfd2W74fWDL/ohkppa5AsMKGO1Ue3lTDxH X-Gm-Message-State: AOJu0Yz6mwkpkuIvdyS8I/dIA7bROmdB+ki1rDBMc6CGXmsfka7nQz4i LptYNsiTnoPbs1nHQifwPL02q4QBs3G4/Kg+QHQ4GXAZ+d922WZ/iMWoyAIZsfcuOBKxZx58TRy RIYyOVcNz/PISTKfT24EfAZmwMm4p/xkOTBTBmDUMuk7FmGkqi21OGOKcF/yI X-Received: by 2002:aa7:d1c8:0:b0:560:3a3:0 with SMTP id g8-20020aa7d1c8000000b0056003a30000mr4026276edp.30.1707693468680; Sun, 11 Feb 2024 15:17:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLSNLAOagYMBV9L1ORvPKiUdGGJ8dKP0KI0Bne9XXUfHXVGKCCmzaWYxooDgL1iqPf0Cnv6g== X-Received: by 2002:aa7:d1c8:0:b0:560:3a3:0 with SMTP id g8-20020aa7d1c8000000b0056003a30000mr4026271edp.30.1707693468412; Sun, 11 Feb 2024 15:17:48 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXBbSTiuvTrU/bGkyL6ZH+rpdtDUSNCvriZeW95kYzJBVlIMUd3EfQcT0FjSj33kUCeAmdmp/QJQxxFhj+AeiYAeNHJ Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id fg5-20020a056402548500b00561814de0easm1595862edb.62.2024.02.11.15.17.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2024 15:17:47 -0800 (PST) Date: Mon, 12 Feb 2024 00:17:14 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 15/24] udp: rename udp_sock_handler() to udp_buf_sock_handler() Message-ID: <20240212001714.293719a8@elisabeth> In-Reply-To: References: <20240202141151.3762941-1-lvivier@redhat.com> <20240202141151.3762941-16-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; 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: YA32A2D7T74X74SCMT2JC2GOD5G7PQBL X-Message-ID-Hash: YA32A2D7T74X74SCMT2JC2GOD5G7PQBL 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: Laurent Vivier , 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 Tue, 6 Feb 2024 13:14:41 +1100 David Gibson wrote: > On Fri, Feb 02, 2024 at 03:11:42PM +0100, Laurent Vivier wrote: > > We are going to introduce a variant of the function to use > > vhost-user buffers rather than passt internal buffers. > > Not entirely sure the new name really conveys that distinction. Me neither: vhost-user uses buffers too. I'd rather keep the udp_sock_handler() name here, I don't see a particular problem having udp_vu_sock_handler() on top of that (unless we can avoid duplicating code as David suggested for 23/24). > > > > Signed-off-by: Laurent Vivier > > --- > > passt.c | 2 +- > > udp.c | 6 +++--- > > udp.h | 4 ++-- > > 3 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/passt.c b/passt.c > > index 10042a9b9789..c70caf464e61 100644 > > --- a/passt.c > > +++ b/passt.c > > @@ -389,7 +389,7 @@ loop: > > tcp_timer_handler(&c, ref); > > break; > > case EPOLL_TYPE_UDP: > > - udp_sock_handler(&c, ref, eventmask, &now); > > + udp_buf_sock_handler(&c, ref, eventmask, &now); > > break; > > case EPOLL_TYPE_ICMP: > > icmp_sock_handler(&c, AF_INET, ref); > > diff --git a/udp.c b/udp.c > > index 77168fb0a2af..9c56168c6340 100644 > > --- a/udp.c > > +++ b/udp.c > > @@ -736,7 +736,7 @@ static void udp_tap_send(const struct ctx *c, > > #pragma GCC diagnostic pop > > > > /** > > - * udp_sock_handler() - Handle new data from socket > > + * udp_buf_sock_handler() - Handle new data from socket > > * @c: Execution context > > * @ref: epoll reference > > * @events: epoll events bitmap > > @@ -744,8 +744,8 @@ static void udp_tap_send(const struct ctx *c, > > * > > * #syscalls recvmmsg > > */ > > -void udp_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, > > - const struct timespec *now) > > +void udp_buf_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, > > + const struct timespec *now) > > { > > /* For not entirely clear reasons (data locality?) pasta gets > > * better throughput if we receive tap datagrams one at a > > diff --git a/udp.h b/udp.h > > index 087e4820f93c..6c8519e87f1a 100644 > > --- a/udp.h > > +++ b/udp.h > > @@ -9,8 +9,8 @@ > > #define UDP_TIMER_INTERVAL 1000 /* ms */ > > > > void udp_portmap_clear(void); > > -void udp_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, > > - const struct timespec *now); > > +void udp_buf_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, > > + const struct timespec *now); > > int udp_tap_handler(struct ctx *c, uint8_t pif, int af, > > const void *saddr, const void *daddr, > > const struct pool *p, int idx, const struct timespec *now); > -- Stefano