[PATCH v3 00/12] net: refactoring and fixes

Vladimir Sementsov-Ogievskiy posted 12 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260218202829.1322088-1-vsementsov@yandex-team.ru
Maintainers: Ilya Maximets <i.maximets@ovn.org>, Jason Wang <jasowang@redhat.com>
There is a newer version of this series
net/af-xdp.c |  44 ++-----
net/tap.c    | 319 +++++++++++++++++++++------------------------------
net/util.c   |  50 ++++++++
net/util.h   |  14 +++
4 files changed, 201 insertions(+), 226 deletions(-)
[PATCH v3 00/12] net: refactoring and fixes
Posted by Vladimir Sementsov-Ogievskiy 1 month ago
Hi all!

Here are some refactoring and fixes, mostly in net/tap.c I'm making on
my way to implementing TAP fd migration (through UNIX domain socket).

v3:

01: fix checking, switch to int type for queues
08: drop MAX_TAP_QUEUES constant
09,10: prefer int type for queues


Vladimir Sementsov-Ogievskiy (12):
  net/af-xdp: fix type overflow
  net/tap: net_init_tap_one(): add return value
  net/tap: net_init_tap(): drop extra vhostfdname variable
  net/tap: net_init_tap(): refactor parameter checking
  net/tap: net_init_tap(): common fail label
  net/tap: net_init_tap_one() refactor to get vhostfd param
  net/tap: net_init_tap_one(): drop model parameter
  net: introduce net_parse_fds()
  net/tap: move fds parameters handling to separate functions
  net/tap: fix vhostfds/vhostfd parameters API
  net/tap: net_init_tap(): merge fd=, fds= and helper= cases into one
  net/tap: net_init_tap(): relax QEMU hubs check

 net/af-xdp.c |  44 ++-----
 net/tap.c    | 319 +++++++++++++++++++++------------------------------
 net/util.c   |  50 ++++++++
 net/util.h   |  14 +++
 4 files changed, 201 insertions(+), 226 deletions(-)

-- 
2.52.0
Re: [PATCH v3 00/12] net: refactoring and fixes
Posted by Jason Wang 2 weeks, 1 day ago
On Thu, Feb 19, 2026 at 4:28 AM Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> Hi all!
>
> Here are some refactoring and fixes, mostly in net/tap.c I'm making on
> my way to implementing TAP fd migration (through UNIX domain socket).
>
> v3:
>
> 01: fix checking, switch to int type for queues
> 08: drop MAX_TAP_QUEUES constant
> 09,10: prefer int type for queues
>
>
> Vladimir Sementsov-Ogievskiy (12):
>   net/af-xdp: fix type overflow
>   net/tap: net_init_tap_one(): add return value
>   net/tap: net_init_tap(): drop extra vhostfdname variable
>   net/tap: net_init_tap(): refactor parameter checking
>   net/tap: net_init_tap(): common fail label
>   net/tap: net_init_tap_one() refactor to get vhostfd param
>   net/tap: net_init_tap_one(): drop model parameter
>   net: introduce net_parse_fds()
>   net/tap: move fds parameters handling to separate functions
>   net/tap: fix vhostfds/vhostfd parameters API
>   net/tap: net_init_tap(): merge fd=, fds= and helper= cases into one
>   net/tap: net_init_tap(): relax QEMU hubs check
>
>  net/af-xdp.c |  44 ++-----
>  net/tap.c    | 319 +++++++++++++++++++++------------------------------
>  net/util.c   |  50 ++++++++
>  net/util.h   |  14 +++
>  4 files changed, 201 insertions(+), 226 deletions(-)
>
> --
> 2.52.0
>

If I understand this correctly, there would be a v4 for this?

(https://patchew.org/QEMU/20260218202829.1322088-1-vsementsov@yandex-team.ru/20260218202829.1322088-10-vsementsov@yandex-team.ru/)

Thanks
Re: [PATCH v3 00/12] net: refactoring and fixes
Posted by Vladimir Sementsov-Ogievskiy 2 weeks ago
On 12.03.26 05:59, Jason Wang wrote:
> On Thu, Feb 19, 2026 at 4:28 AM Vladimir Sementsov-Ogievskiy
> <vsementsov@yandex-team.ru> wrote:
>>
>> Hi all!
>>
>> Here are some refactoring and fixes, mostly in net/tap.c I'm making on
>> my way to implementing TAP fd migration (through UNIX domain socket).
>>
>> v3:
>>
>> 01: fix checking, switch to int type for queues
>> 08: drop MAX_TAP_QUEUES constant
>> 09,10: prefer int type for queues
>>
>>
>> Vladimir Sementsov-Ogievskiy (12):
>>    net/af-xdp: fix type overflow
>>    net/tap: net_init_tap_one(): add return value
>>    net/tap: net_init_tap(): drop extra vhostfdname variable
>>    net/tap: net_init_tap(): refactor parameter checking
>>    net/tap: net_init_tap(): common fail label
>>    net/tap: net_init_tap_one() refactor to get vhostfd param
>>    net/tap: net_init_tap_one(): drop model parameter
>>    net: introduce net_parse_fds()
>>    net/tap: move fds parameters handling to separate functions
>>    net/tap: fix vhostfds/vhostfd parameters API
>>    net/tap: net_init_tap(): merge fd=, fds= and helper= cases into one
>>    net/tap: net_init_tap(): relax QEMU hubs check
>>
>>   net/af-xdp.c |  44 ++-----
>>   net/tap.c    | 319 +++++++++++++++++++++------------------------------
>>   net/util.c   |  50 ++++++++
>>   net/util.h   |  14 +++
>>   4 files changed, 201 insertions(+), 226 deletions(-)
>>
>> --
>> 2.52.0
>>
> 
> If I understand this correctly, there would be a v4 for this?
> 
> (https://patchew.org/QEMU/20260218202829.1322088-1-vsementsov@yandex-team.ru/20260218202829.1322088-10-vsementsov@yandex-team.ru/)
> 
> Thanks
> 

No, 09/12 kept as is, I just added 13/12 for the check that Ben asked for. I don't think it should be merged somewhere,
as it was preexisting (we did not check for queues==0, and for fds="").

So, no changes is planned now for making a v4.

-- 
Best regards,
Vladimir

Re: [PATCH v3 00/12] net: refactoring and fixes
Posted by Vladimir Sementsov-Ogievskiy 1 week, 2 days ago
On 12.03.26 09:37, Vladimir Sementsov-Ogievskiy wrote:
> On 12.03.26 05:59, Jason Wang wrote:
>> On Thu, Feb 19, 2026 at 4:28 AM Vladimir Sementsov-Ogievskiy
>> <vsementsov@yandex-team.ru> wrote:
>>>
>>> Hi all!
>>>
>>> Here are some refactoring and fixes, mostly in net/tap.c I'm making on
>>> my way to implementing TAP fd migration (through UNIX domain socket).
>>>
>>> v3:
>>>
>>> 01: fix checking, switch to int type for queues
>>> 08: drop MAX_TAP_QUEUES constant
>>> 09,10: prefer int type for queues
>>>
>>>
>>> Vladimir Sementsov-Ogievskiy (12):
>>>    net/af-xdp: fix type overflow
>>>    net/tap: net_init_tap_one(): add return value
>>>    net/tap: net_init_tap(): drop extra vhostfdname variable
>>>    net/tap: net_init_tap(): refactor parameter checking
>>>    net/tap: net_init_tap(): common fail label
>>>    net/tap: net_init_tap_one() refactor to get vhostfd param
>>>    net/tap: net_init_tap_one(): drop model parameter
>>>    net: introduce net_parse_fds()
>>>    net/tap: move fds parameters handling to separate functions
>>>    net/tap: fix vhostfds/vhostfd parameters API
>>>    net/tap: net_init_tap(): merge fd=, fds= and helper= cases into one
>>>    net/tap: net_init_tap(): relax QEMU hubs check
>>>
>>>   net/af-xdp.c |  44 ++-----
>>>   net/tap.c    | 319 +++++++++++++++++++++------------------------------
>>>   net/util.c   |  50 ++++++++
>>>   net/util.h   |  14 +++
>>>   4 files changed, 201 insertions(+), 226 deletions(-)
>>>
>>> -- 
>>> 2.52.0
>>>
>>
>> If I understand this correctly, there would be a v4 for this?
>>
>> (https://patchew.org/QEMU/20260218202829.1322088-1-vsementsov@yandex-team.ru/20260218202829.1322088-10-vsementsov@yandex-team.ru/)
>>
>> Thanks
>>
> 
> No, 09/12 kept as is, I just added 13/12 for the check that Ben asked for. I don't think it should be merged somewhere,
> as it was preexisting (we did not check for queues==0, and for fds="").
> 
> So, no changes is planned now for making a v4.
> 

Still no problem to resend, let me know if it's preferable.

-- 
Best regards,
Vladimir

Re: [PATCH v3 00/12] net: refactoring and fixes
Posted by Chaney, Ben 1 month ago
> Here are some refactoring and fixes, mostly in net/tap.c I'm making on
> my way to implementing TAP fd migration (through UNIX domain socket).
>
>
> v3:
>
>
> 01: fix checking, switch to int type for queues
> 08: drop MAX_TAP_QUEUES constant
> 09,10: prefer int type for queues

Reviewed-by: Ben Chaney <bchaney@akamai.com>

Re: [PATCH v3 00/12] net: refactoring and fixes
Posted by Vladimir Sementsov-Ogievskiy 1 month ago
On 19.02.26 20:00, Chaney, Ben wrote:
>> Here are some refactoring and fixes, mostly in net/tap.c I'm making on
>> my way to implementing TAP fd migration (through UNIX domain socket).
>>
>>
>> v3:
>>
>>
>> 01: fix checking, switch to int type for queues
>> 08: drop MAX_TAP_QUEUES constant
>> 09,10: prefer int type for queues
> 
> Reviewed-by: Ben Chaney <bchaney@akamai.com>
> 

Thanks!!

-- 
Best regards,
Vladimir