Lines Matching refs:tapfd
157 int tapfd; in tap_support_features() local
160 tapfd = open(PATH_NET_TUN, O_RDWR); in tap_support_features()
161 if (tapfd < 0) { in tap_support_features()
167 if (ioctl(tapfd, TUNGETFEATURES, &tap_features) == -1) { in tap_support_features()
169 close(tapfd); in tap_support_features()
173 close(tapfd); in tap_support_features()
299 vhost_kernel_set_backend(int vhostfd, int tapfd) in vhost_kernel_set_backend() argument
303 f.fd = tapfd; in vhost_kernel_set_backend()
328 int tapfd; in vhost_kernel_enable_queue_pair() local
337 tapfd = dev->tapfds[pair_idx]; in vhost_kernel_enable_queue_pair()
342 if (req_mq && vhost_kernel_tap_set_queue(tapfd, false) < 0) { in vhost_kernel_enable_queue_pair()
351 tapfd = dev->tapfds[pair_idx]; in vhost_kernel_enable_queue_pair()
352 if (vhost_kernel_tap_set_offload(tapfd, dev->features) == -1) in vhost_kernel_enable_queue_pair()
354 if (req_mq && vhost_kernel_tap_set_queue(tapfd, true) < 0) { in vhost_kernel_enable_queue_pair()
367 tapfd = vhost_kernel_open_tap(&dev->ifname, hdr_size, req_mq, in vhost_kernel_enable_queue_pair()
369 if (tapfd < 0) { in vhost_kernel_enable_queue_pair()
374 dev->tapfds[pair_idx] = tapfd; in vhost_kernel_enable_queue_pair()
377 if (vhost_kernel_set_backend(vhostfd, tapfd) < 0) { in vhost_kernel_enable_queue_pair()