Commit Graph

33095 Commits

Author SHA1 Message Date
Matan Azrad
60b254e392 net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).

In MPRQ case, also the local consumed strd variable should be reset.

CVE-2022-28199
Fixes: 88c0733535 ("net/mlx5: extend Rx completion with error handling")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
2022-08-29 12:53:49 +02:00
Dmitry Kozlyuk
7ccd05e7b7 build: enable developer mode for all working trees
Developer mode was detected if `.git` was a directory.
Linked git working trees created by `git worktree add`
contain `.git` file instead of `.git` directory.
Developer mode was not detected for such directories.
Detect developer mode by the presence of `.git` path.

Fixes: bc46174338 ("build: enable a developer mode setting")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-29 12:53:49 +02:00
Cristian Dumitrescu
af00c9352e pipeline: fix code generation for recirculation ID
The "offset" and "n_bits" fields were generated incorrectly, hence the
output C file was producing compilation errors when the "recircid"
instruction was used.

Fixes: 5ec76d29dc ("pipeline: support packet recirculation")
Cc: stable@dpdk.org

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-08-29 12:14:03 +02:00
David Marchand
09521b1cbe test: invoke all telemetry commands
Try and call all possible telemetry commands.
Each commands is tested with no argument, 0 (for command that accepts
a single integer like for a port identifier) and z (to catch commands
not properly validating input).
Fake cryptodev, dmadev, ethdev, eventdev and rawdev devices are created
using dummy drivers.

Output of the commands is not checked, the point of this test is mainly
to catch simple issues and leaks (when coupled with ASan in the CI).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-08-25 16:23:17 +02:00
David Marchand
3e88909dfe test: load drivers using build directory
Since commit 49b536fc30 ("eal: load only shared libs from driver ..."),
we can specify a build directory to the -d option.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-08-25 16:23:17 +02:00
Marcin Danilewicz
a61b319674 sched: enable congestion management at runtime
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.

By default CMAN code is enabled but not in use, when
there is no RED or PIE profile configured.

Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2022-08-25 16:18:06 +02:00
David Marchand
72206323a5 version: 22.11-rc0
Start a new release cycle with empty release notes.

The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and
a note has been added in libabigail.abignore as a reminder.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-21 12:13:48 +02:00
Thomas Monjalon
4fceceed5b version: 22.07.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-17 14:58:00 +02:00
Shijith Thotton
97deb79dc5 doc: announce change in event queue configuration
Structure rte_event_queue_conf will be extended to include fields to
support weight and affinity attribute. Once it gets added in DPDK 22.11,
eventdev internal op, queue_attr_get can be removed.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2022-07-17 14:53:41 +02:00
Pavan Nikhilesh
a07b740f01 doc: announce changes to event vector structure
The structure ``rte_event_vector`` will be modified to include
``elem_offset:12`` bits taken from ``rsvd:15``.
The ``elem_offset`` defines the offset into the vector array from
which valid elements are present.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2022-07-17 14:47:26 +02:00
Pavan Nikhilesh
ceebbf3edb doc: announce change in event vector structure
The field `*u64s` in the structure `rte_event_vector` will
be replaced with `u64s`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
2022-07-17 14:44:55 +02:00
Pavan Nikhilesh
f65f421bc4 doc: announce renaming of eventdev stop flush callback
Stop flush callback is missing `rte_` prefix
and might conflict with application declarations.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2022-07-17 14:23:45 +02:00
Naga Harish K S V
95ec0dc9ee doc: announce event timer expiry drop count
The structure ``rte_event_timer_adapter_stats`` will be
extended by adding a new field ``evtim_drop_count``.
This stat will represent the number of times an event_timer expiry event
is dropped by the event timer adapter.

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Reviewed-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2022-07-17 13:42:16 +02:00
Volodymyr Fialko
d06be601e9 doc: announce change in crypto adapter queue add
The function `rte_event_crypto_adapter_queue_pair_add` will accept
`rte_event_crypto_adapter_queue_conf` argument instead of `rte_event`.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-07-17 13:31:27 +02:00
Srujana Challa
2aaab75406 doc: announce extension of crypto event callback
The function rte_cryptodev_cb_fn prototype will be extended
to add a new parameter qp_id, to return queue pair ID,
which got error interrupt to the application,
so that application can reset that particular queue pair.

https://mails.dpdk.org/archives/dev/2022-June/245428.html

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-07-17 12:48:15 +02:00
Akhil Goyal
99188c8aea doc: announce MACsec support in security library
MACsec support is planned for DPDK 22.11, which would
result in ABI breakage in some of the rte_security structures.
This patch is to give deprecation notice for the affected structures.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-07-17 12:05:38 +02:00
Vamsi Attunuru
9f166d8dd8 doc: announce addition of IPsec expiry events
New event subtypes need to be added for notifying expiry events
upon reaching IPsec SA soft packet expiry and hard packet/byte
expiry limits. This would be added in DPDK 22.11.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-17 12:05:38 +02:00
Nicolas Chautru
bc6e6bcbf5 doc: announce changes in bbdev related to enum extension
Intent to resolve in DPDK 22.11 historical usage which prevents
graceful extension of enum and API without troublesome ABI breakage
as well as extending API RTE_BBDEV_OP_FFT for new operation type
in bbdev as well as other new members in existing structures.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-07-17 11:43:32 +02:00
Xuan Ding
91ee0051a1 doc: announce header split deprecation
RTE_ETH_RX_OFFLOAD_HEADER_SPLIT offload was introduced some time ago to
substitute bit-field header_split in struct rte_eth_rxmode. It allows
to enable per-port header split offload with the header size controlled
using split_hdr_size in the same structure.

Right now, no single PMD actually supports RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
with above definition. Many examples and test apps initialize the field
to 0 explicitly. The most of drivers simply ignore split_hdr_size since
the offload is not advertised, but some double-check that its value is 0.

So the RTE_ETH_RX_OFFLOAD_HEADER_SPLIT and split_header_size field
will be removed in DPDK 22.11. After DPDK 22.11 LTS, the
RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT can still be used for per-queue Rx
packet split offload, which is configured by rte_eth_rxseg_split.

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-16 23:30:55 +02:00
Satha Rao
bafd6bbc08 doc: announce change to ethdev queue rate limit API
rte_eth_set_queue_rate_limit argument rate will be modified to uint32_t
to support more than 64Gbps.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-16 20:04:51 +02:00
Veerasenareddy Burru
cb41c62312 doc: announce renaming of octeontx_ep driver
To enable single unified driver to support current OcteonTx and
future Octeon PCI endpoint NICs, octeontx_ep driver will be renamed
to octeon_ep to reflect common driver for all Octeon based
PCI endpoint NICs.

Signed-off-by: Veerasenareddy Burru <vburru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-16 19:34:50 +02:00
David Marchand
3ece403bf0 doc: announce some ifpga API removal
rte_pmd_ifpga_get_pci_bus() documentation is vague and it is unclear
what could be done with it.
On the other hand, EAL provides a standard API to retrieve a bus object
by name.

Announce removal of this driver specific API for v22.11.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Wei Huang <wei.huang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-16 18:55:08 +02:00
Gagandeep Singh
10f0e51554 doc: announce removal of DPAA2 cmdif raw driver
dpaa2_cmdif raw driver is no longer in use,
so it will be removed in v22.11

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-07-16 18:43:36 +02:00
Bruce Richardson
ce52f742c8 doc: announce restrictions in telemetry naming
Following discussion on-list [1], we will look to limit the allowed
characters in names for items in telemetry. This will simplify the
escaping needed for JSON output, or any future output formats. The lists
will initially be minimal, since expansion to allow more characters can
be done without affecting compatibility, while reducing the set cannot.

[1] http://inbox.dpdk.org/dev/20220623164245.561371-1-bruce.richardson@intel.com/#r

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2022-07-15 18:30:06 +02:00
David Marchand
cf905d31df doc: announce marking device and driver objects as internal
rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
Announce that they will be made opaque in the public API and mark
associated API as internal.
This impacts all bus, as their driver registration mechanism will be
made internal.

Note: the PCI bus had a similar deprecation notice that we can remove as
the new one is more generic.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-15 18:21:00 +02:00
David Marchand
c02e52019f doc: announce marking bus object as internal
rte_bus is unnecessarily exposed in the public API/ABI.
Besides, we had cases where extending rte_bus was necessary.
Announce that rte_bus will be made opaque in the public API and mark
associated API as internal.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-15 18:20:32 +02:00
Olivier Matz
8f14c36559 doc: announce behavior change for device NUMA node field
In case NUMA node of a device is unknown,
the default value must be consistently -1.

Link: https://patches.dpdk.org/project/dpdk/patch/20211026090610.10823-1-houssem.bouhlel@6wind.com/

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-07-15 18:06:55 +02:00
Ferruh Yigit
4608927edf doc: announce KNI deprecation
Announce the deprecation plan for KNI kernel module, library, PMD
and example.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-07-15 17:37:51 +02:00
John McNamara
3dee77b662 doc: update release notes for 22.07
Fix grammar, spelling and formatting of DPDK 22.07 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-15 15:30:11 +02:00
Maxime Coquelin
16b2977562 vhost: fix missing copy length in batched copies
This patch fixes missing the assignment of the copy length
when doing batched copies in the sync dequeue path.

Fixes: cd79d1b030 ("vhost: fix unnecessary dirty page logging")

Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
2022-07-14 15:47:30 +02:00
Veerasenareddy Burru
b3c781dbde maintainers: update for octeontx_ep driver
Remove Nalla Pradeep as co-maintainer of octeontx_ep driver.
Add Sathesh Edara as co-maintainer of octeontx_ep driver.

Signed-off-by: Veerasenareddy Burru <vburru@marvell.com>
2022-07-13 13:49:33 +02:00
Thomas Monjalon
0697bd8dd2 version: 22.07-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-11 23:52:51 +02:00
Lingli Chen
bc49b2e482 doc: add tested Intel platforms with Intel NICs
Add tested Intel platforms with Intel NICs to v22.07 release note.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
2022-07-11 23:43:56 +02:00
Raslan Darawsheh
2bc8721a1e doc: add tested platforms with NVIDIA NICs
Add tested platforms with NVIDIA NICs to the 22.07 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2022-07-11 23:40:43 +02:00
Raslan Darawsheh
7b61f14edb doc: update NVIDIA devices in mlx5 guides
This updates the doc to include new supported devices like ConnectX-7,
and updates the description of older ones.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-07-11 23:32:56 +02:00
Timothy McDaniel
0b807b526f event/dlb2: improve CQ weight error messages
This commit changes 2 error messages to better
describe cq_weight related errors, should one occur.

Fixes: ffa46fc4a2 ("event/dlb2: support CQ weight")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
2022-07-11 22:29:39 +02:00
Timothy McDaniel
d0e3744b01 event/dlb2: fix CQ weight array overflow
The cq_weight array must be sized for the maximum number
of eventdev ports, not the maximum number of DLB2
load balanced ports.

This commit fixes the above array sizing bug and resultant
coverity warning.

Coverity issue: 379234
Fixes: ffa46fc4a2 ("event/dlb2: support CQ weight")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
2022-07-11 22:29:27 +02:00
Jiawei Wang
2545059457 doc: add IP ECN rewrite requirements to mlx5 guide
This patch updates the mlx5 notes for IPv4/IPv6 ECN field
rewrite offload.

Fixes: c4e442fa4c ("ethdev: add IPv4/IPv6 ECN header rewrite action")
Fixes: 097d84a42a ("common/mlx5: check ECN modification capability")
Fixes: 76d5756122 ("net/mlx5: support modifying ECN field")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Asaf Penso <asafp@nvidia.com>
2022-07-11 22:29:25 +02:00
Huisong Li
b7e77411a7 app/testpmd: fix RSS types display
Now testpmd fails to display types when query RSS rule. The failure is
because the '\n' character is missing at the end of the function
'rss_config_display()'.
Actually, all places calling 'xxx_types_display()' need to '\n'. So this
patch moves '\n' to the inside of these function.

Bugzilla ID: 1048
Fixes: 534988c490 ("app/testpmd: unify RSS types display")
Fixes: 44a37f3cff ("app/testpmd: compact RSS types output")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Tested-by: Weiyuan Li <weiyuanx.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-07-08 12:28:38 +02:00
Jasvinder Singh
e1673dde51 app/testpmd: fix memory leak for DSCP table
Fix memory leak reported by Coverity.

Coverity issue: 379220
Fixes: 9f5488e326 ("app/testpmd: support different input color method")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-07 14:38:33 +02:00
Gregory Etelson
a942222d56 app/testpmd: fix GTP PSC raw processing
Fix GTP PSP extension size initialization.
Clear input buffer.

Fixes: c65282c9aa ("app/testpmd: fix GTP PSC raw processing")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-07 13:24:08 +02:00
Kevin Liu
85bc4dc6ce net/i40e: disable QinQ by default
Previously, QinQ is enabled by default and can't be disabled,
but there'll be performance drop if QinQ is enabled.

So, disabled QinQ by default and also updated the knowing VLAN
issue with this configure.

Fixes: 5bd74df1db ("net/i40e: fix QinQ enablement")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2022-07-08 02:46:15 +02:00
Wenxuan Wu
755fd7b22d net/iavf: fix GTP-U extension flow
Due to the change of struct rte_gtp_psc_generic_hdr, kernel driver can
not handle gtp_psc properly, we introduce a new structure to fix this
gap between kernel driver and struct rte_gtp_psc_generic_hdr.

Fixes: d5eb3e600d ("net/iavf: support flow director basic rule")
Cc: stable@dpdk.org

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2022-07-07 09:11:03 +02:00
Abhimanyu Saini
d9a1ef20f0 vdpa/sfc: resolve race between vhost lib and device conf
libvhost calls dev_conf() before prosessing the
VHOST_USER_SET_VRING_CALL message for the last VQ. So
this message is processed after dev_conf() returns.

However, the dev_conf() function spawns a thread to set
rte_vhost_host_notifier_ctrl() before returning control to
libvhost. This parallel thread in turn invokes get_notify_area().
To get the notify_area, the vdpa driver needs to query the HW and
for this query it needs an enabled VQ.

But at the same time libvhost is processing the last
VHOST_USER_SET_VRING_CALL, and to do that it disables the last VQ.

Hence there is a race b/w the libvhost and the vdpa driver.

To resolve this race condition, query the HW and cache notify_area
inside dev_conf() instead of doing it the parallel thread.

Fixes: 630be406dc ("vdpa/sfc: get queue notify area info")
Cc: stable@dpdk.org

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-08 12:38:36 +02:00
Andy Pei
60600018d3 vdpa/ifc/base: fix null pointer dereference
Fix null pointer dereference reported in coverity scan.
Output some log information when lm_cfg is null.
Make sure lm_cfg is not null before operate on lm_cfg.

Coverity issue: 378882
Fixes: d7fe5a2861 ("net/ifc: support live migration")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-08 11:16:45 +02:00
Xuan Ding
cd79d1b030 vhost: fix unnecessary dirty page logging
The dirty page logging is only required in vhost enqueue direction for
live migration. This patch removes the unnecessary dirty page logging
in vhost dequeue direction. Otherwise, it will result in a performance
drop. Some if-else judgements are also optimized to improve performance.

Fixes: 6d823bb302 ("vhost: prepare sync for descriptor to mbuf refactoring")
Fixes: b6eee3e834 ("vhost: fix sync dequeue offload")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Xingguang He <xingguang.he@intel.com>
2022-07-08 11:15:32 +02:00
Cheng Jiang
e179bbee80 doc: add release notes for async vhost dequeue datapath
Add release notes for asynchronous vhost dequeue data-path. Emphasize
that split virtqueue and packed virtqueue are both supported in
asynchronous vhost dequeue data-path.

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-07-08 11:15:32 +02:00
David Marchand
ea2810fc21 vdpa/mlx5: fix leak on event thread creation
As stated in the manual, pthread_attr_init return value should be
checked.
Besides, a pthread_attr_t should be destroyed once unused.

In practice, we may have no leak (from what I read in glibc current code),
but this may change in the future.
Stick to a correct use of the API.

Fixes: 5cf3fd3af4 ("vdpa/mlx5: add CPU core parameter to bind polling thread")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-07-08 11:15:32 +02:00
Bruce Richardson
ac847b437c doc: add reference to virtio-user from KNI guide
To help encourage use of virtio-user in place of KNI, put a reference to
the relevant howto section at the top of the KNI doc.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-08 11:15:32 +02:00
Bruce Richardson
99c58d238d doc: add code example for virtio-user exception path
The HOWTO guide for using virtio-user as an exception path to the kernel
only provided an example of how testpmd may be used for that purpose.
However, a real application wanting to use virtio-user as exception path
would likely want to create such devices from code within the app
itself. Therefore, we update the doc with instructions and a code
snippet showing how this may be done.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-08 11:15:11 +02:00