Hi Jason,
On 1/9/2017 12:39 PM, Jason Wang wrote:
+ if (!enable) {
+ if (dev->tapfds[pair_idx]) {
+ close(dev->tapfds[pair_idx]);
+ dev->tapfds[pair_idx] = -1;
+ }
+ return vhost_kernel_set_backend(vhostfd, -1);
If this is used to for thing like ethtool -L in guest, we should use
TUNSETQUEUE here.
To make it clear, why we need to ioctl(..., TUNSETQUEUE, ...) here.
According to Linux/Documentation/networking/tuntap.txt,
"A new ioctl(TUNSETQUEUE) were introduced to enable or disable a
queue. When
calling it with IFF_DETACH_QUEUE flag, the queue were disabled. And
when
calling it with IFF_ATTACH_QUEUE flag, the queue were enabled. The
queue were
enabled by default after it was created through TUNSETIFF."
As it's enabled by default, do you still see the necessity to call it
explicitly?
Thanks,
Jianfeng