Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-25 Thread Markus Armbruster
Yuri Benditovich writes: > On Tue, Nov 24, 2020 at 5:46 PM Markus Armbruster wrote: [...] >> The CLI accumulates -netdev in option group "netdev". It has to, or >> else -writeconfig doesn't work. >> >> Before commit 08712fcb85 "net: Track netdevs in NetClientState rather >> than QemuOpt", netde

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-25 Thread Yuri Benditovich
On Tue, Nov 24, 2020 at 5:46 PM Markus Armbruster wrote: > Yuri Benditovich writes: > > > On Tue, Nov 24, 2020 at 3:36 PM Markus Armbruster > wrote: > > > >> Markus Armbruster writes: > >> > >> > Yuri Benditovich writes: > >> > > >> >> Please confirm that this patch is intended to solve only

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Yuri Benditovich writes: > On Tue, Nov 24, 2020 at 3:36 PM Markus Armbruster wrote: > >> Markus Armbruster writes: >> >> > Yuri Benditovich writes: >> > >> >> Please confirm that this patch is intended to solve only the problem >> with >> >> hmp (and disallow duplicated ids) >> > >> > The inte

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Eric Blake writes: > On 11/24/20 7:36 AM, Markus Armbruster wrote: >> Markus Armbruster writes: >> >>> Yuri Benditovich writes: >>> Please confirm that this patch is intended to solve only the problem with hmp (and disallow duplicated ids) >>> >>> The intent is to reject duplicate ID

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Eric Blake
On 11/24/20 7:36 AM, Markus Armbruster wrote: > Markus Armbruster writes: > >> Yuri Benditovich writes: >> >>> Please confirm that this patch is intended to solve only the problem with >>> hmp (and disallow duplicated ids) >> >> The intent is to reject duplicate ID and to accept non-duplicate ID

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Yuri Benditovich
On Tue, Nov 24, 2020 at 3:36 PM Markus Armbruster wrote: > Markus Armbruster writes: > > > Yuri Benditovich writes: > > > >> Please confirm that this patch is intended to solve only the problem > with > >> hmp (and disallow duplicated ids) > > > > The intent is to reject duplicate ID and to acc

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Markus Armbruster writes: > Yuri Benditovich writes: > >> Please confirm that this patch is intended to solve only the problem with >> hmp (and disallow duplicated ids) > > The intent is to reject duplicate ID and to accept non-duplicate ID, no > matter how the device is created (CLI, HMP, QMP)

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Yuri Benditovich writes: > Please confirm that this patch is intended to solve only the problem with > hmp (and disallow duplicated ids) The intent is to reject duplicate ID and to accept non-duplicate ID, no matter how the device is created (CLI, HMP, QMP) or a prior instance was deleted (HMP,

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Yuri Benditovich
Please confirm that this patch is intended to solve only the problem with hmp (and disallow duplicated ids) With it the netdev that was added from qemu's command line and was deleted (for example by hmp) still can't be created, correct? On Tue, Nov 24, 2020 at 12:21 PM Markus Armbruster wrote: >

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Markus Armbruster writes: > This means commit 08712fcb85 "net: Track netdevs in NetClientState > rather than QemuOpt" didn't actually replace QemuOpts completely. > > This affects QMP: > > $ socat "READLINE,history=$HOME/.qmp_history,prompt=QMP>" > UNIX-CONNECT:$HOME/work/images/test-qmp >

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-24 Thread Markus Armbruster
Yuri Benditovich writes: > On Mon, Nov 23, 2020 at 11:25 AM Markus Armbruster > wrote: > >> Andrew Melnichenko writes: >> >> > --f73b2205b4aef0c5 >> > Content-Type: text/plain; charset="UTF-8" >> > >> > Hi, the bug can be reproduced like that: >> > >> >> QEMU 5.1.50 monitor - type '

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-23 Thread Yuri Benditovich
The patch below solves both issues: with netdev created by hmp and with netdev created from command-line: diff --git a/net/net.c b/net/net.c index bcd5da4aa0..98294f24ed 100644 --- a/net/net.c +++ b/net/net.c @@ -1155,6 +1155,11 @@ void qmp_netdev_del(const char *id, Error **errp) } qem

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-23 Thread Yuri Benditovich
On Mon, Nov 23, 2020 at 11:25 AM Markus Armbruster wrote: > Andrew Melnichenko writes: > > > --f73b2205b4aef0c5 > > Content-Type: text/plain; charset="UTF-8" > > > > Hi, the bug can be reproduced like that: > > > >> QEMU 5.1.50 monitor - type 'help' for more information > >> (qemu) n

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-23 Thread Eric Blake
On 11/23/20 3:25 AM, Markus Armbruster wrote: >> Its still actual bug - I've checked it with the >> master(2c6605389c1f76973d92b69b85d40d94b8f1092c). > > I can see this with an even simpler reproducer: > > $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio > QEMU 5.1.92 mon

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-23 Thread Markus Armbruster
Andrew Melnichenko writes: > --f73b2205b4aef0c5 > Content-Type: text/plain; charset="UTF-8" > > Hi, the bug can be reproduced like that: > >> QEMU 5.1.50 monitor - type 'help' for more information >> (qemu) netdev_add >> type=tap,id=net0,script=/home/and/SRCS/qemu/ifup.sh,downscript=n

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-22 Thread Yuri Benditovich
I'm sorry for the confusion. Andrew's description of steps to reproduce the problem is correct. I've described another problem present in the master but not related to this patch. On Sun, Nov 22, 2020 at 11:45 AM Andrew Melnichenko wrote: > Hi, the bug can be reproduced like that: > >> QEMU 5.1.

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-22 Thread Andrew Melnichenko
Hi, the bug can be reproduced like that: > QEMU 5.1.50 monitor - type 'help' for more information > (qemu) netdev_add > type=tap,id=net0,script=/home/and/SRCS/qemu/ifup.sh,downscript=no > (qemu) info network > hub 0 > \ hub0port1: __org.qemu.net1: index=0,type=user,net=10.0.2.0,restrict=off > \

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-21 Thread Yuri Benditovich
On Sat, Nov 21, 2020 at 5:24 PM Yuri Benditovich < yuri.benditov...@daynix.com> wrote: > > > On Fri, Nov 20, 2020 at 2:58 PM Markus Armbruster > wrote: > >> Andrew Melnichenko writes: >> >> > Ping >> > >> > On Thu, Jul 16, 2020 at 6:26 AM wrote: >> > >> >> From: Andrew Melnychenko >> >> >> >>

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-21 Thread Yuri Benditovich
On Fri, Nov 20, 2020 at 2:58 PM Markus Armbruster wrote: > Andrew Melnichenko writes: > > > Ping > > > > On Thu, Jul 16, 2020 at 6:26 AM wrote: > > > >> From: Andrew Melnychenko > >> > >> There is an issue, that netdev can't be removed if it was added using > hmp. > >> The bug appears after 08

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-20 Thread Markus Armbruster
Andrew Melnichenko writes: > Ping > > On Thu, Jul 16, 2020 at 6:26 AM wrote: > >> From: Andrew Melnychenko >> >> There is an issue, that netdev can't be removed if it was added using hmp. >> The bug appears after 08712fcb851034228b61f75bd922863a984a4f60 commit. >> It happens because of unclear

Re: [PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-11-20 Thread Andrew Melnichenko
Ping On Thu, Jul 16, 2020 at 6:26 AM wrote: > From: Andrew Melnychenko > > There is an issue, that netdev can't be removed if it was added using hmp. > The bug appears after 08712fcb851034228b61f75bd922863a984a4f60 commit. > It happens because of unclear QemuOpts that was created during > hmp_n

[PATCH] hmp: Changed hmp_netdev_add() using qmp_marshal_netdev_add()

2020-07-15 Thread andrew
From: Andrew Melnychenko There is an issue, that netdev can't be removed if it was added using hmp. The bug appears after 08712fcb851034228b61f75bd922863a984a4f60 commit. It happens because of unclear QemuOpts that was created during hmp_netdev_add(), now it uses qmp analog function - qmp_marshal