From nobody Tue Feb 10 13:36:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1614708201; cv=none; d=zohomail.com; s=zohoarc; b=mgBhRueznrir9hys+KpBEMaGsmJUyCZ+fBHWi2JbipmkEkUe5JHxfhToej7HIQYs3APZPN/aw43580EXe0xcP3YUs09lzQ51+eb4y7lhuzM2hUIrsXlLHuNaIn3YcTPl1HQcl/+lqvySP/nQ6J8qmFy44YtT1vYmS++Tw3QJW8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614708201; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tqGbJUwXT9DHQMSmXyvwWHdwuWsscb7aSpvdvrgvkFc=; b=JW9jLSRAe5cQIH9r7Ltu0bW4KHqBxZ0C7OPMFFXjDS03HDclDMqkVxuWACqoEhuap/pgGOjbzRaiqEZiKpOdlt0K0nWBiSjkRKVutv565FITLz7AV/V4JRKBgVOfoa3ddcwFjWhZTCkubgl31S7RwFwFMXtPgrgdpwIHj9vvdKY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1614708201876921.7164085337532; Tue, 2 Mar 2021 10:03:21 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.92541.174512 (Exim 4.92) (envelope-from ) id 1lH9MH-0001K0-PW; Tue, 02 Mar 2021 18:02:57 +0000 Received: by outflank-mailman (output) from mailman id 92541.174512; Tue, 02 Mar 2021 18:02:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lH9MH-0001Jr-LJ; Tue, 02 Mar 2021 18:02:57 +0000 Received: by outflank-mailman (input) for mailman id 92541; Tue, 02 Mar 2021 18:02:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lH9MG-0001Io-Pz for xen-devel@lists.xenproject.org; Tue, 02 Mar 2021 18:02:56 +0000 Received: from forwardcorp1o.mail.yandex.net (unknown [95.108.205.193]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ae8789d2-33fd-4e2d-ac19-49bc1d53e060; Tue, 02 Mar 2021 18:02:55 +0000 (UTC) Received: from myt5-23f0be3aa648.qloud-c.yandex.net (myt5-23f0be3aa648.qloud-c.yandex.net [IPv6:2a02:6b8:c12:3e29:0:640:23f0:be3a]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id 609922E15C8; Tue, 2 Mar 2021 21:02:54 +0300 (MSK) Received: from myt5-70c90f7d6d7d.qloud-c.yandex.net (myt5-70c90f7d6d7d.qloud-c.yandex.net [2a02:6b8:c12:3e2c:0:640:70c9:f7d]) by myt5-23f0be3aa648.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id dc59eICpro-2rxe1tLf; Tue, 02 Mar 2021 21:02:54 +0300 Received: from dynamic-vpn.dhcp.yndx.net (dynamic-vpn.dhcp.yndx.net [2a02:6b8:b080:8002::1:1a]) by myt5-70c90f7d6d7d.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id onVeXhLyoo-2qo0XYka; Tue, 02 Mar 2021 21:02:53 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Inumbo-ID: ae8789d2-33fd-4e2d-ac19-49bc1d53e060 Precedence: bulk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1614708174; bh=tqGbJUwXT9DHQMSmXyvwWHdwuWsscb7aSpvdvrgvkFc=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=tJHNcdp7lAAUX0AacvMrTOVv7Bgbf+8vbCMnjT8jKSjl/FsqnvxfC90R3EpWsEEWq FpuT/Lqk+XeM124B5pkdQI4+T6vtiZYabyl9MDlinCyGQafAiIyCFo1f5/GQzGmmU+ EDOwjOtbN+UwIs3FGjz2N5ldAYI+QZSc2KtzOlqQ= Authentication-Results: myt5-23f0be3aa648.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Alexey Kirillov To: Jason Wang , Markus Armbruster , Thomas Huth , Eric Blake Cc: Laurent Vivier , Samuel Thibault , "Michael S. Tsirkin" , Michael Roth , Paolo Bonzini , Luigi Rizzo , Giuseppe Lettieri , Vincenzo Maffione , Stefan Weil , Stefano Stabellini , Anthony Perard , Paul Durrant , xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, yc-core@yandex-team.ru Subject: [PATCH v6 5/5] net: Do not fill legacy info_str for backends Date: Tue, 2 Mar 2021 21:02:05 +0300 Message-Id: <20210302180205.5009-6-lekiravi@yandex-team.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302180205.5009-1-lekiravi@yandex-team.ru> References: <20210302180205.5009-1-lekiravi@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @yandex-team.ru) Content-Type: text/plain; charset="utf-8" As we use QAPI NetClientState->stored_config to store and get information about backend network devices, we can drop fill of legacy field info_str for them. We still use info_str field for NIC and hubports, so we can not completely remove it. Signed-off-by: Alexey Kirillov --- net/l2tpv3.c | 2 -- net/slirp.c | 3 --- net/socket.c | 28 ---------------------------- net/tap-win32.c | 2 -- net/tap.c | 9 --------- net/vde.c | 2 -- net/vhost-user.c | 1 - net/vhost-vdpa.c | 1 - 8 files changed, 48 deletions(-) diff --git a/net/l2tpv3.c b/net/l2tpv3.c index 96611cb4af..b7e1d84674 100644 --- a/net/l2tpv3.c +++ b/net/l2tpv3.c @@ -729,8 +729,6 @@ int net_init_l2tpv3(const Netdev *netdev, =20 QAPI_CLONE_MEMBERS(NetdevL2TPv3Options, &nc->stored_config->u.l2tpv3, l2tpv3); - - s->nc.info_str =3D g_strdup_printf("l2tpv3: connected"); return 0; outerr: qemu_del_net_client(nc); diff --git a/net/slirp.c b/net/slirp.c index f8b3636fcc..99b131a3b0 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -669,9 +669,6 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, stored->tftp_server_name =3D g_strdup(tftp_server_name); } =20 - nc->info_str =3D g_strdup_printf("net=3D%s,restrict=3D%s", inet_ntoa(n= et), - 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 98172347d7..c0de10c0c0 100644 --- a/net/socket.c +++ b/net/socket.c @@ -180,8 +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; - g_free(s->nc.info_str); - s->nc.info_str =3D g_new0(char, 1); =20 return; } @@ -401,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; - nc->info_str =3D g_strdup_printf("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; } - - nc->info_str =3D g_strdup_printf("socket: fd=3D%d %s", - fd, SocketAddressType_str(sa_type)); } =20 return s; @@ -445,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 - nc->info_str =3D g_strdup_printf("socket: fd=3D%d", fd); - s =3D DO_UPCAST(NetSocketState, nc, nc); =20 s->fd =3D fd; @@ -528,11 +518,6 @@ static void net_socket_accept(void *opaque) =20 stored->has_fd =3D true; stored->fd =3D g_strdup_printf("%d", fd); - - g_free(s->nc.info_str); - s->nc.info_str =3D g_strdup_printf("socket: connection from %s:%d", - inet_ntoa(saddr.sin_addr), - ntohs(saddr.sin_port)); } =20 static int net_socket_listen_init(NetClientState *peer, @@ -647,10 +632,6 @@ static int net_socket_connect_init(NetClientState *pee= r, stored->has_connect =3D true; stored->connect =3D g_strdup(host_str); =20 - g_free(s->nc.info_str); - s->nc.info_str =3D g_strdup_printf("socket: connect to %s:%d", - inet_ntoa(saddr.sin_addr), - ntohs(saddr.sin_port)); return 0; } =20 @@ -707,12 +688,7 @@ static int net_socket_mcast_init(NetClientState *peer, stored->localaddr =3D g_strdup(localaddr_str); } =20 - g_free(s->nc.info_str); - s->nc.info_str =3D g_strdup_printf("socket: mcast=3D%s:%d", - inet_ntoa(saddr.sin_addr), - ntohs(saddr.sin_port)); return 0; - } =20 static int net_socket_udp_init(NetClientState *peer, @@ -773,10 +749,6 @@ static int net_socket_udp_init(NetClientState *peer, stored->has_udp =3D true; stored->udp =3D g_strdup(rhost); =20 - g_free(s->nc.info_str); - s->nc.info_str =3D g_strdup_printf("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 0888db8cce..21e451107b 100644 --- a/net/tap-win32.c +++ b/net/tap-win32.c @@ -787,8 +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 - s->nc.info_str =3D g_strdup_printf("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 f864f434b2..12a08d54fe 100644 --- a/net/tap.c +++ b/net/tap.c @@ -625,8 +625,6 @@ int net_init_bridge(const Netdev *netdev, const char *n= ame, stored->helper =3D g_strdup(helper); } =20 - s->nc.info_str =3D g_strdup_printf("helper=3D%s,br=3D%s", helper, br); - return 0; } =20 @@ -712,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); } - - s->nc.info_str =3D g_strdup_printf("fd=3D%d", fd); } else if (tap->has_helper) { if (!stored->has_helper) { stored->has_helper =3D true; @@ -725,8 +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); } - - s->nc.info_str =3D g_strdup_printf("helper=3D%s", tap->helper); } else { if (ifname && !stored->has_ifname) { stored->has_ifname =3D true; @@ -743,9 +737,6 @@ static void net_init_tap_one(const NetdevTapOptions *ta= p, NetClientState *peer, stored->downscript =3D g_strdup(downscript); } =20 - s->nc.info_str =3D g_strdup_printf("ifname=3D%s,script=3D%s,downsc= ript=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 67de6eb0c5..64bdb937ca 100644 --- a/net/vde.c +++ b/net/vde.c @@ -100,8 +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 - nc->info_str =3D g_strdup_printf("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 49c9a740c2..e443c4b2b5 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -327,7 +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); - nc->info_str =3D g_strdup_printf("vhost-user%d to %s", i, chr->lab= el); nc->queue_index =3D i; if (!nc0) { nc0 =3D nc; diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 423d71770d..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 - nc->info_str =3D g_strdup_printf(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