History log of /dpdk/drivers/net/virtio/virtio_user/vhost_user.c (Results 1 – 25 of 55)
Revision Date Author Comments
# e7750639 10-Jan-2025 Andre Muezerie <andremue@linux.microsoft.com>

drivers: replace packed attributes

MSVC struct packing is not compatible with GCC. Replace macro
__rte_packed with __rte_packed_begin to push existing pack value
and set packing to 1-byte and macro

drivers: replace packed attributes

MSVC struct packing is not compatible with GCC. Replace macro
__rte_packed with __rte_packed_begin to push existing pack value
and set packing to 1-byte and macro __rte_packed_end to restore
the pack value prior to the push.

Macro __rte_packed_end is deliberately utilized to trigger a
MSVC compiler warning if no existing packing has been pushed allowing
easy identification of locations where the __rte_packed_begin is
missing.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

show more ...


# 0ad96138 21-May-2024 Stephen Hemminger <stephen@networkplumber.org>

net/virtio-user: add memcpy check

If fortify is enabled, it will generate a warning if memcpy
src is NULL even if size is zero. This happens if the MP message
sync is called with no file descriptors

net/virtio-user: add memcpy check

If fortify is enabled, it will generate a warning if memcpy
src is NULL even if size is zero. This happens if the MP message
sync is called with no file descriptors.

Bugzilla ID: 1446
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

show more ...


# 72b452c5 27-Aug-2022 Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

eal: remove unneeded includes from a public header

Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
because they are not used by this file.
Include the needed headers directl

eal: remove unneeded includes from a public header

Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
because they are not used by this file.
Include the needed headers directly from the files that need them.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 41f9a175 17-Jun-2022 Yuan Wang <yuanx.wang@intel.com>

net/virtio-user: fix socket non-blocking mode

The virtio-user initialization requires unix socket to receive backend
messages in block mode. However, vhost_user_update_link_state() sets
the same soc

net/virtio-user: fix socket non-blocking mode

The virtio-user initialization requires unix socket to receive backend
messages in block mode. However, vhost_user_update_link_state() sets
the same socket to nonblocking via fcntl, which affects all threads.
Enabling the rxq interrupt can causes both of these behaviors to occur
concurrently, with the result that the initialization may fail
because no messages are received in nonblocking socket.

Thread 1:
virtio_init_device()
--> virtio_user_start_device()
--> vhost_user_set_memory_table()
--> vhost_user_check_reply_ack()

Thread 2:
virtio_interrupt_handler()
--> vhost_user_update_link_state()

Fix that by replacing O_NONBLOCK with the recv per-call option
MSG_DONTWAIT.

Fixes: ef53b6030039 ("net/virtio-user: support LSC")
Cc: stable@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# e4b12ba5 25-Apr-2022 David Marchand <david.marchand@redhat.com>

vhost: refactor messages handlers declaration

Move message handler description and callbacks into a single array and
remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.

Signed-off-by: David M

vhost: refactor messages handlers declaration

Move message handler description and callbacks into a single array and
remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


# 5e0099dc 07-Feb-2022 Christophe Fontaine <cfontain@redhat.com>

vhost: remove payload size limitation

FDs at the end of the VhostUserMessage structure limits the size
of the payload. Move them to an other englobing structure, before
the header & payload of a Vho

vhost: remove payload size limitation

FDs at the end of the VhostUserMessage structure limits the size
of the payload. Move them to an other englobing structure, before
the header & payload of a VhostUserMessage.
Also removes a reference to fds in the VHUMsg structure defined in
drivers/net/virtio/virtio_user/vhost_user.c

Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

show more ...


# 6abf10a2 08-Jan-2022 Yunjian Wang <wangyunjian@huawei.com>

net/virtio-user: check FD flags getting failure

The function fcntl() could return errors,
the return value need to be checked.

Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")

net/virtio-user: check FD flags getting failure

The function fcntl() could return errors,
the return value need to be checked.

Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# f3854eba 16-Sep-2021 Thomas Monjalon <thomas@monjalon.net>

net/virtio: remove blank lines in log

The macros PMD_*_LOG already include the line feed character.
Redundant \n are removed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David

net/virtio: remove blank lines in log

The macros PMD_*_LOG already include the line feed character.
Redundant \n are removed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 23abee9d 17-Mar-2021 Ilya Maximets <i.maximets@ovn.org>

net/virtio: fix interrupt unregistering for listening socket

virtio_user_dev_server_reconnect() is typically called from the
interrupt context while checking the link state:

vhost_user_update_lin

net/virtio: fix interrupt unregistering for listening socket

virtio_user_dev_server_reconnect() is typically called from the
interrupt context while checking the link state:

vhost_user_update_link_state()
--> virtio_user_dev_server_reconnect()

Under this conditions callback unregistering always fails. This means
that listenfd is never unregistered and continue to trigger interrupts.
For example, if second client will try to connect to the same socket,
the server will receive interrupts infinitely because it will not
accept them while listen fd is readable and generates epoll events.

Fix that by moving reconfiguration of interrupts out of the
interrupt context to alarm handler.

'virtio_user_dev_delayed_handler' renamed to
'virtio_user_dev_delayed_disconnect_handler' to better reflect its
purpose.

Additionally improved error logging around interrupt management.

Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


# 6564ddcd 01-Feb-2021 David Marchand <david.marchand@redhat.com>

net/virtio: remove duplicated port ID from virtio-user

The private virtio_user_dev structure embeds a virtio_hw which itself
contains the ethdev port_id.
Make use of it and remove the duplicate port

net/virtio: remove duplicated port ID from virtio-user

The private virtio_user_dev structure embeds a virtio_hw which itself
contains the ethdev port_id.
Make use of it and remove the duplicate port_id field.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


# 0ea5be8d 01-Feb-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: fix listen file initialization

When running in client mode, the listen file descriptor
is not initialized, and so has value 0. At destroy time,
the listen FD is closed if its value is gr

net/virtio: fix listen file initialization

When running in client mode, the listen file descriptor
is not initialized, and so has value 0. At destroy time,
the listen FD is closed if its value is greater than or
equal to zero, which causes STDIN to be closed.

Bugzilla ID: 630
Fixes: 949735312f5e ("net/virtio: move vhost-user specifics to its backend")

Reported-by: Jun W Zhou <junx.w.zhou@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>

show more ...


# 432a195f 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: improve vhost-user error logging

This patch improves error logging in vhost_user_read,
especially printing errno when recv() fails.

Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Sig

net/virtio: improve vhost-user error logging

This patch improves error logging in vhost_user_read,
especially printing errno when recv() fails.

Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 94973531 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: move vhost-user specifics to its backend

This patch moves all the Vhost-user backend specific
logic like Vhost FD, listen FD and interrupt handling
to the vhost-user backend implementati

net/virtio: move vhost-user specifics to its backend

This patch moves all the Vhost-user backend specific
logic like Vhost FD, listen FD and interrupt handling
to the vhost-user backend implementation.

In order to achieve that, new ops are created to update
the link status, disconnect and reconnect the server,
and fetch the link state interrupt FD.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 748e5ea5 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: introduce backend data

The goal of this patch is to introduce backend-specific
data in order to better isolate what is backend-specific
from what is generic to Virtio-user.

For now, onl

net/virtio: introduce backend data

The goal of this patch is to introduce backend-specific
data in order to better isolate what is backend-specific
from what is generic to Virtio-user.

For now, only Vhost-user protocol features are moved to
Vhost-user backend data.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 5b75b63c 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: move protocol features to vhost-user

Since only protocol features are specific to Vhost-user
backend, this patch moves all related code to Vhost-user
file.

Signed-off-by: Maxime Coqueli

net/virtio: move protocol features to vhost-user

Since only protocol features are specific to Vhost-user
backend, this patch moves all related code to Vhost-user
file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 9af79db2 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: make server mode blocking

This patch makes the Vhost-user backend server mode
blocking at init, waiting for the client connection.

The goal is to make the driver more reliable, as witho

net/virtio: make server mode blocking

This patch makes the Vhost-user backend server mode
blocking at init, waiting for the client connection.

The goal is to make the driver more reliable, as without
waiting for client connection, the Virtio driver has to
assume the Vhost-user backend will support all the
features it has advertized, which could lead to undefined
behaviour.

For example, without this patch, if the user enables packed
ring Virtio feature but the backend does not support it,
the ring initialized by the driver will not be compatible
with the backend.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 47e2ad07 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: move vhost-user requests to vhost-user backend

Now that we have a proper isolation of the backends,
we can move Vhost-user requests declaration to the
Vhost-user backend file.

Signed-of

net/virtio: move vhost-user requests to vhost-user backend

Now that we have a proper isolation of the backends,
we can move Vhost-user requests declaration to the
Vhost-user backend file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 1b34ad28 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: remove useless request ops

Now that all the ops have been implemented, we
can remove the send_request ops for all backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
R

net/virtio: remove useless request ops

Now that all the ops have been implemented, we
can remove the send_request ops for all backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 8723c894 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user status ops

This patch introduces new callbacks to
get and set the device status.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <che

net/virtio: add virtio-user status ops

This patch introduces new callbacks to
get and set the device status.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# dc65db73 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user vring address ops

This patch introduces a new callback for setting
vrings addresses.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia

net/virtio: add virtio-user vring address ops

This patch introduces a new callback for setting
vrings addresses.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# ce399c36 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user vring file ops

This patch introduces new callbacks for setting
vring files (kick and call).

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chen

net/virtio: add virtio-user vring file ops

This patch introduces new callbacks for setting
vring files (kick and call).

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# ab9098d2 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user vring setting ops

This patch introduces new callbacks for setting
and getting vring state.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenb

net/virtio: add virtio-user vring setting ops

This patch introduces new callbacks for setting
and getting vring state.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 539d910c 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user memory tables ops

This patch implements a dedicated callback for
preparing and sending memory table to the backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redh

net/virtio: add virtio-user memory tables ops

This patch implements a dedicated callback for
preparing and sending memory table to the backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# 6c251919 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user protocol features ops

This patch introduces new callbacks for getting
and setting Vhost-user protocol features.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.co

net/virtio: add virtio-user protocol features ops

This patch introduces new callbacks for getting
and setting Vhost-user protocol features.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


# cc0151b3 26-Jan-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

net/virtio: add virtio-user features ops

This patch introduces new callbacks for getting
and setting Virtio features, and implements them
for the different backend types.

Signed-off-by: Maxime Coqu

net/virtio: add virtio-user features ops

This patch introduces new callbacks for getting
and setting Virtio features, and implements them
for the different backend types.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

show more ...


123