c8295404 | 12-Nov-2021 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa: Check for existence of opts.vhostdev
Since net_init_vhost_vdpa is trying to open it. Not specifying it in the command line crash qemu.
Fixes: 7327813d17 ("vhost-vdpa: open device fd in net_in
vdpa: Check for existence of opts.vhostdev
Since net_init_vhost_vdpa is trying to open it. Not specifying it in the command line crash qemu.
Fixes: 7327813d17 ("vhost-vdpa: open device fd in net_init_vhost_vdpa()") Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20211112193431.2379298-3-eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
0351152b | 12-Nov-2021 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa: Replace qemu_open_old by qemu_open at
There is no reason to keep using the old one, since we neither use the variadics arguments nor open it with O_DIRECT.
Also, net_client_init1, the caller
vdpa: Replace qemu_open_old by qemu_open at
There is no reason to keep using the old one, since we neither use the variadics arguments nor open it with O_DIRECT.
Also, net_client_init1, the caller of net_init_vhost_vdpa, wants all net_client_init_fun to use Error API, so it's a good step in that direction.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20211112193431.2379298-2-eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
64153ca6 | 02-Nov-2021 |
Rao, Lei <lei.rao@intel.com> |
Optimized the function of fill_connection_key.
Remove some unnecessary code to improve the performance of the filter-rewriter module.
Signed-off-by: Lei Rao <lei.rao@intel.com> Reviewed-by: Zhang C
Optimized the function of fill_connection_key.
Remove some unnecessary code to improve the performance of the filter-rewriter module.
Signed-off-by: Lei Rao <lei.rao@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@trasno.org>
show more ...
|
2f849dbd | 19-Oct-2021 |
Jason Wang <jasowang@redhat.com> |
net: introduce control client
This patch introduces a boolean for the device has control queue which can accepts control command via network queue.
The first user would be the control virtqueue sup
net: introduce control client
This patch introduces a boolean for the device has control queue which can accepts control command via network queue.
The first user would be the control virtqueue support for vhost.
Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-6-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
654790b6 | 19-Oct-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *
This patch switches to let net_vhost_vdpa_init() to return NetClientState *. This is used for the callers to allocate multiqueue NetCli
vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *
This patch switches to let net_vhost_vdpa_init() to return NetClientState *. This is used for the callers to allocate multiqueue NetClientState for multiqueue support.
Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-5-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
ee8a1c63 | 08-Oct-2021 |
Kevin Wolf <kwolf@redhat.com> |
net/vhost-vdpa: Fix device compatibility check
vhost-vdpa works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a n
net/vhost-vdpa: Fix device compatibility check
vhost-vdpa works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them.
This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo' should complain about an unknown property, not about the wrong kind of network device being attached) and completely ignores hotplugging.
Drop the old checks and implement .check_peer_type() instead to fix this. As a nice side effect, it also removes one more dependency on the legacy QemuOpts infrastructure and even reduces the code size.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20211008133442.141332-4-kwolf@redhat.com> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
5c485d51 | 08-Oct-2021 |
Kevin Wolf <kwolf@redhat.com> |
net/vhost-user: Fix device compatibility check
vhost-user works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a n
net/vhost-user: Fix device compatibility check
vhost-user works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them.
This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo' should complain about an unknown property, not about the wrong kind of network device being attached) and completely ignores hotplugging.
Drop the old checks and implement .check_peer_type() instead to fix this. As a nice side effect, it also removes one more dependency on the legacy QemuOpts infrastructure and even reduces the code size.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20211008133442.141332-3-kwolf@redhat.com> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
499c8b4d | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: remove the unncessary queue_index assignment
The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patc
vhost-vdpa: remove the unncessary queue_index assignment
The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patch removes this.
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-12-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
74af5eec | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()
Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propa
vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()
Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propagate the error to the caller
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-11-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
a97ef87a | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: tweak the error label in vhost_vdpa_add()
Introduce new error label to avoid the unnecessary checking of net pointer.
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client"
vhost-vdpa: tweak the error label in vhost_vdpa_add()
Introduce new error label to avoid the unnecessary checking of net pointer.
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-10-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
ab36edcf | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jas
vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-9-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
f47a47e4 | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: don't cleanup twice in vhost_vdpa_add()
The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this k
vhost-vdpa: don't cleanup twice in vhost_vdpa_add()
The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this kind of "double free" is safe since vhost_dev_cleanup() zero the whole structure.
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-8-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
9ff7a54b | 03-Sep-2021 |
Jason Wang <jasowang@redhat.com> |
vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()
The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure,
vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()
The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure, let's remove this unnecessary check in vhost_vdpa_add().
Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-7-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|