Searched refs:fd (Results 1 - 25 of 73) sorted by relevance

123

/deb_dpdk/app/test/
H A Dtest_eal_fs.c50 FILE *fd = NULL; local
55 /* BSD doesn't have /proc/pid/fd */
68 snprintf(proc_path, sizeof(proc_path), "/proc/self/fd/%d", tmp_file_handle);
86 fd = fopen(filename,"w");
87 if (fd == NULL) {
91 fprintf(fd,"%u\n", valid_number);
92 fclose(fd);
93 fd = NULL;
106 fd = fopen(filename,"w");
107 if (fd
[all...]
H A Dprocess.h60 int i, fd, status; local
79 /* close all open file descriptors, check /proc/self/fd to only
81 for (fd = getdtablesize(); fd > 2; fd-- ) {
82 snprintf(path, sizeof(path), "/proc/" exe "/fd/%d", fd);
84 close(fd);
/deb_dpdk/lib/librte_vhost/
H A Dfd_man.h42 typedef void (*fd_cb)(int fd, void *dat, int *remove);
45 int fd; /* -1 indicates this entry is empty */ member in struct:fdentry
46 fd_cb rcb; /* callback when this fd is readable. */
47 fd_cb wcb; /* callback when this fd is writeable.*/
48 void *dat; /* fd context */
54 struct fdentry fd[MAX_FDS]; member in struct:fdset
56 int num; /* current fd number of this fdset */
62 int fdset_add(struct fdset *pfdset, int fd,
65 void *fdset_del(struct fdset *pfdset, int fd);
66 int fdset_try_del(struct fdset *pfdset, int fd);
[all...]
H A Dfd_man.c55 for (i = last_valid_idx; i >= 0 && pfdset->fd[i].fd == -1; i--)
64 pfdset->fd[dst] = pfdset->fd[src];
69 * Find deleted fd entries and remove them
80 if (pfdset->fd[i].fd != -1)
92 * Returns the index in the fdset for a given fd.
94 * index for the fd, or -1 if fd is
97 fdset_find_fd(struct fdset *pfdset, int fd) argument
108 fdset_add_fd(struct fdset *pfdset, int idx, int fd, fd_cb rcb, fd_cb wcb, void *dat) argument
144 fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat) argument
169 fdset_del(struct fdset *pfdset, int fd) argument
204 fdset_try_del(struct fdset *pfdset, int fd) argument
245 int fd, numfds; local
[all...]
H A Dsocket.c90 static void vhost_user_server_new_connection(int fd, void *data, int *remove);
91 static void vhost_user_read_cb(int fd, void *dat, int *remove);
96 .fd = { [0 ... MAX_FDS - 1] = {-1, NULL, NULL, NULL, 0} },
196 vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket) argument
205 close(fd);
211 close(fd);
224 conn->connfd = fd;
227 ret = fdset_add(&vhost_user.fdset, fd, vhost_user_read_cb,
232 close(fd);
234 "failed to add fd
246 vhost_user_server_new_connection(int fd, void *dat, int *remove __rte_unused) argument
285 int fd; local
312 int fd; local
353 int fd; member in struct:vhost_user_reconnect
369 vhost_user_connect_nonblock(int fd, struct sockaddr *un, size_t sz) argument
455 int fd; local
[all...]
/deb_dpdk/lib/librte_port/
H A Drte_port_fd.h58 int fd; member in struct:rte_port_fd_reader_params
73 int fd; member in struct:rte_port_fd_writer_params
87 int fd; member in struct:rte_port_fd_writer_nodrop_params
/deb_dpdk/lib/librte_eal/bsdapp/eal/
H A Deal_hugepage_info.c54 int fd = open(filename, O_CREAT | O_RDWR, 0666); local
55 if (fd < 0)
57 if (ftruncate(fd, mem_size) < 0) {
58 close(fd);
61 retval = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
62 close(fd);
73 int num_buffers, fd, error; local
97 fd = open(CONTIGMEM_DEV, O_RDWR);
98 if (fd < 0) {
117 hpi->lock_descriptor = fd;
[all...]
H A Deal_pci.c144 if (dev->intr_handle.fd) {
145 close(dev->intr_handle.fd);
146 dev->intr_handle.fd = -1;
169 /* save fd if in primary process */
170 dev->intr_handle.fd = open(devname, O_RDWR);
171 if (dev->intr_handle.fd < 0) {
200 int fd; local
222 fd = open(devname, O_RDWR);
223 if (fd < 0) {
231 mapaddr = pci_map_resource(NULL, fd, (off_
368 int fd; local
414 int fd; local
464 int fd = -1; local
504 int fd = -1; local
[all...]
/deb_dpdk/examples/l2fwd-keepalive/
H A Dshm.c44 int fd; local
57 fd = shm_open(RTE_KEEPALIVE_SHM_NAME,
59 if (fd < 0)
64 else if (ftruncate(fd, sizeof(struct rte_keepalive_shm)) != 0)
70 PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
71 close(fd);
/deb_dpdk/lib/librte_eal/linuxapp/eal/
H A Deal_vfio_mp_sync.c71 #define FD_TO_CMSGHDR(fd, chdr) \
76 memcpy((chdr).__cmsg_data, &(fd), sizeof(fd));\
78 #define CMSGHDR_TO_FD(chdr, fd) \
79 memcpy(&(fd), (chdr).__cmsg_data, sizeof(fd))
109 * 2c. in case of valid group, SOCKET_OK is sent and immediately followed by fd
165 /* send OK in message, fd in control message */
167 vfio_mp_sync_send_fd(int socket, int fd) argument
188 FD_TO_CMSGHDR(fd, *chd
205 int ret, req, fd; local
270 int ret, fd, vfio_group_no; local
[all...]
H A Deal_interrupts.c74 static RTE_DEFINE_PER_LCORE(int, _epfd) = -1; /**< epoll fd per thread */
155 *fd_ptr = intr_handle->fd;
160 RTE_LOG(ERR, EAL, "Error enabling INTx interrupts for fd %d\n",
161 intr_handle->fd);
177 RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n",
178 intr_handle->fd);
204 RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n",
205 intr_handle->fd);
221 "Error disabling INTx interrupts for fd %d\n", intr_handle->fd);
915 eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle) argument
1061 rte_epoll_ctl(int epfd, int op, int fd, struct rte_epoll_event *event) argument
1165 int fd; local
[all...]
H A Deal_hugepage_info.c112 FILE *fd = fopen(proc_meminfo, "r"); local
113 if (fd == NULL)
115 while(fgets(buffer, sizeof(buffer), fd)){
121 fclose(fd);
148 FILE *fd = fopen(proc_mounts, "r"); local
149 if (fd == NULL)
155 while (fgets(buf, sizeof(buf), fd)){
188 fclose(fd);
202 int dir_fd, fd, lck_result; local
229 fd
[all...]
H A Deal_memory.c132 int fd = open("/proc/self/pagemap", O_RDONLY); local
134 if (fd < 0) {
143 close(fd);
163 int fd, retval; local
199 fd = open("/proc/self/pagemap", O_RDONLY);
200 if (fd < 0) {
208 if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
211 close(fd);
215 retval = read(fd, &page, PFN_MASK_SIZE);
216 close(fd);
270 int retval, fd = open(RANDOMIZE_VA_SPACE_FILE, O_RDONLY); local
298 int fd; local
373 int fd; local
618 int fd = open(filename, O_CREAT | O_RDWR, 0666); local
1260 getFileSize(int fd) argument
1283 int fd, fd_zero = -1, fd_hugepage = -1; local
[all...]
H A Deal_pci_uio.c234 if (dev->intr_handle.fd) {
235 close(dev->intr_handle.fd);
236 dev->intr_handle.fd = -1;
262 /* save fd if in primary process */
263 dev->intr_handle.fd = open(devname, O_RDWR);
264 if (dev->intr_handle.fd < 0) {
313 int fd; local
340 fd = open(devname, O_RDWR);
341 if (fd < 0) {
351 mapaddr = pci_map_resource(pci_map_addr, fd,
429 int fd, i; local
[all...]
H A Deal_timer.c169 int fd, ret; local
177 fd = open(DEV_HPET, O_RDONLY);
178 if (fd < 0) {
184 eal_hpet = mmap(NULL, 1024, PROT_READ, MAP_SHARED, fd, 0);
191 close(fd);
195 close(fd);
/deb_dpdk/examples/netmap_compat/lib/
H A Dcompat_netmap.h73 int rte_netmap_close(int fd);
74 int rte_netmap_ioctl(int fd, uint32_t op, void *param);
77 void *rte_netmap_mmap(void *addr, size_t length, int prot, int flags, int fd,
H A Dcompat_netmap.c69 uint32_t fd; member in struct:netmap_port
206 fd_release(int32_t fd) argument
210 idx = FD_TO_IDX(fd);
212 if (!FD_VALID(fd) || (port = fd_port[idx].port) == FD_PORT_FREE)
216 if (port < RTE_DIM(ports) && ports[port].fd == idx) {
263 ioctl_niocginfo(__rte_unused int fd, void * param) argument
315 if (ports[port].fd < RTE_DIM(fd_port)) {
316 RTE_LOG(ERR, USER1, "port %hhu already in use by fd: %u\n",
317 port, IDX_TO_FD(ports[port].fd));
321 RTE_LOG(ERR, USER1, "fd
400 ioctl_niocregif(int32_t fd, void * param) argument
434 ioctl_niocunregif(int fd) argument
527 ioctl_niocrxsync(int fd) argument
622 ioctl_nioctxsync(int fd) argument
761 rte_netmap_close(__rte_unused int fd) argument
776 rte_netmap_ioctl(int fd, uint32_t op, void *param) argument
822 rte_netmap_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) argument
845 int fd; local
[all...]
/deb_dpdk/lib/librte_cmdline/
H A Dcmdline_socket.c78 int fd; local
84 fd = open(path, O_RDONLY, 0);
85 if (fd < 0) {
89 return cmdline_new(ctx, prompt, fd, -1);
/deb_dpdk/lib/librte_eal/linuxapp/eal/include/exec-env/
H A Drte_interrupts.h60 typedef void (*rte_intr_event_cb_t)(int fd, void *arg);
78 int fd; /**< OUT: event fd */ member in struct:rte_epoll_event
91 int fd; /**< interrupt event file descriptor */ member in struct:rte_intr_handle
94 uint32_t nb_efd; /**< number of available efd(event fd) */
107 * Epoll instance fd on which the caller wait for events.
125 * It requests that the operation op be performed for the target fd.
128 * Epoll instance fd on which the caller perform control operations.
130 * The operation be performed for the target fd.
131 * @param fd
[all...]
/deb_dpdk/lib/librte_power/
H A Dguest_channel.c59 int fd = -1; local
68 RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is already open with fd %d\n",
76 fd = open(fd_path, O_RDWR);
77 if (fd < 0) {
83 flags = fcntl(fd, F_GETFL, 0);
91 if (fcntl(fd, F_SETFL, flags) < 0) {
103 global_fds[lcore_id] = fd;
115 close(fd);
/deb_dpdk/examples/ip_pipeline/
H A Dcpu_core_map.c262 FILE *fd; local
264 fd = fopen(FILE_LINUX_CPU_N_LCORES, "r");
265 if (fd == NULL)
268 if (fgets(buffer, sizeof(buffer), fd) == NULL) {
269 fclose(fd);
273 fclose(fd);
289 FILE *fd; local
293 fd = fopen(buffer, "r");
294 if (fd == NULL)
297 if (fgets(buffer, sizeof(buffer), fd)
315 FILE *fd; local
[all...]
/deb_dpdk/lib/librte_eal/common/
H A Deal_common_pci_uio.c56 int fd, i, j; local
71 fd = open(uio_res->maps[i].path, O_RDWR);
72 if (fd < 0) {
79 fd, (off_t)uio_res->maps[i].offset,
81 /* fd is not needed in slave process, close it */
82 close(fd);
118 dev->intr_handle.fd = -1;
223 /* close fd if in primary process */
224 close(dev->intr_handle.fd);
230 dev->intr_handle.fd
[all...]
/deb_dpdk/examples/l2fwd-keepalive/ka-agent/
H A Dmain.c56 int fd = shm_open(RTE_KEEPALIVE_SHM_NAME, O_RDWR, 0666); local
60 if (fd < 0)
66 0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
67 close(fd);
/deb_dpdk/tools/
H A Dcpu_layout.py41 fd=open("/proc/cpuinfo") variable
42 lines = fd.readlines()
43 fd.close()
/deb_dpdk/drivers/net/virtio/virtio_user/
H A Dvhost_user.c46 vhost_user_write(int fd, void *buf, int len, int *fds, int fd_num) argument
73 r = sendmsg(fd, &msgh, 0);
80 vhost_user_read(int fd, struct vhost_user_msg *msg) argument
85 ret = recv(fd, (void *)msg, sz_hdr, 0);
105 ret = recv(fd, (void *)((char *)msg + sz_hdr), sz_payload, 0);
341 if (file->fd > 0)
342 fds[fd_num++] = file->fd;
407 * - (>=0) if successful, and it is the fd to vhostfd.
412 int fd; local
416 fd
[all...]

Completed in 23 milliseconds

123