Re: [PATCH v7 0/5] Introducing QMP query-netdev command

2021-03-12 Thread Alexey Kirillov
ping Patchew page: https://patchew.org/QEMU/20210303095910.78277-1-lekir...@yandex-team.ru 03.03.2021, 13:01, "Alexey Kirillov" : > This patch series introduces a new QMP command "query-netdev" to get > information about currently attached backend network devices

[PATCH v7 5/5] net: Do not fill legacy info_str for backends

2021-03-03 Thread Alexey Kirillov
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/l2tpv

[PATCH v7 4/5] hmp: Use QAPI NetdevInfo in hmp_info_network

2021-03-03 Thread Alexey Kirillov
d hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov --- include/qapi/hmp-output-visitor.h | 30 + net/net.c | 31 - qapi/hmp-output-visitor.c | 193 ++ qapi/meson.build | 1 + 4 fil

[PATCH v7 3/5] net: Move NetClientState.info_str to dynamic allocations

2021-03-03 Thread Alexey Kirillov
painlessly discard usage of this field for backend devices. Signed-off-by: Alexey Kirillov --- hw/net/xen_nic.c | 5 ++--- include/net/net.h | 2 +- net/l2tpv3.c | 3 +-- net/net.c | 14 -- net/slirp.c | 5 ++--- net/socket.c

[PATCH v7 1/5] qapi: net: Add query-netdev command

2021-03-03 Thread Alexey Kirillov
le through the NetClientState->stored_config. Signed-off-by: Alexey Kirillov Acked-by: Markus Armbruster --- include/net/net.h | 3 ++ net/l2tpv3.c | 7 +++ net/net.c | 30 +++- net/netmap.c | 7 +++ net/slirp.c | 122 ++

[PATCH v7 0/5] Introducing QMP query-netdev command

2021-03-03 Thread Alexey Kirillov
gt;v6: - Add QAPI visitor to generate info_str replacement directly from NetdevInfo. - Make info_str dynamically allocated. - Make commit messages more meaningful. v4->v5: - Enable qtest of query-netdevs for AVR and RX archs. - Bump "Since" version in QAPI to 6.0. v3->v4: - Rename &

[PATCH v7 2/5] tests: Add tests for query-netdev command

2021-03-03 Thread Alexey Kirillov
A simply qtest that checks for correct number of netdevs in the response of the query-netdev. Signed-off-by: Alexey Kirillov Acked-by: Thomas Huth --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 120 2 files changed, 123

[PATCH v6 5/5] net: Do not fill legacy info_str for backends

2021-03-02 Thread Alexey Kirillov
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/l2tpv

[PATCH v6 2/5] tests: Add tests for query-netdev command

2021-03-02 Thread Alexey Kirillov
A simply qtest that checks for correct number of netdevs in the response of the query-netdev. Signed-off-by: Alexey Kirillov Acked-by: Thomas Huth --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 120 2 files changed, 123

[PATCH v6 0/5] Introducing QMP query-netdev command

2021-03-02 Thread Alexey Kirillov
Make commit messages more meaningful. v4->v5: - Enable qtest of query-netdevs for AVR and RX archs. - Bump "Since" version in QAPI to 6.0. v3->v4: - Rename "query-netdevs" to "query-netdev". - Copy netdev drivers to new QAPI enum "NetBackend"

[PATCH v6 1/5] qapi: net: Add query-netdev command

2021-03-02 Thread Alexey Kirillov
le through the NetClientState->stored_config. Signed-off-by: Alexey Kirillov Acked-by: Markus Armbruster --- include/net/net.h | 3 ++ net/l2tpv3.c | 7 +++ net/net.c | 32 +++- net/netmap.c | 7 +++ net/slirp.c | 124 ++

[PATCH v6 4/5] hmp: Use QAPI NetdevInfo in hmp_info_network

2021-03-02 Thread Alexey Kirillov
d hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov --- include/qapi/hmp-output-visitor.h | 30 + net/net.c | 31 - qapi/hmp-output-visitor.c | 193 ++ qapi/meson.build | 1 + 4 fil

[PATCH v6 3/5] net: Move NetClientState.info_str to dynamic allocations

2021-03-02 Thread Alexey Kirillov
painlessly discard usage of this field for backend devices. Signed-off-by: Alexey Kirillov --- hw/net/xen_nic.c | 5 ++--- include/net/net.h | 2 +- net/l2tpv3.c | 3 +-- net/net.c | 14 -- net/slirp.c | 5 ++--- net/socket.c

Re: [PATCH v5 3/4] hmp: Use QMP query-netdev in hmp_info_network

2020-12-16 Thread Alexey Kirillov
e when the amount of data is small. An output >>  visitor that directly creates the string is more efficient. Takes a bit >>  more code, though. I intend to post one for JSON, to reduce QMP's >>  malloc gluttony. > > Thanks a lot for the answer. > > Alexey, let's try what Markus suggested here. Thanks for information. I will do so and send a new version of the patchset. --  Alexey Kirillov Yandex.Cloud

Re: [PATCH v5 3/4] hmp: Use QMP query-netdev in hmp_info_network

2020-12-14 Thread Alexey Kirillov
Hi! 07.12.2020, 08:52, "Jason Wang" : > On 2020/11/9 上午7:59, Alexey Kirillov wrote: >>  +#ifdef CONFIG_SLIRP >>  + case NET_BACKEND_USER: { >>  + size_t len = strchr(ni->u.user.net, '/') - ni->u.user.net; >>  + char *net = g_strndup(ni->u.user.net

Re: [PATCH v5 0/4] Introducing QMP query-netdev command

2020-12-04 Thread Alexey Kirillov
ping againPatchwork page: http://patchwork.ozlabs.org/project/qemu-devel/list/?series=212983 09.11.2020, 03:02, "Alexey Kirillov" :This patch series introduces a new QMP command "query-netdev" to getinformation about currently attached backend network devices (netdevs).Also,

Re: [PATCH v5 0/4] Introducing QMP query-netdev command

2020-11-23 Thread Alexey Kirillov
ping Patchwork page: http://patchwork.ozlabs.org/project/qemu-devel/list/?series=212983 09.11.2020, 03:02, "Alexey Kirillov" : > This patch series introduces a new QMP command "query-netdev" to get > information about currently attached backend network device

[PATCH v5 3/4] hmp: Use QMP query-netdev in hmp_info_network

2020-11-08 Thread Alexey Kirillov
Replace usage of legacy field info_str of NetClientState for backend network devices with result of QMP command query-netdev. NIC and hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov --- include/net/net.h | 3 +- net/clients.h | 1 + net/hub.c | 4

[PATCH v5 1/4] qapi: net: Add query-netdev command

2020-11-08 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached backend network devices and their configuration. Signed-off-by: Alexey Kirillov Acked-by: Markus Armbruster --- include/net/net.h | 1 + net/l2tpv3.c | 19 +++ net/net.c | 32 net/netmap.c

[PATCH v5 4/4] net: Do not use legacy info_str for backends

2020-11-08 Thread Alexey Kirillov
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

[PATCH v5 2/4] tests: Add tests for query-netdev command

2020-11-08 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov Acked-by: Thomas Huth --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 120 2 files changed, 123 insertions(+) create mode 100644 tests/qtest/test-query-netdev.c diff --git a/tests/qtest/meson.build

[PATCH v5 0/4] Introducing QMP query-netdev command

2020-11-08 Thread Alexey Kirillov
], "ipv6-prefixlen": 64, "id": "netdev0", "restrict": false } ] } v4->v5: - Enable qtest of query-netdevs for AVR and RX archs. - Bump "Since" version in QAPI to 6.0. v3->v4: - Ren

Re: [PATCH v4 0/4] Introducing QMP query-netdev command

2020-10-16 Thread Alexey Kirillov
Ping again, as no progress since september 22. http://patchwork.ozlabs.org/project/qemu-devel/list/?series=203284 21.09.2020, 22:19, "Alexey Kirillov" : > This patch series introduces a new QMP command "query-netdev" to get > information about currently attached backen

Re: [PATCH v4 0/4] Introducing QMP query-netdev command

2020-10-07 Thread Alexey Kirillov
ping http://patchwork.ozlabs.org/project/qemu-devel/list/?series=203284 21.09.2020, 22:19, "Alexey Kirillov" : > This patch series introduces a new QMP command "query-netdev" to get > information about currently attached backend network devices (netdevs). > Als

Re: [PATCH v4 0/4] Introducing QMP query-netdev command

2020-09-28 Thread Alexey Kirillov
Ping 21.09.2020 22:19, Alexey Kirillov writes: > This patch series introduces a new QMP command "query-netdev" to get > information about currently attached backend network devices (netdevs). > Also, since the "info_str" field of "NetClientState"

Re: [PATCH v4 0/4] Introducing QMP query-netdev command

2020-09-28 Thread Alexey Kirillov
Ping 21.09.2020 22:19, Alexey Kirillov writes:> This patch series introduces a new QMP command "query-netdev" to get> information about currently attached backend network devices (netdevs).> Also, since the "info_str" field of "NetClientState" is now depre

[PATCH v4 4/4] net: Do not use legacy info_str for backends

2020-09-21 Thread Alexey Kirillov
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

[PATCH v4 2/4] tests: Add tests for query-netdev command

2020-09-21 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 115 2 files changed, 118 insertions(+) create mode 100644 tests/qtest/test-query-netdev.c diff --git a/tests/qtest/meson.build b/tests/qtest

[PATCH v4 1/4] qapi: net: Add query-netdev command

2020-09-21 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached backend network devices and their configuration. Signed-off-by: Alexey Kirillov --- include/net/net.h | 1 + net/l2tpv3.c | 19 +++ net/net.c | 32 net/netmap.c | 13 + net/slirp.c

[PATCH v4 3/4] hmp: Use QMP query-netdev in hmp_info_network

2020-09-21 Thread Alexey Kirillov
Replace usage of legacy field info_str of NetClientState for backend network devices with result of QMP command query-netdev. NIC and hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov --- include/net/net.h | 3 +- net/clients.h | 1 + net/hub.c | 4

[PATCH v4 0/4] Introducing QMP query-netdev command

2020-09-21 Thread Alexey Kirillov
], "ipv6-prefixlen": 64, "id": "netdev0", "restrict": false } ] } v3->v4: - Rename "query-netdevs" to "query-netdev". - Copy netdev drivers to new QAPI enum "NetBackend&

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-16 Thread Alexey Kirillov
extended enum, and back, where the latter can fail. > > Worthwhile only if we have sufficient use for it. I'm sorry, did I understand correctly that at the moment I don't need any additional changes in the patch yet? If that is, I will continue using NetClientDriver as a discriminator. --  Alexey Kirillov Yandex.Cloud

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-09 Thread Alexey Kirillov
09.09.2020, 14:41, "Markus Armbruster" : > Alexey Kirillov writes: > >>  07.09.2020, 15:40, "Markus Armbruster" : >>>  Alexey Kirillov writes: >>> >>>>   Hi! >>>> >>>>   02.09.2020, 14:23, "Markus Arm

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-08 Thread Alexey Kirillov
07.09.2020, 15:40, "Markus Armbruster" : > Alexey Kirillov writes: > >>  Hi! >> >>  02.09.2020, 14:23, "Markus Armbruster" : >>>  Alexey Kirillov writes: >>> >>>>   Add a qmp command that provides information about

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-08 Thread Alexey Kirillov
08.09.2020, 17:29, "Markus Armbruster" : > Alexey Kirillov writes: > >>  Add a qmp command that provides information about currently attached >>  backend network devices and their configuration. >> >>  Signed-off-by: Alexey Kirillov > > One more: n

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-07 Thread Alexey Kirillov
Hi! 02.09.2020, 14:23, "Markus Armbruster" : > Alexey Kirillov writes: > >>  Add a qmp command that provides information about currently attached >>  backend network devices and their configuration. >> >>  Signed-off-by: Alexey Kirillov > > [...]

[PATCH v3 0/4] Introducing QMP query-netdevs command

2020-09-01 Thread Alexey Kirillov
], "ipv6-prefixlen": 64, "id": "netdev0", "restrict": false } ] } v2->v3: - Remove NIC and hubports from query-netdevs. - Remove several fields from NetdevInfo since they are unne

[PATCH v3 3/4] hmp: Use QMP query-netdevs in hmp_info_network

2020-09-01 Thread Alexey Kirillov
Replace usage of legacy field info_str of NetClientState for backend network devices with result of QMP command query-netdevs. NIC and hubports still use legacy info_str field. Signed-off-by: Alexey Kirillov --- include/net/net.h | 3 +- net/clients.h | 1 + net/hub.c | 4

[PATCH v3 4/4] net: Do not use legacy info_str for backends

2020-09-01 Thread Alexey Kirillov
As we use QMP query-netdevs 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

[PATCH v3 2/4] tests: Add tests for query-netdevs command

2020-09-01 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdevs.c | 117 +++ 2 files changed, 120 insertions(+) create mode 100644 tests/qtest/test-query-netdevs.c diff --git a/tests/qtest/meson.build b/tests/qtest

[PATCH v3 1/4] qapi: net: Add query-netdevs command

2020-09-01 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached backend network devices and their configuration. Signed-off-by: Alexey Kirillov --- include/net/net.h | 1 + net/l2tpv3.c | 19 +++ net/net.c | 32 net/netmap.c | 13 + net/slirp.c

[PATCH 1/1] analyze-migration.py: fix read_migration_debug_json() return type

2020-07-15 Thread Alexey Kirillov
Since we use result of read_migration_debug_json() as JSON formatted string, we must provide proper type. Before Python 3.6 json.loads() method support only str typed input. Signed-off-by: Alexey Kirillov --- scripts/analyze-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/1] configure: fix incorrect have_keyring check

2020-07-13 Thread Alexey Kirillov
In some shells, we can't use == sign (as example, in dash). Signed-off-by: Alexey Kirillov --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 31e2ddbf28..f65914f98f 100755 --- a/configure +++ b/configure @@ -6486,7 +6486,7 @@ EOF fi

Re: [PATCH v2 1/4] qapi: net: Add query-netdevs command

2020-06-23 Thread Alexey Kirillov
`. There is no such trouble to split `query-netdevs` by two, for example, `query-front-netdevs` and `query-back-netdevs`, but in my opinion it'll break consistancy in getting links between netdevs. 05.03.2020, 17:26, "Alexey Kirillov" : > 05.03.2020, 15:03, "Markus Armbruster"

Re: [PATCH v2 1/4] qapi: net: Add query-netdevs command

2020-03-05 Thread Alexey Kirillov
05.03.2020, 15:03, "Markus Armbruster" : > Alexey Kirillov writes: > >>  Add a qmp command that provides information about currently attached >>  network devices and their configuration. > > Closes a gap in QMP; appreciated! > >>  Signed-off-by: Alexe

Re: [PATCH v2 1/4] qapi: net: Add query-netdevs command

2020-03-05 Thread Alexey Kirillov
04.03.2020, 18:57, "Laurent Vivier" : > On 04/03/2020 14:06, Alexey Kirillov wrote: >>  Add a qmp command that provides information about currently attached >>  network devices and their configuration. >> >>  Signed-off-by: Alexey Kirillov >>  ---

[PATCH v2 4/4] net: Remove field info_str of NetClientState

2020-03-04 Thread Alexey Kirillov
Completely remove the info_str field of struct NetClientState because it is no longer required due to the addition of the QMP query-netdevs command. Signed-off-by: Alexey Kirillov --- hw/net/allwinner_emac.c | 2 +- hw/net/dp8393x.c| 2 +- hw/net/e1000.c | 4

[PATCH v2 2/4] tests: Add tests for query-netdevs command

2020-03-04 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov --- tests/qtest/Makefile.include | 2 + tests/qtest/test-query-netdevs.c | 120 +++ 2 files changed, 122 insertions(+) create mode 100644 tests/qtest/test-query-netdevs.c diff --git a/tests/qtest/Makefile.include b/tests/qtest

[PATCH v2 0/4] Introducing QMP query-netdevs command

2020-03-04 Thread Alexey Kirillov
"ipv6-prefix": "fec0::", "net": "10.0.2.0/255.255.255.0", "ipv6-host": "fec0::2", "type": "user", "dns": "10.0.2.3", "hostf

[PATCH v2 1/4] qapi: net: Add query-netdevs command

2020-03-04 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached network devices and their configuration. Signed-off-by: Alexey Kirillov --- include/net/net.h | 1 + net/hub.c | 8 +++ net/l2tpv3.c | 19 +++ net/net.c | 91

[PATCH v2 3/4] hmp: Use QMP query-netdevs in hmp_info_network

2020-03-04 Thread Alexey Kirillov
Replace legacy field info_str of NetClientState with result of QMP command query-netdevs. Signed-off-by: Alexey Kirillov --- include/net/net.h | 3 +- net/clients.h | 1 + net/hub.c | 4 +- net/hub.h | 2 +- net/net.c | 175

Re: [PATCH 0/2] Introducing QMP query-netdevs command

2019-11-13 Thread Alexey Kirillov
That's a good idea, thanks! I'll do this in V2. 14.11.2019, 00:32, "Eric Blake" : > > Can we rewrite the existing HMP command to call into the new QMP command? > -- Alex Kirillov Yandex.Cloud

[PATCH 2/2] tests: Add tests for query-netdevs command

2019-11-13 Thread Alexey Kirillov
Signed-off-by: Alexey Kirillov --- tests/Makefile.include | 2 + tests/test-query-netdevs.c | 114 + 2 files changed, 116 insertions(+) create mode 100644 tests/test-query-netdevs.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

[PATCH 1/2] qapi: net: Add query-netdevs command

2019-11-13 Thread Alexey Kirillov
Add a qmp command that provides information about currently attached network devices and their configuration. Signed-off-by: Alexey Kirillov --- include/net/net.h | 1 + net/hub.c | 8 +++ net/l2tpv3.c | 19 +++ net/net.c | 80 + net

[PATCH 0/2] Introducing QMP query-netdevs command

2019-11-13 Thread Alexey Kirillov
"host": "10.0.2.2", "queues_count": 1, "ipv6-dns": "fec0::3", "ipv6-prefix": "fec0::", "net": "10.0.2.0/255.255.255.0", "ipv6-host": "fec0::2", "type&qu