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.129.124]) by passt.top (Postfix) with ESMTP id D5F4C5A0304 for ; Mon, 27 May 2024 11:10:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716801041; 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=tToIYMwi5dh04k9Ezsn2BmXSG5ItIysV0x1dHRFOA7s=; b=BFG7MBoqeyWR3gYZbO1A9jxP1bl5sFnXe0f0dbXW3Q2V+sunscRND++PP1BmEc4SJwPFYf 09cI0R1Sc6DNgVndqDTKRXeLrFsT4RBmBncDk3HuKcCwfZnOQp7dYAEjDVcDNIah91ADcR C2G3urN8Euq2CV0clc8ThvnYE3/5HUk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-81-I2oGSZ32PmWFqzcBeLRzVA-1; Mon, 27 May 2024 05:10:37 -0400 X-MC-Unique: I2oGSZ32PmWFqzcBeLRzVA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 4F96529AA3AE for ; Mon, 27 May 2024 09:10:37 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.192.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3D9340C6DAF; Mon, 27 May 2024 09:10:36 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 7/8] udp: rename udp_sock_handler() to udp_buf_sock_handler() Date: Mon, 27 May 2024 11:10:29 +0200 Message-ID: <20240527091030.772228-8-lvivier@redhat.com> In-Reply-To: <20240527091030.772228-1-lvivier@redhat.com> References: <20240527091030.772228-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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: XJLZ7BXT45THQHEDLR6KBDHHSBXGWHQS X-Message-ID-Hash: XJLZ7BXT45THQHEDLR6KBDHHSBXGWHQS 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 771b8a74e90a..cae8df74a529 100644 --- a/passt.c +++ b/passt.c @@ -374,7 +374,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 39c7c4e0a584..d6a545a5fca3 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