History log of /dpdk/examples/vhost_blk/vhost_blk.c (Results 1 – 20 of 20)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1
# ae67f7d0 08-Oct-2024 Stephen Hemminger <stephen@networkplumber.org>

examples/vhost: fix free function mismatch

The pointer bdev is allocated with rte_zmalloc() and then
incorrectly freed with free() which will lead to pool corruption.

Bugzilla ID: 1553
Fixes: c19be

examples/vhost: fix free function mismatch

The pointer bdev is allocated with rte_zmalloc() and then
incorrectly freed with free() which will lead to pool corruption.

Bugzilla ID: 1553
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>

show more ...


Revision tags: v24.07, v24.07-rc4, v24.07-rc3, v24.07-rc2, v24.07-rc1
# 92e68d9c 14-May-2024 Tyler Retzlaff <roretzla@linux.microsoft.com>

examples: use stdatomic API

Replace the use of gcc builtin __atomic_xxx intrinsics with
corresponding rte_atomic_xxx optional rte stdatomic API.

Signed-off-by: Tyler Retzlaff <roretzla@linux.micros

examples: use stdatomic API

Replace the use of gcc builtin __atomic_xxx intrinsics with
corresponding rte_atomic_xxx optional rte stdatomic API.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>

show more ...


Revision tags: v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1, v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2, v23.11-rc1
# 6b6678a6 13-Sep-2023 Thomas Monjalon <thomas@monjalon.net>

examples: convert to normal control threads

Calls to rte_ctrl_thread_create() are replaced with
rte_thread_create_control().

In vhost_blk, the control thread is not forced
to be scheduled on core 0

examples: convert to normal control threads

Calls to rte_ctrl_thread_create() are replaced with
rte_thread_create_control().

In vhost_blk, the control thread is not forced
to be scheduled on core 0 anymore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>

show more ...


Revision tags: v23.07, v23.07-rc4, v23.07-rc3
# 62774b78 03-Jul-2023 Thomas Monjalon <thomas@monjalon.net>

set namespace prefix to threads

When looking at threads in a system, it can be confusing
to find some unknown threads without a clue it is started by DPDK.

Let's start all thread names with "dpdk-"

set namespace prefix to threads

When looking at threads in a system, it can be confusing
to find some unknown threads without a clue it is started by DPDK.

Let's start all thread names with "dpdk-"
plus the driver name if it comes from a driver.

One more constraint: the thread names are generally limited
to 16 characters, including the NUL character.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

show more ...


Revision tags: v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3, v23.03-rc2, v23.03-rc1, v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1
# 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 ...


Revision tags: v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1, v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1
# 06c047b6 09-Feb-2022 Stephen Hemminger <stephen@networkplumber.org>

remove unnecessary null checks

Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.

Remove redundant NULL pointer checks before free

remove unnecessary null checks

Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.

Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

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

show more ...


Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2
# ab4bb424 02-Nov-2021 Maxime Coquelin <maxime.coquelin@redhat.com>

vhost: rename driver callbacks struct

As previously announced, this patch renames struct
vhost_device_ops to struct rte_vhost_device_ops.

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

vhost: rename driver callbacks struct

As previously announced, this patch renames struct
vhost_device_ops to struct rte_vhost_device_ops.

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

show more ...


Revision tags: v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1
# 10aa3757 15-Apr-2021 Chengchang Tang <tangchengchang@huawei.com>

examples: add eal cleanup to examples

According to the programming guide, the rte_eal_init should be used pairs
with rte_eal_cleanup.

This patch add rte_eal_cleanup to examples to encourage new use

examples: add eal cleanup to examples

According to the programming guide, the rte_eal_init should be used pairs
with rte_eal_cleanup.

This patch add rte_eal_cleanup to examples to encourage new users of
DPDK to use it.

Fixes: aec9c13c5257 ("eal: add function to release internal resources")
Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: c5eebf85badc ("examples/ntb: add example for NTB")
Fixes: b77f66002812 ("examples/pipeline: add new example application")
Fixes: edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA")
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>

show more ...


# e5fb1a96 17-Apr-2021 Chengwen Feng <fengchengwen@huawei.com>

examples/vhost_blk: set control worker thread name

This patch supports set ctrl worker thread name which is helpful for
debugging.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-

examples/vhost_blk: set control worker thread name

This patch supports set ctrl worker thread name which is helpful for
debugging.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>

show more ...


# 510f43fc 22-Mar-2021 Keiichi Watanabe <keiichiw@chromium.org>

examples/vhost_blk: check features before inflight API

Avoid calling rte_vhost_get_vhost_ring_inflight() and
rte_vhost_get_vring_base_from_inflight() when
VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD is not

examples/vhost_blk: check features before inflight API

Avoid calling rte_vhost_get_vhost_ring_inflight() and
rte_vhost_get_vring_base_from_inflight() when
VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD is not set.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


Revision tags: v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1
# 96d1d898 21-Dec-2020 Joyce Kong <joyce.kong@arm.com>

examples/vhost_blk: replace SMP barrier with thread fence

Simply replace the rte_smp_mb barriers with SEQ_CST atomic thread fence,
if there is no load/store operations.

Signed-off-by: Joyce Kong <j

examples/vhost_blk: replace SMP barrier with thread fence

Simply replace the rte_smp_mb barriers with SEQ_CST atomic thread fence,
if there is no load/store operations.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

show more ...


Revision tags: v20.11, v20.11-rc5, v20.11-rc4
# 9c3586a6 14-Nov-2020 David Marchand <david.marchand@redhat.com>

examples/vhost_blk: fix build with pkg-config

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’
[-Wimplicit-function-declaration]
543

examples/vhost_blk: fix build with pkg-config

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’
[-Wimplicit-function-declaration]
543 | CPU_ZERO(&cpuset);
| ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
544 | CPU_SET(0, &cpuset);
| ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to `CPU_ZERO'
/usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to
`CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1

Explicitly pass _GNU_SOURCE and include missing headers (rather than
rely on automagic inclusion from other system headers).

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


Revision tags: v20.11-rc3, v20.11-rc2, v20.11-rc1
# dc9e6580 25-Sep-2020 Yunjian Wang <wangyunjian@huawei.com>

examples/vhost_blk: check driver start failure

This checks the return value from the function
rte_vhost_driver_start.

Coverity issue: 362027
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhos

examples/vhost_blk: check driver start failure

This checks the return value from the function
rte_vhost_driver_start.

Coverity issue: 362027
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

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

show more ...


Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1, v20.05, v20.05-rc4, v20.05-rc3
# e2b4cfd6 15-May-2020 Jin Yu <jin.yu@intel.com>

examples/vhost_blk: fix not null-terminated buffer

In vhost_blk_bdev_construct: The string buffer may not have
a null terminator if the source string's length is equal to
the buffer size.

Fixes: 91

examples/vhost_blk: fix not null-terminated buffer

In vhost_blk_bdev_construct: The string buffer may not have
a null terminator if the source string's length is equal to
the buffer size.

Fixes: 91d3e2d42997 ("examples/vhost_blk: refactor to increase readability")

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

show more ...


Revision tags: v20.05-rc2
# 91d3e2d4 30-Apr-2020 Jin Yu <jin.yu@intel.com>

examples/vhost_blk: refactor to increase readability

Refactor the code and make it easier to read. It's
useful for understanding the inflight APIs and how
packed ring works. Update the RST because t

examples/vhost_blk: refactor to increase readability

Refactor the code and make it easier to read. It's
useful for understanding the inflight APIs and how
packed ring works. Update the RST because the packed
ring patch has been merged to QEMU master and ring_packed
parameter changes to packed.

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


Revision tags: v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2
# be848992 05-Feb-2020 Timothy Redaelli <tredaelli@redhat.com>

examples/vhost_blk: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fi

examples/vhost_blk: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

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

show more ...


# 71dd2870 12-Feb-2020 Jin Yu <jin.yu@intel.com>

examples/vhost_blk: fix check of device path

Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn

examples/vhost_blk: fix check of device path

Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
it's ok to ignore. The second one is that unlink fails to remove
file but the next bind() would fail too.

Coverity issue: 350589, 158663
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


Revision tags: v20.02-rc1, v19.11
# 1da2925f 27-Nov-2019 Jin Yu <jin.yu@intel.com>

examples/vhost_blk: check unused value on init

Add the assert to handle error.

Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

examples/vhost_blk: check unused value on init

Add the assert to handle error.

Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...


Revision tags: v19.11-rc4, v19.11-rc3, v19.11-rc2
# 06710448 11-Nov-2019 Stephen Hemminger <stephen@networkplumber.org>

remove blank lines at end of file

Remove trailing blank lines. They serve no purpose and are just
editor leftovers.
These can cause git to complain about whitespace errors during merges.

Signed-off

remove blank lines at end of file

Remove trailing blank lines. They serve no purpose and are just
editor leftovers.
These can cause git to complain about whitespace errors during merges.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# c19beb3f 04-Nov-2019 Jin Yu <jin.yu@intel.com>

examples/vhost_blk: introduce vhost storage sample

A Vhost-blk example that support inflight feature. It uses the
new APIs that introduced in the first patch, so it can show how these
APIs work to s

examples/vhost_blk: introduce vhost storage sample

A Vhost-blk example that support inflight feature. It uses the
new APIs that introduced in the first patch, so it can show how these
APIs work to support inflight feature.

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

show more ...