mirror of
https://passt.top/passt
synced 2025-02-22 19:02:20 +00:00
In vhost-user mode, by default, create a second UNIX domain socket accepting connections from passt-repair, with the usual listener socket. When we need to set or clear TCP_REPAIR on sockets, we'll send them via SCM_RIGHTS to passt-repair, who sets the socket option values we ask for. To that end, introduce batched functions to request TCP_REPAIR settings on sockets, so that we don't have to send a single message for each socket, on migration. When needed, repair_flush() will send the message and check for the reply. Co-authored-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
17 lines
461 B
C
17 lines
461 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright (c) 2025 Red Hat GmbH
|
|
* Author: Stefano Brivio <sbrivio@redhat.com>
|
|
*/
|
|
|
|
#ifndef REPAIR_H
|
|
#define REPAIR_H
|
|
|
|
void repair_sock_init(const struct ctx *c);
|
|
void repair_listen_handler(struct ctx *c, uint32_t events);
|
|
void repair_handler(struct ctx *c, uint32_t events);
|
|
void repair_close(struct ctx *c);
|
|
int repair_flush(struct ctx *c);
|
|
int repair_set(struct ctx *c, int s, int cmd);
|
|
|
|
#endif /* REPAIR_H */
|