From nobody Tue Feb 10 20:57:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1604880340; cv=none; d=zohomail.com; s=zohoarc; b=e6MVdaA1ajDVso9C2X+M7XSsrwMg/ErdflFdYmVQIN863//Eqz4+z8Q9gzapln0b0gV5LYz4jZ+mu+hTULB7QQN79znXX+mFin69fXq3S1J5k4X3TdZzqWkMro69KAKh/lkiDMqrNLXIjxOxqQUtrD5164DDDnea4hvpUiOpQhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604880340; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4UT9zLwR/HbyGJkWxMzsQ6xPZvU8eI6Qk1oOhho2jsQ=; b=jO+XNSxl4l5O1/NWv34soBWeu+Av9fUTbdXhb3ZW8d/HDysAbGOGto5ad5F2G2+lgHXn5r7gEFT4WfCTm/SD6iHCTSWFloxFIS0A36A1W+jFQ1qHcxyySyC6NlgqceaWDYteiBZdgQc+DqKQin/D2Rd7kCAG8SIT3JsaPryZSjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604880340081160.47670659927724; Sun, 8 Nov 2020 16:05:40 -0800 (PST) Received: from localhost ([::1]:33032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbugk-00007L-W0 for importer@patchew.org; Sun, 08 Nov 2020 19:05:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbucE-0003nw-NO for qemu-devel@nongnu.org; Sun, 08 Nov 2020 19:00:58 -0500 Received: from forwardcorp1p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b6:217]:54444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbucC-0003xn-Cy for qemu-devel@nongnu.org; Sun, 08 Nov 2020 19:00:58 -0500 Received: from sas1-ec30c78b6c5b.qloud-c.yandex.net (sas1-ec30c78b6c5b.qloud-c.yandex.net [IPv6:2a02:6b8:c14:2704:0:640:ec30:c78b]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id F1EED2E14A4; Mon, 9 Nov 2020 03:00:54 +0300 (MSK) Received: from sas2-c156b1cb922a.qloud-c.yandex.net (sas2-c156b1cb922a.qloud-c.yandex.net [2a02:6b8:c08:b78e:0:640:c156:b1cb]) by sas1-ec30c78b6c5b.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id PaDJTaGbEL-0pweK6v4; Mon, 09 Nov 2020 03:00:54 +0300 Received: from dynamic-vpn.dhcp.yndx.net (dynamic-vpn.dhcp.yndx.net [2a02:6b8:b081:425::1:0]) by sas2-c156b1cb922a.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id AEjcvNO5zB-05nCNlmg; Mon, 09 Nov 2020 03:00:51 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Precedence: bulk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1604880054; bh=4UT9zLwR/HbyGJkWxMzsQ6xPZvU8eI6Qk1oOhho2jsQ=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=aDDXHfcdr1oyKmiIbGcfanR3c0rTx6s9cDeM6P4xhVjJQfhfyr2o79x6fZsOc/cjF 72uKG6uMwJXxIjLADNhfbPwA99ENqzpPC2//FNARc/C1E19sCSLVQUBfDLegN8xGD/ 7XgEKAxY3ZfGVCciPNVvB3uj5Y7Y2tuqbAoyr7X8= Authentication-Results: sas1-ec30c78b6c5b.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Alexey Kirillov To: Jason Wang , Eric Blake , Markus Armbruster , Thomas Huth Subject: [PATCH v5 4/4] net: Do not use legacy info_str for backends Date: Mon, 9 Nov 2020 02:59:52 +0300 Message-Id: <20201108235952.107961-5-lekiravi@yandex-team.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201108235952.107961-1-lekiravi@yandex-team.ru> References: <20201108235952.107961-1-lekiravi@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:0:1472:2741:0:8b6:217; envelope-from=lekiravi@yandex-team.ru; helo=forwardcorp1p.mail.yandex.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/08 19:00:34 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , "Michael S. Tsirkin" , Stefan Weil , qemu-devel@nongnu.org, Vincenzo Maffione , yc-core@yandex-team.ru, Paolo Bonzini , Samuel Thibault , Giuseppe Lettieri , Luigi Rizzo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" As we use QMP query-netdev to store and get information about backend network devices, we can drop usage legacy field info_str for them. We still use this field for NIC and hubports, so we can not completely remove it. Signed-off-by: Alexey Kirillov --- net/l2tpv3.c | 2 -- net/slirp.c | 4 ---- net/socket.c | 22 ---------------------- net/tap-win32.c | 3 --- net/tap.c | 12 ------------ net/vde.c | 3 --- net/vhost-user.c | 2 -- net/vhost-vdpa.c | 1 - 8 files changed, 49 deletions(-) diff --git a/net/l2tpv3.c b/net/l2tpv3.c index 881fc6f7c1..7f2a590155 100644 --- a/net/l2tpv3.c +++ b/net/l2tpv3.c @@ -745,8 +745,6 @@ int net_init_l2tpv3(const Netdev *netdev, stored->dstport =3D g_strdup(l2tpv3->dstport); } =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "l2tpv3: connected"); return 0; outerr: qemu_del_net_client(nc); diff --git a/net/slirp.c b/net/slirp.c index 65d3f2639c..14fa64227d 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -670,10 +670,6 @@ static int net_slirp_init(NetClientState *peer, const = char *model, stored->tftp_server_name =3D g_strdup(tftp_server_name); } =20 - snprintf(nc->info_str, sizeof(nc->info_str), - "net=3D%s,restrict=3D%s", inet_ntoa(net), - restricted ? "on" : "off"); - s =3D DO_UPCAST(SlirpState, nc, nc); =20 s->slirp =3D slirp_init(restricted, ipv4, net, mask, host, diff --git a/net/socket.c b/net/socket.c index 1614523b82..93b5163f0e 100644 --- a/net/socket.c +++ b/net/socket.c @@ -180,7 +180,6 @@ static void net_socket_send(void *opaque) s->fd =3D -1; net_socket_rs_init(&s->rs, net_socket_rs_finalize, false); s->nc.link_down =3D true; - memset(s->nc.info_str, 0, sizeof(s->nc.info_str)); =20 return; } @@ -400,16 +399,10 @@ static NetSocketState *net_socket_fd_init_dgram(NetCl= ientState *peer, stored->mcast =3D g_strdup(mcast); =20 s->dgram_dst =3D saddr; - snprintf(nc->info_str, sizeof(nc->info_str), - "socket: fd=3D%d (cloned mcast=3D%s:%d)", - fd, inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); } else { if (sa_type =3D=3D SOCKET_ADDRESS_TYPE_UNIX) { s->dgram_dst.sin_family =3D AF_UNIX; } - - snprintf(nc->info_str, sizeof(nc->info_str), - "socket: fd=3D%d %s", fd, SocketAddressType_str(sa_type)); } =20 return s; @@ -444,8 +437,6 @@ static NetSocketState *net_socket_fd_init_stream(NetCli= entState *peer, =20 nc =3D qemu_new_net_client(&net_socket_info, peer, model, name); =20 - snprintf(nc->info_str, sizeof(nc->info_str), "socket: fd=3D%d", fd); - s =3D DO_UPCAST(NetSocketState, nc, nc); =20 s->fd =3D fd; @@ -527,10 +518,6 @@ static void net_socket_accept(void *opaque) =20 stored->has_fd =3D true; stored->fd =3D g_strdup_printf("%d", fd); - - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "socket: connection from %s:%d", - inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); } =20 static int net_socket_listen_init(NetClientState *peer, @@ -645,9 +632,6 @@ static int net_socket_connect_init(NetClientState *peer, stored->has_connect =3D true; stored->connect =3D g_strdup(host_str); =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "socket: connect to %s:%d", - inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); return 0; } =20 @@ -704,9 +688,6 @@ static int net_socket_mcast_init(NetClientState *peer, stored->localaddr =3D g_strdup(localaddr_str); } =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "socket: mcast=3D%s:%d", - inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); return 0; =20 } @@ -769,9 +750,6 @@ static int net_socket_udp_init(NetClientState *peer, stored->has_udp =3D true; stored->udp =3D g_strdup(rhost); =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "socket: udp=3D%s:%d", - inet_ntoa(raddr.sin_addr), ntohs(raddr.sin_port)); return 0; } =20 diff --git a/net/tap-win32.c b/net/tap-win32.c index b60933bd1a..21e451107b 100644 --- a/net/tap-win32.c +++ b/net/tap-win32.c @@ -787,9 +787,6 @@ static int tap_win32_init(NetClientState *peer, const c= har *model, stored->has_ifname =3D true; stored->ifname =3D g_strdup(ifname); =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "tap: ifname=3D%s", ifname); - s->handle =3D handle; =20 qemu_add_wait_object(s->handle->tap_semaphore, tap_win32_send, s); diff --git a/net/tap.c b/net/tap.c index 57af49ad51..908cb8e7bd 100644 --- a/net/tap.c +++ b/net/tap.c @@ -625,9 +625,6 @@ int net_init_bridge(const Netdev *netdev, const char *n= ame, stored->helper =3D g_strdup(helper); } =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), "helper=3D%s,br=3D%s"= , helper, - br); - return 0; } =20 @@ -713,8 +710,6 @@ static void net_init_tap_one(const NetdevTapOptions *ta= p, NetClientState *peer, stored->fds =3D g_strdup_printf("%s:%d", stored->fds, fd); g_free(tmp_s); } - - snprintf(s->nc.info_str, sizeof(s->nc.info_str), "fd=3D%d", fd); } else if (tap->has_helper) { if (!stored->has_helper) { stored->has_helper =3D true; @@ -726,9 +721,6 @@ static void net_init_tap_one(const NetdevTapOptions *ta= p, NetClientState *peer, stored->br =3D tap->has_br ? g_strdup(tap->br) : g_strdup(DEFAULT_BRIDGE_INTERFACE); } - - snprintf(s->nc.info_str, sizeof(s->nc.info_str), "helper=3D%s", - tap->helper); } else { if (ifname && !stored->has_ifname) { stored->has_ifname =3D true; @@ -745,10 +737,6 @@ static void net_init_tap_one(const NetdevTapOptions *t= ap, NetClientState *peer, stored->downscript =3D g_strdup(downscript); } =20 - snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "ifname=3D%s,script=3D%s,downscript=3D%s", ifname, script, - downscript); - if (strcmp(downscript, "no") !=3D 0) { snprintf(s->down_script, sizeof(s->down_script), "%s", downscr= ipt); snprintf(s->down_script_arg, sizeof(s->down_script_arg), diff --git a/net/vde.c b/net/vde.c index 041eadbcf9..bda8444d1a 100644 --- a/net/vde.c +++ b/net/vde.c @@ -100,9 +100,6 @@ static int net_vde_init(NetClientState *peer, const cha= r *model, =20 nc =3D qemu_new_net_client(&net_vde_info, peer, model, name); =20 - snprintf(nc->info_str, sizeof(nc->info_str), "sock=3D%s,fd=3D%d", - sock, vde_datafd(vde)); - s =3D DO_UPCAST(VDEState, nc, nc); =20 s->vde =3D vde; diff --git a/net/vhost-user.c b/net/vhost-user.c index 5b7056be25..e443c4b2b5 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -327,8 +327,6 @@ static int net_vhost_user_init(NetClientState *peer, co= nst char *device, user =3D g_new0(struct VhostUserState, 1); for (i =3D 0; i < queues; i++) { nc =3D qemu_new_net_client(&net_vhost_user_info, peer, device, nam= e); - snprintf(nc->info_str, sizeof(nc->info_str), "vhost-user%d to %s", - i, chr->label); nc->queue_index =3D i; if (!nc0) { nc0 =3D nc; diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 8c27ea0142..5a28bbcd7b 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -200,7 +200,6 @@ static int net_vhost_vdpa_init(NetClientState *peer, co= nst char *device, stored->has_queues =3D true; stored->queues =3D 1; /* TODO: change when support multiqueue */ =20 - snprintf(nc->info_str, sizeof(nc->info_str), TYPE_VHOST_VDPA); nc->queue_index =3D 0; s =3D DO_UPCAST(VhostVDPAState, nc, nc); vdpa_device_fd =3D qemu_open_old(vhostdev, O_RDWR); --=20 2.25.1