[PATCH v3 09/19] net/tap: drop extra tap_fd_get_ifname() call

Vladimir Sementsov-Ogievskiy posted 19 patches 3 days, 1 hour ago
[PATCH v3 09/19] net/tap: drop extra tap_fd_get_ifname() call
Posted by Vladimir Sementsov-Ogievskiy 3 days, 1 hour ago
tap_open() cares to update ifname, no reason to call extra ioctl.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tested-by: Lei Yang <leiyang@redhat.com>
---
 net/tap.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/net/tap.c b/net/tap.c
index cfa4ccc651..c007cd272a 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -933,14 +933,6 @@ int net_init_tap(const Netdev *netdev, const char *name,
                 return -1;
             }
 
-            if (queues > 1 && i == 0 && !tap->ifname) {
-                if (tap_fd_get_ifname(fd, ifname)) {
-                    error_setg(errp, "Fail to get ifname");
-                    close(fd);
-                    return -1;
-                }
-            }
-
             ret = net_init_tap_one(tap, peer, "tap", name, ifname,
                                    i >= 1 ? "no" : script,
                                    i >= 1 ? "no" : downscript,
-- 
2.48.1