Re: [PATCH v2 12/20] net/tap: net_init_tap_one(): support bridge

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > Use net_init_tap_one() in net_init_bridge(). Need to explain why this is needed. Patch looks good. Thanks > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > net/tap.c | 28 +++- > 1 file cha

Re: [PATCH] net/hub: make net_hub_port_cleanup idempotent

2025-09-02 Thread Jason Wang
On Thu, Aug 21, 2025 at 10:28 PM Jonah Palmer wrote: > > Makes the net_hub_port_cleanup function idempotent to avoid double > removals by guarding its QLIST_REMOVE with a flag. > > When using a Xen networking device with hubport backends, e.g.: > > -accel kvm,xen-version=0x40011 > -netdev hubport,

Re: [PATCH] net/hub: make net_hub_port_cleanup idempotent

2025-09-02 Thread Jason Wang
On Fri, Aug 22, 2025 at 12:39 AM Jonah Palmer wrote: > > > > On 8/21/25 11:13 AM, David Woodhouse wrote: > > On Thu, 2025-08-21 at 14:26 +, Jonah Palmer wrote: > >> Makes the net_hub_port_cleanup function idempotent to avoid double > >> removals by guarding its QLIST_REMOVE with a flag. > >> >

Re: [PATCH v2 16/20] net/tap: introduce net_tap_fd_init_external()

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > Add helper that covers logic for initializing fds, given from monitor > or helper. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > net/tap.c | 90 ++- > 1 file cha

Re: [PATCH v2 14/20] net/tap: refactor net_tap_init() into net_tap_open_one()

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > net_tap_init() is used in one place. Let's move net_init_tap_one() > call to it and simplify outer loop code. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > net/tap.c | 54 +++---

Re: [PATCH v2 11/20] net/tap: net_init_tap_one(): refactor to use netdev as first arg

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > This is needed for further unification of bridge initialization in > net_init_tap() and net_init_bridge(). > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > net/tap.c | 13 - > 1 file changed, 8 insertions

Re: [PATCH v2 05/20] net/tap: net_init_tap_one(): move parameter checking earlier

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > Let's keep all similar argument checking in net_init_tap() function. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > net/tap.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/net/tap

Re: [PATCH v2 01/20] net/tap: net_init_tap_one(): add return value

2025-09-02 Thread Jason Wang
On Sun, Aug 24, 2025 at 12:03 AM Vladimir Sementsov-Ogievskiy wrote: > > To avoid error propagation, let's follow common recommendation to > use return value together with errp. It would be better to have some words or links to explain why we need to avoid error propagation. > > Probably, it wou

Re: [PATCH v5 00/13] virtio: introduce support for GSO over UDP tunnel

2025-09-02 Thread Jason Wang
On Mon, Sep 1, 2025 at 2:44 PM Paolo Abeni wrote: > > On 9/1/25 4:47 AM, Jason Wang wrote: > > On Thu, Aug 28, 2025 at 9:47 AM Akihiko Odaki > > wrote: > >> > >> On 2025/08/13 19:28, Paolo Abeni wrote: > >>> Some virtualized deploym

Re: [PATCH v2 00/20] TAP initialization refactoring

2025-09-02 Thread Jason Wang
On Mon, Sep 1, 2025 at 10:28 PM Vladimir Sementsov-Ogievskiy wrote: > > Ping!) > > Understand, that it's quite big. I can split into 2-3 series, if this helps. I will have a look this week. The size should be fine so no need to split. Thanks > > On 23.08.25 19:03, Vladimir Sementsov-Ogievskiy w

Re: [PATCH v5 00/13] virtio: introduce support for GSO over UDP tunnel

2025-08-31 Thread Jason Wang
be added, together > > with the related compatiblity entries. > > > > Based-on: > > 9d71108d7de139dd4f4e6efe6837cabb32bf5616.1755078918.git.pab...@redhat.com > > Now everything looks good to me. For the whole series: > > Reviewed-by: Akihiko Odaki > > Regards, > Akihiko Odaki > Acked-by: Jason Wang Thanks

Re: [PATCH 00/19] TAP initialization refactoring

2025-08-19 Thread Jason Wang
On Tue, Aug 19, 2025 at 4:41 PM Vladimir Sementsov-Ogievskiy wrote: > > On 19.08.25 05:45, Jason Wang wrote: > > On Mon, Aug 18, 2025 at 10:06 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Hi all! > >> > >> As preparation for further

Re: [PULL 2/5] net: move backend cleanup to NIC cleanup

2025-08-19 Thread Jason Wang
On Wed, Aug 20, 2025 at 12:13 AM David Woodhouse wrote: > > On Mon, 2025-03-10 at 20:22 +0800, Jason Wang wrote: > > From: Eugenio Pérez > > > > Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net > > structures if peer nic is present") eff

Re: [PATCH v2] e1000e: Prevent crash from legacy interrupt firing after MSI-X enable

2025-08-18 Thread Jason Wang
On Mon, Aug 18, 2025 at 10:03 PM Stefan Hajnoczi wrote: > > On Mon, Aug 18, 2025 at 10:08:18AM +0800, Jason Wang wrote: > > On Thu, Aug 7, 2025 at 7:08 PM Laurent Vivier wrote: > > > > > > A race condition between guest driver actions and QEMU timers can lead >

Re: [PATCH 00/19] TAP initialization refactoring

2025-08-18 Thread Jason Wang
On Mon, Aug 18, 2025 at 10:06 PM Vladimir Sementsov-Ogievskiy wrote: > > Hi all! > > As preparation for further development of TAP live local migration > (passing open fds through unix socket), I'm not sure I understand this, but I think it has been supported now, or anything I miss? Thanks

Re: [PATCH v2] e1000e: Prevent crash from legacy interrupt firing after MSI-X enable

2025-08-17 Thread Jason Wang
crash due to the assertion failure. The patch now defines a safe > outcome by clearing the cause and returning. Since behavior after > the assertion never existed, this simply corrects the crash. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1863 > Suggested-by:

Re: [RFC PATCH v4 07/14] virtio-pci: implement support for extended features

2025-08-12 Thread Jason Wang
On Tue, Aug 12, 2025 at 4:03 PM Akihiko Odaki wrote: > > On 2025/08/12 13:01, Jason Wang wrote: > > On Fri, Aug 8, 2025 at 12:55 PM Akihiko Odaki > > wrote: > >> > >> On 2025/08/08 5:18, Paolo Abeni wrote: > >>> On 7/26/25 1:52 PM, Akihiko Oda

Re: [RFC PATCH v4 07/14] virtio-pci: implement support for extended features

2025-08-11 Thread Jason Wang
On Fri, Aug 8, 2025 at 12:55 PM Akihiko Odaki wrote: > > On 2025/08/08 5:18, Paolo Abeni wrote: > > On 7/26/25 1:52 PM, Akihiko Odaki wrote: > >> On 2025/07/24 4:31, Paolo Abeni wrote: > >>> @@ -1477,6 +1509,13 @@ int virtio_pci_add_shm_cap(VirtIOPCIProxy *proxy, > >>>return virtio_pci_add

Re: [RFC 0/6] virtio-net: initial iterative live migration support

2025-07-28 Thread Jason Wang
On Mon, Jul 28, 2025 at 10:51 PM Eugenio Perez Martin wrote: > > On Mon, Jul 28, 2025 at 9:36 AM Jason Wang wrote: > > > > On Mon, Jul 28, 2025 at 3:09 PM Jason Wang wrote: > > > > > > On Fri, Jul 25, 2025 at 5:33 PM Michael S. Tsirkin > > > wrot

Re: [RFC 0/6] virtio-net: initial iterative live migration support

2025-07-28 Thread Jason Wang
On Mon, Jul 28, 2025 at 3:09 PM Jason Wang wrote: > > On Fri, Jul 25, 2025 at 5:33 PM Michael S. Tsirkin wrote: > > > > On Thu, Jul 24, 2025 at 05:59:20PM -0400, Jonah Palmer wrote: > > > > > > > > > On 7/23/25 1:51 AM, Jason Wang wrote: > &g

Re: [RFC 0/6] virtio-net: initial iterative live migration support

2025-07-28 Thread Jason Wang
On Fri, Jul 25, 2025 at 5:33 PM Michael S. Tsirkin wrote: > > On Thu, Jul 24, 2025 at 05:59:20PM -0400, Jonah Palmer wrote: > > > > > > On 7/23/25 1:51 AM, Jason Wang wrote: > > > On Tue, Jul 22, 2025 at 8:41 PM Jonah Palmer > > > wrote: >

Re: [PATCH RFC v3 07/13] vhost: add support for negotiating extended features

2025-07-22 Thread Jason Wang
On Wed, Jul 23, 2025 at 12:55 AM Paolo Abeni wrote: > > On 7/22/25 5:32 AM, Jason Wang wrote: > > On Fri, Jul 18, 2025 at 4:53 PM Paolo Abeni wrote: > >> > >> Similar to virtio infra, vhost core maintains the features status > >> in the full extended for

Re: [PATCH] virtio: fix off-by-one and invalid access in virtqueue_ordered_fill

2025-07-22 Thread Jason Wang
op and DoS. > > Fixes: b44135daa372 ("virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER > support") > Reported-by: terrynini > Signed-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [RFC 0/6] virtio-net: initial iterative live migration support

2025-07-22 Thread Jason Wang
On Tue, Jul 22, 2025 at 8:41 PM Jonah Palmer wrote: > > This series is an RFC initial implementation of iterative live > migration for virtio-net devices. > > The main motivation behind implementing iterative migration for > virtio-net devices is to start on heavy, time-consuming operations > for

Re: [PATCH RFC v3 06/13] virtio-pci: implement support for extended features

2025-07-22 Thread Jason Wang
On Tue, Jul 22, 2025 at 3:37 PM Paolo Abeni wrote: > > On 7/22/25 5:28 AM, Jason Wang wrote: > > On Fri, Jul 18, 2025 at 4:53 PM Paolo Abeni wrote: > >> > >> Extend the features configuration space to 128 bits, and allow the > >> common read/write oper

Re: [PATCH RFC v3 12/13] net: implement tunnel probing

2025-07-22 Thread Jason Wang
On Tue, Jul 22, 2025 at 3:33 PM Paolo Abeni wrote: > > On 7/22/25 5:50 AM, Jason Wang wrote: > > On Fri, Jul 18, 2025 at 4:54 PM Paolo Abeni wrote: > >> Tap devices support GSO over UDP tunnel offload. Probe for such > >> feature in a similar manner to other of

Re: [PATCH RFC v3 12/13] net: implement tunnel probing

2025-07-21 Thread Jason Wang
On Fri, Jul 18, 2025 at 4:54 PM Paolo Abeni wrote: > > Tap devices support GSO over UDP tunnel offload. Probe for such > feature in a similar manner to other offloads. > > GSO over UDP tunnel needs to be enabled in addition to a "plain" > offload (TSO or USO). > > No need to check separately for t

Re: [PATCH RFC v3 07/13] vhost: add support for negotiating extended features

2025-07-21 Thread Jason Wang
On Fri, Jul 18, 2025 at 4:53 PM Paolo Abeni wrote: > > Similar to virtio infra, vhost core maintains the features status > in the full extended format and allows the devices to implement > extended version of the getter/setter. > > Note that 'protocol_features' are not extended: they are only > us

Re: [PATCH RFC v3 06/13] virtio-pci: implement support for extended features

2025-07-21 Thread Jason Wang
On Fri, Jul 18, 2025 at 4:53 PM Paolo Abeni wrote: > > Extend the features configuration space to 128 bits, and allow the > common read/write operation to access all of it. > > On migration, save the 128 bit version of the features only if the > upper bits are non zero. Relay reset to clear all th

[PULL 01/12] net/tap: drop too small packets

2025-07-20 Thread Jason Wang
f !s->using_vnet_hdr, it doesn't make sense. Tested-by: Lei Yang Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Jason Wang --- net/tap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/tap.c b/net/tap.c index 23536c09b4..2a85936019 100644 --- a/net/tap.c +

[PULL 10/12] net/passt: Check return value of g_remove() in net_passt_cleanup() (CID 1612369)

2025-07-20 Thread Jason Wang
From: Laurent Vivier If g_remove() fails, use warn_report() to log an error. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/passt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/passt.c b/net/passt.c index ef59d0682b

[PULL 07/12] net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375)

2025-07-20 Thread Jason Wang
ent Vivier Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/passt.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/passt.c b/net/passt.c index 6f616ba3c2..9cd5b3e6f2 100644 --- a/net/passt.c +++ b/net/passt.c @@ -397,7 +397,6 @@ err: static void passt_vhost_user_event(vo

[PULL 06/12] hw/net/npcm_gmac.c: Drop 'buf' local variable

2025-07-20 Thread Jason Wang
s in passing a place where we set buf = tx_send_buffer but never used that value because we always updated buf to something else later before using it. Coverity: CID 1534027 Signed-off-by: Peter Maydell Signed-off-by: Jason Wang --- hw/net/npcm_gmac.c | 12 1 file changed, 4 in

[PULL 08/12] net/vhost-user: Remove unused "err" from net_vhost_user_event() (CID 1612372)

2025-07-20 Thread Jason Wang
ent Vivier Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/vhost-user.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index 1c3b8b36f3..cec83e925f 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -329,7 +329,6 @@ static void net_vhost_

[PULL 09/12] net/passt: Remove dead code in passt_vhost_user_start error path (CID 1612371)

2025-07-20 Thread Jason Wang
es the cleanup block dead code, as reported by Coverity (CID 1612371). Refactor the error handling to occur inline, removing the goto and the unreachable cleanup block. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/passt.c | 10 ++ 1 fi

[PULL 11/12] net/passt: Initialize "error" variable in net_passt_send() (CID 1612368)

2025-07-20 Thread Jason Wang
From: Laurent Vivier This was flagged by Coverity as a memory illegal access. Initialize the pointer to NULL at declaration. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/passt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 12/12] net/vhost-user: Remove unused "err" from chr_closed_bh() (CID 1612365)

2025-07-20 Thread Jason Wang
eviewed-by: Peter Maydell Signed-off-by: Jason Wang --- net/vhost-user.c | 4 1 file changed, 4 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index cec83e925f..8b96157145 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -298,7 +298,6 @@ static void chr_closed_bh(vo

[PULL 04/12] hw/net/npcm_gmac.c: Unify length and prev_buf_size variables

2025-07-20 Thread Jason Wang
64K when sending it; this commit preserves that behaviour by using a local variable when doing the packet send. Signed-off-by: Peter Maydell Signed-off-by: Jason Wang --- hw/net/npcm_gmac.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/net/npcm_gmac.c b/hw/net

[PULL 03/12] hw/net/npcm_gmac.c: Send the right data for second packet in a row

2025-07-20 Thread Jason Wang
the beginning of the buffer. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Maydell Signed-off-by: Jason Wang --- hw/net/npcm_gmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c index a434112580..921327dd8c 100644 --- a/hw/net/npcm_gmac.c +++

[PULL 02/12] tap: fix net_init_tap() return code

2025-07-20 Thread Jason Wang
ing fails and returns false, ret=0 is returned, and net_client_init1 will use a broken interface. Fix it to be future proof. Signed-off-by: Steve Sistare Signed-off-by: Jason Wang --- net/tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tap.c b/net/tap.c in

[PULL 05/12] hw/net/npcm_gmac.c: Correct test for when to reallocate packet buffer

2025-07-20 Thread Jason Wang
is always 8 bytes, and the condition will almost always be true, so we will reallocate the buffer more often than we need to. Correct the condition to test against tx_buffer_size, which is where we track how big the allocated buffer is. Signed-off-by: Peter Maydell Signed-off-by: Jason

[PULL 00/12] Net patches

2025-07-20 Thread Jason Wang
The following changes since commit e82989544e38062beeeaad88c175afbeed0400f8: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2025-07-18 14:10:02 -0400) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fe

Re: [PATCH] net/tap: drop too small packets

2025-07-15 Thread Jason Wang
On Tue, Jul 15, 2025 at 10:59 PM Vladimir Sementsov-Ogievskiy wrote: > > On 14.07.25 05:12, Jason Wang wrote: > > On Wed, Jul 9, 2025 at 10:43 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> On 07.07.25 06:49, Jason Wang wrote: > >>>

Re: [PULL 00/13] Net patches

2025-07-15 Thread Jason Wang
Hi Stefan: On Wed, Jul 16, 2025 at 3:55 AM Stefan Hajnoczi wrote: > > Applied, thanks. > > Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any > user-visible changes. I sent a V2 of the PULL: https://mail.gnu.org/archive/html/qemu-devel/2025-07/msg03794.html That inclu

[PULL V2 09/16] net: Add save_acked_features callback to vhost_net

2025-07-14 Thread Jason Wang
the vhost-user implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c| 10 +- include/hw/virtio/vhost.h | 2 ++ include/net

[PULL V2 11/16] net: Add is_vhost_user flag to vhost_net struct

2025-07-14 Thread Jason Wang
nc->info->type' with the new flag. It improves readability and encapsulates the backend type information directly within the vhost_net instance. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c| 3 ++- hw/net/virtio-net.c | 8 ++--

[PULL V2 06/16] net: Add get_vhost_net callback to NetClientInfo

2025-07-14 Thread Jason Wang
ff-by: Jason Wang --- hw/net/vhost_net.c | 31 --- include/net/net.h| 2 ++ include/net/tap.h| 3 --- include/net/vhost-user.h | 1 - include/net/vhost-vdpa.h | 2 -- net/tap-win32.c | 5 - net/tap.c

[PULL V2 10/16] net: Allow network backends to advertise max TX queue size

2025-07-14 Thread Jason Wang
-by: Jason Wang --- hw/net/vhost_net.c| 1 + hw/net/virtio-net.c | 24 include/hw/virtio/vhost.h | 1 + include/net/vhost_net.h | 1 + net/tap.c | 1 + net/vhost-user.c | 1 + net/vhost-vdpa.c | 1 + 7 files changed

[PULL V2 14/16] net/af-xdp: Remove XDP program cleanup logic

2025-07-14 Thread Jason Wang
is always skipped since the non-zero test for s->xdp_flags in af_xdp_cleanup() fails. Fixes: cb039ef3d9e3 ("net: add initial support for AF_XDP network backend") Suggested-by: Ilya Maximets Signed-off-by: Daniel Borkmann Reviewed-by: Ilya Maximets Cc: Ilya Maximets Cc: Jason

[PULL V2 15/16] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-07-14 Thread Jason Wang
into the above format, the af_xdp_cleanup() handler is called as expected. Note the error_propagate() handles a NULL err internally. Fixes: cb039ef3d9e3 ("net: add initial support for AF_XDP network backend") Reviewed-by: Ilya Maximets Signed-off-by: Daniel Borkmann Cc: Ilya Maximets

[PULL V2 03/16] net: Refactor stream logic for reuse in '-net passt'

2025-07-14 Thread Jason Wang
ers within the NetStreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- net/meson.build | 3 +- net/stream.c

[PULL V2 04/16] net: Define net_client_set_link()

2025-07-14 Thread Jason Wang
client search and then calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- include/net/net.h | 1 + net/net.c | 32

[PULL V2 08/16] net: Add get_acked_features callback to VhostNetOptions

2025-07-14 Thread Jason Wang
type check and the direct dependency. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 6 ++ include/net/vhost-user.h | 2 -- include/net/vhost_net.h | 3 +++ net/tap.c| 1 + net/vhost-user.c | 4 +++- net/vhost-vdpa.c | 1

[PULL V2 05/16] vhost_net: Rename vhost_set_vring_enable() for clarity

2025-07-14 Thread Jason Wang
found in cryptodev-vhost.c, it has been renamed to vhost_net_set_vring_enable(). This clarifies that the function belongs to the vhost_net module. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net-stub.c | 2 +- hw/net/vhost_net.c | 4 ++-- hw/net/virtio-net.c

[PULL V2 16/16] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-14 Thread Jason Wang
27;t make any assumptions and neither go down the path of probing all possible options in which way the user installed the XDP program. Reviewed-by: Ilya Maximets Signed-off-by: Daniel Borkmann Cc: Ilya Maximets Cc: Jason Wang Cc: Anton Protopopov Signed-off-by: Jason Wang --- net/af-xdp.c

[PULL V2 13/16] net/passt: Implement vhost-user backend support

2025-07-14 Thread Jason Wang
ction. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- docs/system/devices/net.rst | 12 +- net/passt.c | 346 qapi/net.json | 3 + qemu-options.hx | 10 +- 4 files changed, 369 insertions(+), 2 deletions(-)

[PULL V2 12/16] net: Add passt network backend

2025-07-14 Thread Jason Wang
QEMU exits. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- docs/system/devices/net.rst | 40 +++- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c

[PULL V2 00/16] Net patches

2025-07-14 Thread Jason Wang
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.com/jasowang/qemu.git net-pull-request for you to fe

[PULL V2 07/16] net: Consolidate vhost feature bits into vhost_net structure

2025-07-14 Thread Jason Wang
backends (like TAP, vhost-user, and vhost-vdpa). This patch moves the definition of vhost feature bits directly into the vhost_net structure for each relevant network client. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c| 90

[PULL V2 01/16] net: fix buffer overflow in af_xdp_umem_create()

2025-07-14 Thread Jason Wang
ewed-by: Ilya Maximets Signed-off-by: Anastasia Belova Signed-off-by: Jason Wang --- net/af-xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/af-xdp.c b/net/af-xdp.c index 01c5fb914e..d022534d76 100644 --- a/net/af-xdp.c +++ b/net/af-xdp.c @@ -323,7 +323,7

[PULL V2 02/16] virtio-net: Add queues for RSS during migration

2025-07-14 Thread Jason Wang
one queue pair when realizing") Tested-by: Lei Yang Cc: qemu-sta...@nongnu.org Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c| 11 --- hw/virtio/virtio.c | 14 +++--- include/hw/virtio/virtio.h | 10 -- 3 files chang

Re: [PULL 00/13] Net patches

2025-07-14 Thread Jason Wang
On Mon, Jul 14, 2025 at 1:34 PM Jason Wang wrote: > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are ava

Re: [PATCH] net/vdpa: fix potential fd leak in net_init_vhost_vdpa()

2025-07-14 Thread Jason Wang
dev, const > char *name, > > queue_pairs = vhost_vdpa_get_max_queue_pairs(vdpa_device_fd, features, > &has_cvq, errp); > -if (queue_pairs < 0) { > -qemu_close(vdpa_device_fd); > -return queue_pairs; > +if (queue_pairs <= 0)

[PULL 10/13] net: Allow network backends to advertise max TX queue size

2025-07-13 Thread Jason Wang
-by: Jason Wang --- hw/net/vhost_net.c| 1 + hw/net/virtio-net.c | 24 include/hw/virtio/vhost.h | 1 + include/net/vhost_net.h | 1 + net/tap.c | 1 + net/vhost-user.c | 1 + net/vhost-vdpa.c | 1 + 7 files changed

[PULL 07/13] net: Consolidate vhost feature bits into vhost_net structure

2025-07-13 Thread Jason Wang
backends (like TAP, vhost-user, and vhost-vdpa). This patch moves the definition of vhost feature bits directly into the vhost_net structure for each relevant network client. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c| 90

[PULL 08/13] net: Add get_acked_features callback to VhostNetOptions

2025-07-13 Thread Jason Wang
type check and the direct dependency. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 6 ++ include/net/vhost-user.h | 2 -- include/net/vhost_net.h | 3 +++ net/tap.c| 1 + net/vhost-user.c | 4 +++- net/vhost-vdpa.c | 1

[PULL 03/13] net: Refactor stream logic for reuse in '-net passt'

2025-07-13 Thread Jason Wang
ers within the NetStreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- net/meson.build | 3 +- net/stream.c

[PULL 12/13] net: Add passt network backend

2025-07-13 Thread Jason Wang
QEMU exits. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- docs/system/devices/net.rst | 40 +++- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c

[PULL 11/13] net: Add is_vhost_user flag to vhost_net struct

2025-07-13 Thread Jason Wang
nc->info->type' with the new flag. It improves readability and encapsulates the backend type information directly within the vhost_net instance. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net.c| 3 ++- hw/net/virtio-net.c | 8 ++--

[PULL 00/13] Net patches

2025-07-13 Thread Jason Wang
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

[PULL 09/13] net: Add save_acked_features callback to vhost_net

2025-07-13 Thread Jason Wang
the vhost-user implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c| 10 +- include/hw/virtio/vhost.h | 2 ++ include/net

[PULL 06/13] net: Add get_vhost_net callback to NetClientInfo

2025-07-13 Thread Jason Wang
ff-by: Jason Wang --- hw/net/vhost_net.c | 31 --- include/net/net.h| 2 ++ include/net/tap.h| 3 --- include/net/vhost-user.h | 1 - include/net/vhost-vdpa.h | 2 -- net/tap-win32.c | 5 - net/tap.c

[PULL 13/13] net/passt: Implement vhost-user backend support

2025-07-13 Thread Jason Wang
ction. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- docs/system/devices/net.rst | 12 +- net/passt.c | 346 qapi/net.json | 3 + qemu-options.hx | 10 +- 4 files changed, 369 insertions(+), 2 deletions(-)

[PULL 01/13] net: fix buffer overflow in af_xdp_umem_create()

2025-07-13 Thread Jason Wang
ewed-by: Ilya Maximets Signed-off-by: Anastasia Belova Signed-off-by: Jason Wang --- net/af-xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/af-xdp.c b/net/af-xdp.c index 01c5fb914e..d022534d76 100644 --- a/net/af-xdp.c +++ b/net/af-xdp.c @@ -323,7 +323,7

[PULL 04/13] net: Define net_client_set_link()

2025-07-13 Thread Jason Wang
client search and then calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- include/net/net.h | 1 + net/net.c | 32

[PULL 02/13] virtio-net: Add queues for RSS during migration

2025-07-13 Thread Jason Wang
one queue pair when realizing") Tested-by: Lei Yang Cc: qemu-sta...@nongnu.org Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c| 11 --- hw/virtio/virtio.c | 14 +++--- include/hw/virtio/virtio.h | 10 -- 3 files chang

[PULL 05/13] vhost_net: Rename vhost_set_vring_enable() for clarity

2025-07-13 Thread Jason Wang
found in cryptodev-vhost.c, it has been renamed to vhost_net_set_vring_enable(). This clarifies that the function belongs to the vhost_net module. Signed-off-by: Laurent Vivier Signed-off-by: Jason Wang --- hw/net/vhost_net-stub.c | 2 +- hw/net/vhost_net.c | 4 ++-- hw/net/virtio-net.c

Re: [PATCH] net/tap: drop too small packets

2025-07-13 Thread Jason Wang
On Wed, Jul 9, 2025 at 10:43 PM Vladimir Sementsov-Ogievskiy wrote: > > On 07.07.25 06:49, Jason Wang wrote: > > On Thu, Jul 3, 2025 at 10:59 PM Daniil Tatianin > > wrote: > >> > >> On 7/3/25 1:55 PM, Vladimir Sementsov-Ogievskiy wrote: > >> > >

Re: [PATCH] net/tap: drop too small packets

2025-07-06 Thread Jason Wang
On Thu, Jul 3, 2025 at 10:59 PM Daniil Tatianin wrote: > > On 7/3/25 1:55 PM, Vladimir Sementsov-Ogievskiy wrote: > > > Theoretically tap_read_packet() may return size less than > > s->host_vnet_hdr_len, and next, we'll work with negative size > > (in case of !s->using_vnet_hdr). Let's avoid it. >

Re: [PATCH v2 09/10] net: Add passt network backend

2025-06-30 Thread Jason Wang
On Wed, Jun 18, 2025 at 11:58 PM Laurent Vivier wrote: > > This commit introduces support for passt as a new network backend. > passt is an unprivileged, user-mode networking solution that provides > connectivity for virtual machines by launching an external helper process. > > The implementation

Re: [PATCH v2 05/10] net: Consolidate vhost feature bits into NetClientInfo

2025-06-30 Thread Jason Wang
On Wed, Jun 18, 2025 at 11:57 PM Laurent Vivier wrote: > > Previously, the vhost_net_get_feature_bits() function in > hw/net/vhost_net.c used a large switch statement to determine > the appropriate feature bits based on the NetClientDriver type. > > This created unnecessary coupling between the ge

Re: [PATCH v2 03/10] net: Introduce helper to identify vhost-user clients

2025-06-30 Thread Jason Wang
On Wed, Jun 18, 2025 at 11:57 PM Laurent Vivier wrote: > > Currently, several parts of the codebase check if a network client is a > vhost-user backend by directly comparing its type against the > NET_CLIENT_DRIVER_VHOST_USER enum. This creates a tight coupling > between virtio/vhost-net drivers a

Re: [PATCH 0/8] net: Add passt netdev backend

2025-06-23 Thread Jason Wang
On Mon, Jun 23, 2025 at 4:10 PM Laurent Vivier wrote: > > On 23/06/2025 10:03, Jason Wang wrote: > > On Wed, Jun 18, 2025 at 4:39 PM Laurent Vivier wrote: > >> > >> This series introduces support for passt as a new network backend for > >> QEMU. > >

Re: [PATCH 0/8] net: Add passt netdev backend

2025-06-23 Thread Jason Wang
On Wed, Jun 18, 2025 at 4:39 PM Laurent Vivier wrote: > > This series introduces support for passt as a new network backend for > QEMU. > > passt is a modern, unprivileged, user-mode networking solution that > provides guest connectivity by launching an external helper process. This > series adds

Re: [PATCH] vdpa: Allow VDPA to work on big-endian machine

2025-06-15 Thread Jason Wang
re putting it into virtio queue. > > Signed-off-by: Konstantin Shkolnyy > --- Acked-by: Jason Wang Thanks

Re: [PATCH v2] virtio-net: Add queues for RSS during migration

2025-06-02 Thread Jason Wang
On Fri, May 30, 2025 at 1:19 PM Akihiko Odaki wrote: > > virtio_net_pre_load_queues() inspects vdev->guest_features to tell if > VIRTIO_NET_F_RSS or VIRTIO_NET_F_MQ is enabled to infer the required > number of queues. This works for VIRTIO_NET_F_MQ but it doesn't for > VIRTIO_NET_F_RSS because onl

Re: [PATCH] net: fix buffer overflow in af_xdp_umem_create()

2025-06-02 Thread Jason Wang
On Mon, Jun 2, 2025 at 4:57 PM Anastasia Belova wrote: > > s->pool has n_descs elements so maximum i should be > n_descs - 1. Fix the upper bound. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: cb039ef3d9 ("net: add initial support for AF_XDP network backend") > S

Re: [PATCH] virtio-net: Add queues for RSS during migration

2025-05-25 Thread Jason Wang
On Thu, May 22, 2025 at 12:39 PM Akihiko Odaki wrote: > > On 2025/05/22 10:50, 'Jason Wang' via devel wrote: > > On Wed, May 21, 2025 at 11:51 AM Akihiko Odaki > > wrote: > >> > >> On 2025/05/21 9:51, Jason Wang wrote: > >>> On

Re: [PATCH] virtio-net: Add queues for RSS during migration

2025-05-21 Thread Jason Wang
On Wed, May 21, 2025 at 11:51 AM Akihiko Odaki wrote: > > On 2025/05/21 9:51, Jason Wang wrote: > > On Fri, May 16, 2025 at 11:29 AM Akihiko Odaki > > wrote: > >> > >> On 2025/05/16 10:44, Jason Wang wrote: > >>> On Wed, May 14, 2025 at 2:58 PM Ak

Re: [PATCH] virtio-net: Add queues for RSS during migration

2025-05-20 Thread Jason Wang
On Fri, May 16, 2025 at 11:29 AM Akihiko Odaki wrote: > > On 2025/05/16 10:44, Jason Wang wrote: > > On Wed, May 14, 2025 at 2:58 PM Akihiko Odaki > > wrote: > >> > >> On 2025/05/14 14:05, 'Jason Wang' via devel wrote: > >>> O

Re: [PATCH v4 6/7] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2025-05-15 Thread Jason Wang
gned-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [PATCH v4 3/7] vdpa: set backend capabilities at vhost_vdpa_init

2025-05-15 Thread Jason Wang
y in > batches, using VHOST_BACKEND_F_IOTLB_BATCH. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [PATCH v4 5/7] vdpa: reorder listener assignment

2025-05-15 Thread Jason Wang
t; Do the right thing and only set it in the first vdpa device. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer Acked-by: Jason Wang Thanks

Re: [PATCH v4 4/7] vdpa: add listener_registered

2025-05-15 Thread Jason Wang
On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote: > > From: Eugenio Pérez > > Check if the listener has been registered or not, so it needs to be > registered again at start. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [PATCH v4 2/7] vdpa: reorder vhost_vdpa_set_backend_cap

2025-05-15 Thread Jason Wang
On Thu, May 8, 2025 at 2:48 AM Jonah Palmer wrote: > > From: Eugenio Pérez > > It will be used directly by vhost_vdpa_init. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [PATCH v4 1/7] vdpa: check for iova tree initialized at net_client_start

2025-05-15 Thread Jason Wang
ent_stop clear it if the device is > stopped. If the guest starts the device again, the iova tree is > recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start > if needed, so old behavior is kept. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer A

Re: [PATCH v4 2/7] vdpa: reorder vhost_vdpa_set_backend_cap

2025-05-15 Thread Jason Wang
On Thu, May 8, 2025 at 2:48 AM Jonah Palmer wrote: > > From: Eugenio Pérez > > It will be used directly by vhost_vdpa_init. > > Signed-off-by: Eugenio Pérez > Signed-off-by: Jonah Palmer > --- Acked-by: Jason Wang Thanks

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-15 Thread Jason Wang
On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote: > > Current memory operations like pinning may take a lot of time at the > destination. Currently they are done after the source of the migration is > stopped, and before the workload is resumed at the destination. This is a > period where neigh

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-15 Thread Jason Wang
On Thu, May 15, 2025 at 8:17 AM Si-Wei Liu wrote: > > Hi Eugenio, > > On 5/14/2025 8:49 AM, Eugenio Perez Martin wrote: > > On Wed, May 7, 2025 at 8:47 PM Jonah Palmer wrote: > >> Current memory operations like pinning may take a lot of time at the > >> destination. Currently they are done after

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-15 Thread Jason Wang
On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote: > > Current memory operations like pinning may take a lot of time at the > destination. Currently they are done after the source of the migration is > stopped, and before the workload is resumed at the destination. This is a > period where neigh

  1   2   3   4   5   6   7   8   9   10   >