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

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

2025-05-15 Thread Jason Wang
On Wed, May 14, 2025 at 2:58 PM Akihiko Odaki wrote: > > On 2025/05/14 14:05, 'Jason Wang' via devel wrote: > > On Sat, May 10, 2025 at 3:24 PM Akihiko Odaki > > wrote: > >> > >> virtio_net_pre_load_queues() inspects vdev->guest_features to te

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

2025-05-13 Thread Jason Wang
On Sat, May 10, 2025 at 3:24 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] virtio-net: Copy all for dhclient workaround

2025-05-13 Thread Jason Wang
On Mon, May 12, 2025 at 6:11 PM Michael Tokarev wrote: > > On 05.04.2025 11:04, Akihiko Odaki wrote: > > The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to > > buffer") was to remove the need to patch the (const) input buffer with a > > recomputed UDP checksum by copying headers

Re: [PATCH v7 4/4] virtio_net: Add third acceptable configuration for MAC setup.

2025-04-20 Thread Jason Wang
On Thu, Apr 17, 2025 at 6:26 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where both the hardware MAC address > and QEMU command line MAC address are zero. > In this case, QEMU will automatically generate a random MAC address and > assign it to the hardware, and the VM will use th

Re: [PATCH v7 3/4] virtio_net: Add second acceptable configuration for MAC setup

2025-04-20 Thread Jason Wang
On Thu, Apr 17, 2025 at 6:25 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where the hardware MAC address > is non-zero while the MAC address in the QEMU command line is zero. > In this case, QEMU will use the hardware MAC address from the device. > > Signed-off-by: Cindy Lu > ---

Re: [PATCH v7 2/4] virtio_net: Add the check for vdpa's mac address

2025-04-20 Thread Jason Wang
On Thu, Apr 17, 2025 at 6:25 PM Cindy Lu wrote: > > When using a VDPA device, it is important to ensure that the MAC > address is correctly set. The MAC address in the hardware should > match the MAC address from the QEMU command line. This is a recommended > configuration and will allow the syste

Re: [PATCH v7 1/4] vhost_vdpa : Add a new parameter to enable check mac address

2025-04-20 Thread Jason Wang
On Mon, Apr 21, 2025 at 11:14 AM Jason Wang wrote: > > On Thu, Apr 17, 2025 at 6:25 PM Cindy Lu wrote: > > > > When using a VDPA device, it's important to ensure that the MAC > > address is correctly set. > > This patch adds a new QEMU command line

Re: [PATCH v7 1/4] vhost_vdpa : Add a new parameter to enable check mac address

2025-04-20 Thread Jason Wang
On Thu, Apr 17, 2025 at 6:25 PM Cindy Lu wrote: > > When using a VDPA device, it's important to ensure that the MAC > address is correctly set. > This patch adds a new QEMU command line parameter to enable MAC > address verification, which is enabled by default. > > Usage example: > > -netde

Re: [PATCH] virtio: Call set_features during reset

2025-04-15 Thread Jason Wang
On Thu, Apr 10, 2025 at 3:42 PM Akihiko Odaki wrote: > > virtio-net expects set_features() will be called when the feature set > used by the guest changes to update the number of virtqueues. Call it > during reset as reset clears all features and the queues added for > VIRTIO_NET_F_MQ or VIRTIO_NE

Re: [PATCH v6 4/4] virtio_net: Add third acceptable configuration for MAC setup.

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:14 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where both the hardware MAC address > and QEMU command line MAC address are zero. > Let's explain why this can work. Thanks

Re: [PATCH v6 3/4] virtio_net: Add second acceptable configuration for MAC setup

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where the hardware MAC address > is non-zero while the MAC address in the QEMU command line is zero. > > Signed-off-by: Cindy Lu > --- > hw/net/virtio-net.c | 14 ++ > 1 file changed, 14 inserti

Re: [PATCH v6 2/4] virtio_net: Add the check for vdpa's mac address

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > When using a VDPA device, it is important to ensure that the MAC > address is correctly set. The MAC address in the hardware should > match the MAC address from the QEMU command line. This is a recommended > configuration and will allow the system

Re: [PATCH v6 1/4] vhost_vdpa : Add a new parameter to enable check mac address

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > When using a VDPA device, it's important to ensure that the MAC > address is correctly set. > Add a new parameter in qemu cmdline to enable this check, default value > is false > > The usage is: > > -netdev > type=vhost-vdpa,vhostdev=/dev/vh

Re: [PATCH] Revert "virtio-net: Copy received header to buffer"

2025-04-06 Thread Jason Wang
g > Signed-off-by: Antoine Damhet > --- Acked-by: Jason Wang Thanks

Re: [PATCH] virtio-net: Copy all for dhclient workaround

2025-04-06 Thread Jason Wang
On Sat, Apr 5, 2025 at 4:04 PM Akihiko Odaki wrote: > > The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to > buffer") was to remove the need to patch the (const) input buffer with a > recomputed UDP checksum by copying headers to a RW region and inject the > checksum there. The

Re: VDPA MAC address problem

2025-04-04 Thread Jason Wang
Adding Cindy and Eugenio On Thu, Mar 20, 2025 at 12:34 AM Konstantin Shkolnyy wrote: > > I’m observing a problem while testing VDPA with Nvidia ConnectX-6 (mlx5) > on s390. > > Upon start, virtio_net_device_realize() tries to set a new MAC address > by VHOST_VDPA_SET_CONFIG which doesn’t do anyth

Re: VDPA MAC address problem

2025-03-23 Thread Jason Wang
On Fri, Mar 21, 2025 at 12:29 PM Konstantin Shkolnyy wrote: > > On 3/20/2025 20:22, Jason Wang wrote: > > On Fri, Mar 21, 2025 at 12:45 AM Konstantin Shkolnyy > > wrote: > >> > >> On 3/19/2025 19:58, Jason Wang wrote: > >>> On Thu, Mar 20, 20

Re: VDPA MAC address problem

2025-03-23 Thread Jason Wang
On Thu, Mar 20, 2025 at 10:19 PM Konstantin Shkolnyy wrote: > > On 3/19/2025 19:58, Jason Wang wrote: > > Adding Cindy and Eugenio > > > > On Thu, Mar 20, 2025 at 12:34 AM Konstantin Shkolnyy > > wrote: > >> > >> I’m observing a problem while te

Re: VDPA MAC address problem

2025-03-20 Thread Jason Wang
On Fri, Mar 21, 2025 at 12:45 AM Konstantin Shkolnyy wrote: > > On 3/19/2025 19:58, Jason Wang wrote: > > On Thu, Mar 20, 2025 at 12:34 AM Konstantin Shkolnyy > > wrote: > >> Upon reading this forum, I see that VHOST_VDPA_SET_CONFIG is > >> “deprecated”, and

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

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 9:55 AM Lei Yang wrote: > > Hi Jonah > > I tested this series with the vhost_vdpa device based on mellanox > ConnectX-6 DX nic and hit the host kernel crash. This problem can be > easier to reproduce under the hotplug/unplug device scenario. > For the core dump messages ple

[PULL 1/1] vdpa: Allow vDPA to work on big-endian machine

2025-03-17 Thread Jason Wang
Michael S. Tsirkin Acked-by: Eugenio Pérez Signed-off-by: Konstantin Shkolnyy Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 13 + 1 file changed, 13 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index f7a54f46aa..7ca8b46eee 100644 --- a/net/vhost-vdpa.c +++ b

[PULL 0/1] Net patches

2025-03-17 Thread Jason Wang
The following changes since commit aa90f1161bb17a4863e16ec2f75104cff0752d4e: Merge tag 'migration-20250314-pull-request' of https://gitlab.com/farosas/qemu into staging (2025-03-16 02:45:22 -0400) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-req

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

2025-03-16 Thread Jason Wang
On Thu, Mar 13, 2025 at 11:14 PM Konstantin Shkolnyy wrote: > > On 2/23/2025 19:57, Jason Wang wrote: > > On Sat, Feb 22, 2025 at 3:08 AM Konstantin Shkolnyy > > wrote: > >> > >> Add .set_vnet_le() function that always returns success, assuming that >

[PULL 0/5] Net patches

2025-03-11 Thread Jason Wang
The following changes since commit d9a4282c4b690e45d25c2b933f318bb41eeb271d: Merge tag 'pull-tcg-20250308' of https://gitlab.com/rth7680/qemu into staging (2025-03-09 11:45:00 +0800) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

[PULL 1/5] net: parameterize the removing client from nc list

2025-03-11 Thread Jason Wang
From: Eugenio Pérez This change is used in later commits so we can avoid the removal of the netclient if it is delayed. No functional change intended. Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez Signed-off-by: Jason Wang --- net/net.c | 13 - 1

Re: [PATCH 0/3] hw/net/smc91c111: Fix potential array overflows

2025-03-11 Thread Jason Wang
On Tue, Mar 11, 2025 at 5:00 PM Philippe Mathieu-Daudé wrote: > > Hi Peter, Jason, > > On 28/2/25 18:47, Peter Maydell wrote: > > This patchset fixes some potential array overflows in the > > smc91c111 ethernet device model, including the one found in > > https://gitlab.com/qemu-project/qemu/-/iss

[PULL 4/5] Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()"

2025-03-10 Thread Jason Wang
From: Akihiko Odaki This reverts commit 83ddb3dbba2ee0f1767442ae6ee665058aeb1093. The added check is no longer necessary due to a change of iov_from_buf(). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 4 1 file

[PULL 3/5] util/iov: Do not assert offset is in iov

2025-03-10 Thread Jason Wang
there are sufficient space at the given offset. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- include/qemu/iov.h | 5 +++-- util/iov.c | 5 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/qemu/iov.h b/include/qemu/iov.h index 44f9db5cee..9535673c13 10

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

2025-03-10 Thread Jason Wang
s finished. Move the cleanup from qemu_cleanup to the NIC deletion and to net_cleanup. Fixes: a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") Reported-by: Lei Yang Signed-off-by: Eugenio Pérez Signed-off-by: Jonah Palmer Signed-off-by: Jason

[PULL 5/5] tap-linux: Open ipvtap and macvtap

2025-03-10 Thread Jason Wang
From: Akihiko Odaki ipvtap and macvtap create a file for each interface unlike tuntap, which creates one file shared by all interfaces. Try to open a file dedicated to the interface first for ipvtap and macvtap. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- net/tap-linux.c | 17

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

2025-02-23 Thread Jason Wang
ers; falling back on userspace virtio" > > Signed-off-by: Konstantin Shkolnyy > --- > Changes in V2: Add code comment. > Acked-by: Jason Wang Thanks

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-02-20 Thread Jason Wang
On Fri, Feb 21, 2025 at 4:46 AM Michael S. Tsirkin wrote: > > On Thu, Feb 20, 2025 at 09:00:04PM +0100, Stefano Brivio wrote: > > On Thu, 20 Feb 2025 13:21:33 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Feb 20, 2025 at 05:59:10PM +0100, Stefano Brivio wrote: > > > > On Thu, 20 Feb 202

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

2025-02-18 Thread Jason Wang
On Tue, Feb 18, 2025 at 10:03 PM Philippe Mathieu-Daudé wrote: > > Hi Konstantin, > > (Cc'ing more developers) > > On 18/2/25 14:27, Konstantin Shkolnyy wrote: > > On 2/12/2025 14:01, Konstantin Shkolnyy wrote: > >> On 2/12/2025 12:07, Philippe Mathieu-Daudé wrote: > >>> On 12/2/25 18:24, Konstant

Re: [PATCH v2 2/5] hw/i386/intel-iommu: Migrate to 3-phase reset

2025-02-17 Thread Jason Wang
t's use 3-phase reset mechanism and reset the IOMMU on > exit phase after all DMA capable devices have been reset > on 'enter' or 'hold' phase. > > Signed-off-by: Eric Auger > Acked-by: Michael S. Tsirkin > Acked-by: Jason Wang Thanks

Re: [PATCH v2 1/5] hw/virtio/virtio-iommu: Migrate to 3-phase reset

2025-02-17 Thread Jason Wang
been > reset during the 'enter' or 'hold' phase. > > Signed-off-by: Eric Auger > Acked-by: Michael S. Tsirkin > Acked-by: Jason Wang Thanks

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-26 Thread Jason Wang
On Sun, Jan 26, 2025 at 3:56 PM Jason Wang wrote: > > On Sat, Jan 25, 2025 at 12:42 AM Peter Xu wrote: > > > > Hello, Jason, Eric, > > > > On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > > > It might be because neither virtio bus nor virt

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-25 Thread Jason Wang
On Sat, Jan 25, 2025 at 12:42 AM Peter Xu wrote: > > Hello, Jason, Eric, > > On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > > It might be because neither virtio bus nor virtio-net provides a > > shutdown method. > > > > There used to be requ

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Jason Wang
On Fri, Jan 24, 2025 at 12:01 PM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Jason Wang > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets > >disabled > > > >On Fri, Jan 24, 2025 at 11:30 AM Jaso

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Fri, Jan 24, 2025 at 11:30 AM Jason Wang wrote: > > On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong > wrote: > > > > > > > > >-Original Message- > > >From: Eric Auger > > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callb

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Eric Auger > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets > >disabled > > > >Hi Jason, > > > > > >

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Thu, Jan 23, 2025 at 4:31 PM Eric Auger wrote: > > Hi Jason, > > > On 1/23/25 2:34 AM, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: > >> Hi Jason, > >> > >> > >> On 1/22/25 8:17 AM, Jason Wang wrote:

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-22 Thread Jason Wang
On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: > > Hi Jason, > > > On 1/22/25 8:17 AM, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: > >> > >> Hi Jason, > >> > >> On 1/21/25 4:27 AM, Jason Wang wrote

  1   2   3   4   5   6   7   8   9   10   >