[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v18 03/14] net/tap: deprecate "no" as special value for script/downscript
- To: Markus Armbruster <armbru@xxxxxxxxxx>
- From: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx>
- Date: Mon, 13 Jul 2026 12:37:54 +0300
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=default header.d=yandex-team.ru header.i="@yandex-team.ru" header.h="From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID"
- Authentication-results: mail-nwsmtp-smtp-corp-main-68.klg.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru
- Cc: jasowang@xxxxxxxxxx, mst@xxxxxxxxxx, peterx@xxxxxxxxxx, farosas@xxxxxxx, raphael.s.norwitz@xxxxxxxxx, bchaney@xxxxxxxxxx, qemu-devel@xxxxxxxxxx, berrange@xxxxxxxxxx, pbonzini@xxxxxxxxxx, yc-core@xxxxxxxxxxxxxx, mark.caveayland@xxxxxxxxxxx, Pierrick Bouvier <pierrick.bouvier@xxxxxxxxxxxxxxxx>, Sergio Lopez <slp@xxxxxxxxxx>, Zhao Liu <zhao1.liu@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, Bernhard Beschow <shentey@xxxxxxxxx>, Alistair Francis <Alistair.Francis@xxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Jason Wang <jasowangio@xxxxxxxxx>, Eric Blake <eblake@xxxxxxxxxx>, "open list:Incompatible changes" <devel@xxxxxxxxxxxxxxxxx>, "open list:X86 Xen CPUs" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "open list:e500" <qemu-ppc@xxxxxxxxxx>, "open list:Microchip PolarFi..." <qemu-riscv@xxxxxxxxxx>
- Delivery-date: Mon, 13 Jul 2026 09:38:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.07.26 10:45, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx> writes:
The interface is ambiguous, as "no" is valid file name. So,
using "no" as a special value to disable script is deprecated.
Use an empty string ("script=" / "downscript=") instead.
In a future version, "no" will be treated as a plain file name, just
like any other non-empty value.
Document the deprecation in docs/about/deprecated.rst, qapi/net.json,
and qemu-options.hx. Update other docs to use empty string instead of
"no". Add a warning.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx>
[...]
diff --git a/net/tap.c b/net/tap.c
index fedd48c48d2..1ec9e5ebe6f 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -103,6 +103,8 @@ static bool tap_is_explicit_no_script(const char
*script_arg)
}
if (strcmp(script_arg, "no") == 0) {
+ warn_report("script=no/downscript=no is deprecated; "
+ "use script=/downscript= instead");
net_init_tap() could pass the parameter name for a simpler error
message. Probably not worth the bother.
return true;
}
In net_init_tap_one():
qemu_set_info_str(&s->nc, "ifname=%s,script=%s,downscript=%s",
ifname,
script ?: "no", downscript ?: "no");
This sets nc->info_str, which is shown by "info network". Should we
replace "no" by ""?
Agree, will do.
--
Best regards,
Vladimir
|