History log of /dpdk/lib/vhost/vhost.c (Results 1 – 24 of 24)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c5736998 24-Mar-2022 Maxime Coquelin <[email protected]>

vhost: fix missing virtqueue lock protection

This patch ensures virtqueue metadata are not being
modified while rte_vhost_vring_call() is executed.

Fixes: 6c299bb7322f ("vhost: introduce vring call

vhost: fix missing virtqueue lock protection

This patch ensures virtqueue metadata are not being
modified while rte_vhost_vring_call() is executed.

Fixes: 6c299bb7322f ("vhost: introduce vring call API")
Cc: [email protected]

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# 1419e8d9 08-Apr-2022 Xuan Ding <[email protected]>

vhost: add unsafe API to check in-flight packets

In async data path, when vring state changes or device is destroyed,
it is necessary to know the number of in-flight packets in DMA engine.
This patc

vhost: add unsafe API to check in-flight packets

In async data path, when vring state changes or device is destroyed,
it is necessary to know the number of in-flight packets in DMA engine.
This patch provides a thread unsafe API to return the number of
in-flight packets for a vhost queue without using any lock.

Signed-off-by: Xuan Ding <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2
# 30a1de10 15-Feb-2022 Sean Morrissey <[email protected]>

lib: remove unneeded header includes

These header includes have been flagged by the iwyu_tool
and removed.

Signed-off-by: Sean Morrissey <[email protected]>


Revision tags: v22.03-rc1
# 53d3f477 09-Feb-2022 Jiayu Hu <[email protected]>

vhost: integrate dmadev in asynchronous data-path

Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA
abstraction layer and simplify application logics, this patch integrates
dma

vhost: integrate dmadev in asynchronous data-path

Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA
abstraction layer and simplify application logics, this patch integrates
dmadev in asynchronous data path.

Signed-off-by: Jiayu Hu <[email protected]>
Signed-off-by: Sunil Pai G <[email protected]>
Tested-by: Yvonne Yang <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# afd857cb 26-Jan-2022 Maxime Coquelin <[email protected]>

vhost: use proper logging type for data path

This patch changes type from config to data for functions
called in the datapath.

Suggested-by: David Marchand <[email protected]>
Signed-off-by

vhost: use proper logging type for data path

This patch changes type from config to data for functions
called in the datapath.

Suggested-by: David Marchand <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# 5b030165 26-Jan-2022 Maxime Coquelin <[email protected]>

vhost: remove multi-line logs

This patch replaces multi-lines logs in multiple single-
line logs in order to ease logs filtering based on their
socket path.

Signed-off-by: Maxime Coquelin <maxime.c

vhost: remove multi-line logs

This patch replaces multi-lines logs in multiple single-
line logs in order to ease logs filtering based on their
socket path.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# ccf1ebd6 26-Jan-2022 Maxime Coquelin <[email protected]>

vhost: improve vhost layer logs

This patch prepends Vhost logs with the Vhost-user socket
path when available to ease filtering logs for a given port.

Signed-off-by: Maxime Coquelin <maxime.coqueli

vhost: improve vhost layer logs

This patch prepends Vhost logs with the Vhost-user socket
path when available to ease filtering logs for a given port.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# 2d1c05c9 26-Jan-2022 Maxime Coquelin <[email protected]>

vhost: improve IOTLB logs

This patch adds IOTLB mempool name when logging debug
or error messages, and also prepends the socket path.
to all the logs.

Signed-off-by: Maxime Coquelin <maxime.coqueli

vhost: improve IOTLB logs

This patch adds IOTLB mempool name when logging debug
or error messages, and also prepends the socket path.
to all the logs.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2
# ee8024b3 26-Oct-2021 Maxime Coquelin <[email protected]>

vhost: move async data in dedicated structure

This patch moves async-related metadata from vhost_virtqueue
to a dedicated struct. It makes it clear which fields are
async related, and also saves som

vhost: move async data in dedicated structure

This patch moves async-related metadata from vhost_virtqueue
to a dedicated struct. It makes it clear which fields are
async related, and also saves some memory when async feature
is not in use.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: Jiayu Hu <[email protected]>

show more ...


Revision tags: v21.11-rc1
# 34fd4373 25-Oct-2021 Miao Li <[email protected]>

vhost: add power monitor API

This commit defines rte_vhost_power_monitor_cond which is used to pass
some information to vhost driver. The information is including the
address to monitor, the expecte

vhost: add power monitor API

This commit defines rte_vhost_power_monitor_cond which is used to pass
some information to vhost driver. The information is including the
address to monitor, the expected value, the mask to extract value read
from 'addr', the value size of monitor address, the match flag used to
distinguish the value used to match something or not match something.

Vhost driver can use these information to fill rte_power_monitor_cond.

Signed-off-by: Miao Li <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Acked-by: David Hunt <[email protected]>

show more ...


# 5a4fbe79 14-Oct-2021 Li Feng <[email protected]>

vhost: add sanity check on inflight last index

The index in rte_vhost_set_last_inflight_io_split is from
the frontend driver, check if it's in the virtqueue range.

Fixes: bb0c2de9602b ("vhost: add

vhost: add sanity check on inflight last index

The index in rte_vhost_set_last_inflight_io_split is from
the frontend driver, check if it's in the virtqueue range.

Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring")
Cc: [email protected]

Signed-off-by: Li Feng <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 07ee2d75 16-Sep-2021 Xuan Ding <[email protected]>

vhost: normalize return type and function name

In some function definitions, adjust return type and function name on
a separate line to be consistent with DPDK coding style.

Signed-off-by: Xuan Din

vhost: normalize return type and function name

In some function definitions, adjust return type and function name on
a separate line to be consistent with DPDK coding style.

Signed-off-by: Xuan Ding <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


# abeb8652 20-Aug-2021 Jiayu Hu <[email protected]>

vhost: remove copy threshold for async path

Copy threshold has been introduced in async vhost data
path to select the appropriate copy engine to do copies
for higher efficiency.

However, it may cau

vhost: remove copy threshold for async path

Copy threshold has been introduced in async vhost data
path to select the appropriate copy engine to do copies
for higher efficiency.

However, it may cause packets ordering issues and also
introduces performance unpredictability.

Therefore, this patch removes copy threshold support in
async vhost data path.

Signed-off-by: Jiayu Hu <[email protected]>
Signed-off-by: Cheng Jiang <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1
# fa51f1aa 06-Jul-2021 Jiayu Hu <[email protected]>

vhost: add thread-unsafe async registration

This patch adds thread unsafe version for async register and
unregister functions.

Signed-off-by: Jiayu Hu <[email protected]>
Reviewed-by: Chenbo Xia <

vhost: add thread-unsafe async registration

This patch adds thread unsafe version for async register and
unregister functions.

Signed-off-by: Jiayu Hu <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# acbc3888 19-Jul-2021 Jiayu Hu <[email protected]>

vhost: rework async configuration structure

This patch reworks the async configuration structure to improve code
readability. In addition, add preserved padding fields on the structure
for future us

vhost: rework async configuration structure

This patch reworks the async configuration structure to improve code
readability. In addition, add preserved padding fields on the structure
for future usage.

Signed-off-by: Jiayu Hu <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 0c0935c5 08-Jul-2021 Jiayu Hu <[email protected]>

vhost: allow to check in-flight packets for async vhost

This patch allows to check the amount of in-flight packets
for the vhost queue using async acceleration.

Signed-off-by: Jiayu Hu <jiayu.hu@in

vhost: allow to check in-flight packets for async vhost

This patch allows to check the amount of in-flight packets
for the vhost queue using async acceleration.

Signed-off-by: Jiayu Hu <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# b3d4a18b 29-Jun-2021 Maxime Coquelin <[email protected]>

vhost: use DPDK allocations for in-flight data

Inflight metadata are allocated using glibc's calloc.
This patch converts them to rte_zmalloc_socket to take
care of the NUMA affinity.

Signed-off-by:

vhost: use DPDK allocations for in-flight data

Inflight metadata are allocated using glibc's calloc.
This patch converts them to rte_zmalloc_socket to take
care of the NUMA affinity.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


# b81c9346 29-Jun-2021 Maxime Coquelin <[email protected]>

vhost: allocate all data on same node as virtqueue

This patch saves the NUMA node the virtqueue is allocated
on at init time, in order to allocate all other data on the
same node.

While most of the

vhost: allocate all data on same node as virtqueue

This patch saves the NUMA node the virtqueue is allocated
on at init time, in order to allocate all other data on the
same node.

While most of the data are allocated before numa_realloc()
is called and so the data will be reallocated properly, some
data like the log cache are most likely allocated after.

For the virtio device metadata, we decide to allocate them
on the same node as the VQ 0.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


Revision tags: v21.05, v21.05-rc4
# f31ce483 17-May-2021 David Marchand <[email protected]>

vhost: restore IOTLB mempool allocation

IOTLB messages will be sent when some queues are not enabled. If we
initialize IOTLB in vhost_user_set_vring_num, it could happen that IOTLB
update comes when

vhost: restore IOTLB mempool allocation

IOTLB messages will be sent when some queues are not enabled. If we
initialize IOTLB in vhost_user_set_vring_num, it could happen that IOTLB
update comes when IOTLB pool of disabled queues are not initialized.

Fixes: 968bbc7e2e50 ("vhost: avoid IOTLB mempool allocation while IOMMU disabled")

Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


Revision tags: v21.05-rc3, v21.05-rc2
# eeded204 26-Apr-2021 David Marchand <[email protected]>

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
used in a component. It is associated to the default name provided
by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
while read file; do
pattern=${file##drivers/};
class=${pattern%%/*};
pattern=${pattern#$class/};
drv=${pattern%%/*};
case "$class" in
baseband) pattern=pmd.bb.$drv;;
bus) pattern=bus.$drv;;
mempool) pattern=mempool.$drv;;
*) pattern=pmd.$class.$drv;;
esac
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

$ git grep -l RTE_LOG_REGISTER lib/ |
while read file; do
pattern=${file##lib/};
pattern=lib.${pattern%%/*};
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

show more ...


# ca7036b4 03-May-2021 David Marchand <[email protected]>

vhost: fix offload flags in Rx path

The vhost library currently configures Tx offloading (PKT_TX_*) on any
packet received from a guest virtio device which asks for some offloading.

This is problem

vhost: fix offload flags in Rx path

The vhost library currently configures Tx offloading (PKT_TX_*) on any
packet received from a guest virtio device which asks for some offloading.

This is problematic, as Tx offloading is something that the application
must ask for: the application needs to configure devices
to support every used offloads (ip, tcp checksumming, tso..), and the
various l2/l3/l4 lengths must be set following any processing that
happened in the application itself.

On the other hand, the received packets are not marked wrt current
packet l3/l4 checksumming info.

Copy virtio rx processing to fix those offload flags with some
differences:
- accept VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP,
- ignore anything but the VIRTIO_NET_HDR_F_NEEDS_CSUM flag (to comply with
the virtio spec),

Some applications might rely on the current behavior, so it is left
untouched by default.
A new RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS flag is added to enable the
new behavior.

The vhost example has been updated for the new behavior: TSO is applied to
any packet marked LRO.

Fixes: 859b480d5afd ("vhost: add guest offload setting")
Cc: [email protected]

Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


# 873e8dad 27-Apr-2021 Cheng Jiang <[email protected]>

vhost: support packed ring in async datapath

For now async vhost data path only supports split ring. This patch
enables packed ring in async vhost data path to make async vhost
compatible with virti

vhost: support packed ring in async datapath

For now async vhost data path only supports split ring. This patch
enables packed ring in async vhost data path to make async vhost
compatible with virtio 1.1 spec.

Signed-off-by: Cheng Jiang <[email protected]>
Reviewed-by: Jiayu Hu <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>

show more ...


Revision tags: v21.05-rc1
# 678a91ef 20-Apr-2021 Jiayu Hu <[email protected]>

vhost: fix queue initialization

This patch allocates vhost queue by rte_zmalloc() to avoid
undefined values.

Fixes: a277c7159876 ("vhost: refactor code structure")
Cc: [email protected]

Signed-off-b

vhost: fix queue initialization

This patch allocates vhost queue by rte_zmalloc() to avoid
undefined values.

Fixes: a277c7159876 ("vhost: refactor code structure")
Cc: [email protected]

Signed-off-by: Jiayu Hu <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Tested-by: Yinan Wang <[email protected]>

show more ...


# 99a2dd95 20-Apr-2021 Bruce Richardson <[email protected]>

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
m

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
makes it awkward to add features referring to individual libraries in the
build - should the lib names be specified with or without the prefix.
Therefore, we can just remove the library prefix and use the library's
unique name as the directory name, i.e. 'eal' rather than 'librte_eal'

Signed-off-by: Bruce Richardson <[email protected]>

show more ...