[PATCH v9 0/9] net/tap: postpone connect

Vladimir Sementsov-Ogievskiy posted 9 patches 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251030171915.726441-1-vsementsov@yandex-team.ru
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Jason Wang <jasowang@redhat.com>
hw/core/qdev-properties-system.c    |  29 ++-
include/hw/qdev-properties-system.h |   2 +
include/net/net.h                   |   6 +
net/net.c                           |  15 ++
net/tap.c                           | 283 +++++++++++++++++++++-------
5 files changed, 264 insertions(+), 71 deletions(-)
[PATCH v9 0/9] net/tap: postpone connect
Posted by Vladimir Sementsov-Ogievskiy 2 weeks ago
Hi all!

That the second part of virtio-net backend transfer feature,
following previous
 "[PATCH v9 0/7] net/tap: simple refactoring".

Here we realize postponing TAP opening to some future
point, when we know, are we going to do backend-transfer
incoming migration (and get open fd from migration stream),
or we should do open().

v9:
most of patches just picked from
 "[PATCH v9 0/7] net/tap: simple refactoring".
but, 01 is new, and 09 is significantly changed:
instead of hacking with .check_peer_type and detecting
virtio-net by name, use the approach like in parallel
series for chardev:
 "[PATCH v4 0/7] chardev: postpone connect":
introduce specific PROPERTY macro, and avoid connecting
in setter of "netdev" property.

Final part of virtio-net backend transfer is coming
soon and will be based on this series.

Based-on: <20251030164023.710048-1-vsementsov@yandex-team.ru>

Vladimir Sementsov-Ogievskiy (9):
  net: introduce backend-connect concept
  net/tap: rework net_tap_init()
  net/tap: split net_tap_fd_init()
  net/tap: rework sndbuf handling
  net/tap: introduce net_tap_setup()
  net/tap: move vhost fd initialization to net_tap_new()
  net/tap: finalize net_tap_set_fd() logic
  net/tap: introduce TAP_IFNAME_SZ
  net/tap: postpone tap setup to net_backend_connect() call

 hw/core/qdev-properties-system.c    |  29 ++-
 include/hw/qdev-properties-system.h |   2 +
 include/net/net.h                   |   6 +
 net/net.c                           |  15 ++
 net/tap.c                           | 283 +++++++++++++++++++++-------
 5 files changed, 264 insertions(+), 71 deletions(-)

-- 
2.48.1
Re: [PATCH v9 0/9] net/tap: postpone connect
Posted by Jason Wang 2 weeks ago
On Fri, Oct 31, 2025 at 1:19 AM Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> Hi all!
>
> That the second part of virtio-net backend transfer feature,
> following previous
>  "[PATCH v9 0/7] net/tap: simple refactoring".
>
> Here we realize postponing TAP opening to some future
> point, when we know, are we going to do backend-transfer
> incoming migration (and get open fd from migration stream),
> or we should do open().
>
> v9:
> most of patches just picked from
>  "[PATCH v9 0/7] net/tap: simple refactoring".
> but, 01 is new, and 09 is significantly changed:
> instead of hacking with .check_peer_type and detecting
> virtio-net by name, use the approach like in parallel
> series for chardev:
>  "[PATCH v4 0/7] chardev: postpone connect":
> introduce specific PROPERTY macro, and avoid connecting
> in setter of "netdev" property.
>
> Final part of virtio-net backend transfer is coming
> soon and will be based on this series.
>
> Based-on: <20251030164023.710048-1-vsementsov@yandex-team.ru>
>
> Vladimir Sementsov-Ogievskiy (9):
>   net: introduce backend-connect concept
>   net/tap: rework net_tap_init()
>   net/tap: split net_tap_fd_init()
>   net/tap: rework sndbuf handling
>   net/tap: introduce net_tap_setup()
>   net/tap: move vhost fd initialization to net_tap_new()
>   net/tap: finalize net_tap_set_fd() logic
>   net/tap: introduce TAP_IFNAME_SZ
>   net/tap: postpone tap setup to net_backend_connect() call
>
>  hw/core/qdev-properties-system.c    |  29 ++-
>  include/hw/qdev-properties-system.h |   2 +
>  include/net/net.h                   |   6 +
>  net/net.c                           |  15 ++
>  net/tap.c                           | 283 +++++++++++++++++++++-------

I will go through this but I'd like to see a test for this feature.

Thanks

>  5 files changed, 264 insertions(+), 71 deletions(-)
>
> --
> 2.48.1
>
Re: [PATCH v9 0/9] net/tap: postpone connect
Posted by Vladimir Sementsov-Ogievskiy 2 weeks ago
On 31.10.25 06:35, Jason Wang wrote:
> On Fri, Oct 31, 2025 at 1:19 AM Vladimir Sementsov-Ogievskiy
> <vsementsov@yandex-team.ru> wrote:
>>
>> Hi all!
>>
>> That the second part of virtio-net backend transfer feature,
>> following previous
>>   "[PATCH v9 0/7] net/tap: simple refactoring".
>>
>> Here we realize postponing TAP opening to some future
>> point, when we know, are we going to do backend-transfer
>> incoming migration (and get open fd from migration stream),
>> or we should do open().
>>
>> v9:
>> most of patches just picked from
>>   "[PATCH v9 0/7] net/tap: simple refactoring".
>> but, 01 is new, and 09 is significantly changed:
>> instead of hacking with .check_peer_type and detecting
>> virtio-net by name, use the approach like in parallel
>> series for chardev:
>>   "[PATCH v4 0/7] chardev: postpone connect":
>> introduce specific PROPERTY macro, and avoid connecting
>> in setter of "netdev" property.
>>
>> Final part of virtio-net backend transfer is coming
>> soon and will be based on this series.
>>
>> Based-on: <20251030164023.710048-1-vsementsov@yandex-team.ru>
>>
>> Vladimir Sementsov-Ogievskiy (9):
>>    net: introduce backend-connect concept
>>    net/tap: rework net_tap_init()
>>    net/tap: split net_tap_fd_init()
>>    net/tap: rework sndbuf handling
>>    net/tap: introduce net_tap_setup()
>>    net/tap: move vhost fd initialization to net_tap_new()
>>    net/tap: finalize net_tap_set_fd() logic
>>    net/tap: introduce TAP_IFNAME_SZ
>>    net/tap: postpone tap setup to net_backend_connect() call
>>
>>   hw/core/qdev-properties-system.c    |  29 ++-
>>   include/hw/qdev-properties-system.h |   2 +
>>   include/net/net.h                   |   6 +
>>   net/net.c                           |  15 ++
>>   net/tap.c                           | 283 +++++++++++++++++++++-------
> 
> I will go through this but I'd like to see a test for this feature.
> 
> Thanks
> 

Thet's a preparation series, feature (and test) comes in
[PATCH v9 0/8] virtio-net: live-TAP local migration



-- 
Best regards,
Vladimir