mirror of
https://passt.top/passt
synced 2025-06-11 01:55:34 +02:00

Share some additional miscellaneous logic between the vhost-user and "buf" paths for data on udp reply sockets. The biggest piece is error handling of cases where we can't forward between the two pifs of the flow. We also make common some more simple logic locating the correct flow and its parameters. This adds some lines of code due to extra comment lines, but nonetheless reduces logic duplication. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
14 lines
396 B
C
14 lines
396 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/* Copyright Red Hat
|
|
* Author: Laurent Vivier <lvivier@redhat.com>
|
|
*/
|
|
|
|
#ifndef UDP_VU_H
|
|
#define UDP_VU_H
|
|
|
|
void udp_vu_listen_sock_data(const struct ctx *c, union epoll_ref ref,
|
|
const struct timespec *now);
|
|
bool udp_vu_reply_sock_data(const struct ctx *c, int s, flow_sidx_t tosidx,
|
|
const struct timespec *now);
|
|
|
|
#endif /* UDP_VU_H */
|