mirror of
https://passt.top/passt
synced 2024-12-22 05:35:23 +00:00
udp: rename udp_sock_handler() to udp_buf_sock_handler()
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 <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
e7ac995217
commit
377b666dc9
2
passt.c
2
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);
|
||||
|
6
udp.c
6
udp.c
@ -728,7 +728,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
|
||||
@ -736,8 +736,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
|
||||
|
2
udp.h
2
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,
|
||||
|
Loading…
Reference in New Issue
Block a user