public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
3f802e760d3a4bbdc5b81211fa6cc660a900e388 blob 1370 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright Red Hat
 * Author: Laurent Vivier <lvivier@redhat.com>
 */

#ifndef EPOLL_CTL_H
#define EPOLL_CTL_H

#include <sys/epoll.h>

#include "util.h"
#include "passt.h"
#include "epoll_type.h"
#include "flow.h"
#include "tcp.h"
#include "udp.h"

/**
 * union epoll_ref - Breakdown of reference for epoll fd bookkeeping
 * @type:	Type of fd (tells us what to do with events)
 * @fd:		File descriptor number (implies < 2^24 total descriptors)
 * @flow:	Index of the flow this fd is linked to
 * @flowside:	Index and side of a flow this fd is linked to
 * @listen:	Information for listening sockets
 * @data:	Data handled by protocol handlers
 * @nsdir_fd:	netns dirfd for fallback timer checking if namespace is gone
 * @queue:	vhost-user queue index for this fd
 * @u64:	Opaque reference for epoll_ctl() and epoll_wait()
 */
union epoll_ref {
	struct {
		enum epoll_type type:8;
		int32_t		  fd:FD_REF_BITS;
		union {
			uint32_t flow;
			flow_sidx_t flowside;
			union fwd_listen_ref listen;
			uint32_t data;
			int nsdir_fd;
			int queue;
		};
	};
	uint64_t u64;
};
static_assert(sizeof(union epoll_ref) <= sizeof(union epoll_data),
	      "epoll_ref must have same size as epoll_data");

int epoll_add(int epollfd, uint32_t events, union epoll_ref ref);
void epoll_del(int epollfd, int fd);
#endif /* EPOLL_CTL_H */
debug log:

solving 3f802e76 ...
found 3f802e76 in https://archives.passt.top/passt-dev/20260108021450.2650004-4-david@gibson.dropbear.id.au/ ||
	https://archives.passt.top/passt-dev/20260105101314.2565206-4-david@gibson.dropbear.id.au/
found 02b081e2 in https://archives.passt.top/passt-dev/20260108021450.2650004-3-david@gibson.dropbear.id.au/ ||
	https://archives.passt.top/passt-dev/20260105101314.2565206-3-david@gibson.dropbear.id.au/
found 2d7e7123 in https://passt.top/passt
preparing index
index prepared:
100644 2d7e7123ae9d341a154814af437237d42e7afc0e	epoll_ctl.h

applying [1/4] https://archives.passt.top/passt-dev/20260108021450.2650004-3-david@gibson.dropbear.id.au/
diff --git a/epoll_ctl.h b/epoll_ctl.h
index 2d7e7123..02b081e2 100644

Checking patch epoll_ctl.h...
Applied patch epoll_ctl.h cleanly.

skipping https://archives.passt.top/passt-dev/20260105101314.2565206-3-david@gibson.dropbear.id.au/ for 02b081e2
index at:
100644 02b081e2e691542916405f677fab001796592334	epoll_ctl.h

applying [2/4] https://archives.passt.top/passt-dev/20260108021450.2650004-4-david@gibson.dropbear.id.au/
diff --git a/epoll_ctl.h b/epoll_ctl.h
index 02b081e2..3f802e76 100644

Checking patch epoll_ctl.h...
Applied patch epoll_ctl.h cleanly.

skipping https://archives.passt.top/passt-dev/20260105101314.2565206-4-david@gibson.dropbear.id.au/ for 3f802e76
index at:
100644 3f802e760d3a4bbdc5b81211fa6cc660a900e388	epoll_ctl.h

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).