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 D9BE35A0304 for ; Wed, 29 May 2024 12:19:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716977959; 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=avOVQmZc9IUwCZBYRfFPMkB6NdnbDeagAGICOepE3PI=; b=PP5f71KaKLT6Gvl1RwDb+j5F0kzZef3V7FUbVh2yJaYYpNSy0S1Ep3hRFEyqGmWCTFHspb CQ7TcKzbJ/PfO4O+iXe50DoKgW67hepIS+uc/5N6hsf0TRybyLt/aUcWKGW8CFKL/G7EO2 zw7v7pjMn7bIVoenR+n+KuyllNBNW0E= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-dZ4rGt0wPvuienKHEd5Mjg-1; Wed, 29 May 2024 06:19:16 -0400 X-MC-Unique: dZ4rGt0wPvuienKHEd5Mjg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBA5181227E for ; Wed, 29 May 2024 10:19:15 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.192.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C69728E6; Wed, 29 May 2024 10:19:15 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v3 07/11] udp: rename udp_sock_handler() to udp_buf_sock_handler() Date: Wed, 29 May 2024 12:19:05 +0200 Message-ID: <20240529101909.1120078-8-lvivier@redhat.com> In-Reply-To: <20240529101909.1120078-1-lvivier@redhat.com> References: <20240529101909.1120078-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: U2FTOQYINK3VJN254RDW2UIU2JU3I3AS X-Message-ID-Hash: U2FTOQYINK3VJN254RDW2UIU2JU3I3AS X-MailFrom: lvivier@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 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: We are going to introduce a variant of the function to use vhost-user buffers rather than passt internal buffers. Signed-off-by: Laurent Vivier --- passt.c | 2 +- udp.c | 6 +++--- udp.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/passt.c b/passt.c index a8c4cd3f8820..69a59f1e9b6d 100644 --- a/passt.c +++ b/passt.c @@ -365,7 +365,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_PING: icmp_sock_handler(&c, ref); diff --git a/udp.c b/udp.c index 4295d48046a6..a13013901e26 100644 --- a/udp.c +++ b/udp.c @@ -729,7 +729,7 @@ static void udp_tap_send(const struct ctx *c, } /** - * 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 @@ -737,8 +737,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 9976b6231f1c..5865def20856 100644 --- a/udp.h +++ b/udp.h @@ -9,7 +9,7 @@ #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, +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, sa_family_t af, const void *saddr, const void *daddr, -- 2.44.0