Abhimanyu Saini [Tue, 28 Jun 2022 05:29:26 +0000 (10:59 +0530)]
vdpa/sfc: fix sync between QEMU and vhost-user
When DPDK app is running in the VF, it sometimes rings the doorbell
before dev_config has had a chance to complete and hence it misses
the event. As workaround, ring the doorbell when vDPA reports the
notify_area to QEMU.
Fixes: 630be406dcbf ("vdpa/sfc: get queue notify area info") Cc: stable@dpdk.org Signed-off-by: Vijay Kumar Srivastava <vsrivast@xilinx.com> Signed-off-by: Abhimanyu Saini <absaini@amd.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Yuan Wang [Mon, 27 Jun 2022 05:51:25 +0000 (13:51 +0800)]
net/vhost: fix deadlock on vring state change
If vring state changes after pmd starts working, the locked vring
notifies pmd, thus calling update_queuing_status(), the latter
will wait for pmd to finish accessing vring, while pmd is also
waiting for vring to be unlocked, thus causing deadlock.
Actually, update_queuing_status() only needs to wait while
destroy/stopping the device, but not in other cases.
This patch adds a flag for whether or not to wait to fix this issue.
Yuan Wang [Wed, 22 Jun 2022 09:25:55 +0000 (17:25 +0800)]
examples/vhost: fix retry logic on Rx path
drain_eth_rx() uses rte_vhost_avail_entries() to calculate
the available entries to determine if a retry is required.
However, this function only works with split rings, and
calculating packed rings will return the wrong value and cause
unnecessary retries resulting in a significant performance penalty.
This patch fix that by using the difference between tx/rx burst
as the retry condition.
Fixes: be800696c26e ("examples/vhost: use burst enqueue and dequeue from lib") Cc: stable@dpdk.org Signed-off-by: Yuan Wang <yuanx.wang@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Tested-by: Wei Ling <weix.ling@intel.com>
Andy Pei [Wed, 22 Jun 2022 07:47:08 +0000 (15:47 +0800)]
vhost: fix virtio block vDPA live migration IO drop
In the virtio blk vDPA live migration use case, before the live
migration process, QEMU will set call fd to vDPA back-end. QEMU
and vDPA back-end stand by until live migration starts.
During live migration process, QEMU sets kick fd and a new call
fd. However, after the kick fd is set to the vDPA back-end, the
vDPA back-end configures device and data path starts. The new
call fd will cause some kind of "re-configuration", this kind
of "re-configuration" cause IO drop.
After this patch, vDPA back-end configures device after kick fd
and call fd are well set and make sure no IO drops.
This patch only impact virtio blk vDPA device and does not impact
net device.
Fixes: 7015b6577178 ("vdpa/ifc: add block device SW live-migration") Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Wed, 22 Jun 2022 01:45:56 +0000 (01:45 +0000)]
doc: clean vhost async note
This patch moves the 'Recommended IOVA mode in async datapath'
section under 'Vhost asynchronous data path' as a sub-section,
which makes the doc cleaner.
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>
Andy Pei [Tue, 21 Jun 2022 13:46:31 +0000 (21:46 +0800)]
vdpa/ifc: fix vhost message size check
For vhost message VHOST_USER_GET_CONFIG, we do not check
payload size in vhost lib, we check payload size in driver
specific ops.
For ifc vdpa driver, we just need to make sure payload size
is not smaller than sizeof(struct virtio_blk_config).
Fixes: 856d03bcdc54 ("vdpa/ifc: add block operations") Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Tue, 21 Jun 2022 07:21:31 +0000 (07:21 +0000)]
doc: add vhost async enqueue API usage
This patch updates the correct usage for async enqueue APIs.
The rte_vhost_poll_enqueue_completed() needs to be
called in time to notify the guest of completed packets and
avoid packet loss.
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Yuan Wang [Fri, 17 Jun 2022 02:42:29 +0000 (10:42 +0800)]
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.
Long Li [Wed, 29 Jun 2022 23:29:44 +0000 (16:29 -0700)]
net/netvsc: fix vmbus device reference in multi-process
The vmbus device is allocated via "calloc" before the EAL memory is
initialized. The secondary process can't reference the vmbus device as
it is not mapped correctly in the shared memory region.
Replace all references to the vmbus device (and its contents) with the
pointers/contents set by the primary process.
Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org Signed-off-by: Long Li <longli@microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Wed, 29 Jun 2022 08:34:51 +0000 (16:34 +0800)]
app/testpmd: remove duplicated flow type name table
Flow type table has two instance, one is used for flow type to string
conversion, and other is used for string to flow type conversion.
And tables are diverged by time.
Unifying tables to prevent maintaining two different tables.
Note: made 'flowtype_to_str()' and 'str_to_flowtype()' non-static to
prevent build error for the case PMDs using it disables. Making the two
functions generic, not for some PMDs.
Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com> Signed-off-by: Huisong Li <lihuisong@huawei.com>
Huisong Li [Wed, 29 Jun 2022 08:34:50 +0000 (16:34 +0800)]
app/testpmd: reorder RSS type table
There are group and individual types in rss_type_table[]. However, group
types are very scattered, and individual types are not arranged based on
the bit number order in 'RTE_ETH_RSS_xxx'. For a clear distribution of
types and better maintenance, this patch reorders this table.
Signed-off-by: Huisong Li <lihuisong@huawei.com> Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Ferruh Yigit [Wed, 29 Jun 2022 08:34:49 +0000 (16:34 +0800)]
app/testpmd: compact RSS types output
In port info command output, 'show port info all', supported RSS offload
types printed one type per line, and although this information is not
most important part of the command it takes big part of the command
output.
In port RSS hash and flow RSS command output, 'show port 0 rss-hash',
and 'flow query 0 0 rss', all enabled RSS types are printed on one line.
If there are many types, the print will be very long.
Compacting these RSS offloads and types output by fixing the length of
the character string printed on each line, instead of one per line or
one line.
Output becomes as following:
Huisong Li [Wed, 29 Jun 2022 08:34:47 +0000 (16:34 +0800)]
app/testpmd: refactor config all RSS command
The "port config <port_id> rss-hash-key" and "show port <port_id>
rss-hash key" commands both use the 'rss_type_table[]' to get
'rss_types' or the RSS type name. So this patch uses the
'rss_type_table[]' to get the RSS types. In this way, this command
naturally supports more individual types.
Huisong Li [Wed, 29 Jun 2022 08:34:45 +0000 (16:34 +0800)]
app/testpmd: unify name of L2 payload offload
Currently, the "port config all rss xx" command uses 'ether' name to match
and to set 'RTE_ETH_RSS_L2_PAYLOAD' offload. However, others RSS command,
such as, "port config <port_id> rss-hash-key" and "show port <port_id>
rss-hash key", use 'l2-payload' to represent this offload. So this patch
unifies the name of 'RTE_ETH_RSS_L2_PAYLOAD' offload.
Signed-off-by: Huisong Li <lihuisong@huawei.com> Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Huisong Li [Wed, 29 Jun 2022 08:34:44 +0000 (16:34 +0800)]
app/testpmd: fix supported RSS offload display
The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of
RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to
dev_info->flow_type_rss_offloads. testpmd will display "user defined 63"
when run 'show port info 0'. Because testpmd use flowtype_to_str()
to display the supported RSS offload of PMD. In fact, the function is
used to display flow type in FDIR commands for i40e or ixgbe. This patch
uses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD.
Fixes: b12964f621dc ("ethdev: unification of RSS offload types") Cc: stable@dpdk.org Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Fix cos initialization, handling the default case too.
Substitute the semicolon for the comma
that was expected in the cos_bw command line override.
Commas are not allowed within a multi field option.
The new format is cos_bw=%d:%d:%d:%d, where the sum of
the 4 decimal values must be less than or equal to 100.
Corrected probe-time initialization order.
Fixes: bec8901bfe9f ("event/dlb2: support ldb port specific COS") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
This commit fixes a bug, where we could encounter a credit
deadlock due to changing the CQ depth. To remedy this situation,
the commit reduces the maximum CQ depth from 1024 to 128,
and also allows configuring the maximum enqueue depth. Maximum
enqueue depth must be tuned to the CQ depth, if the CQ depth
is increased.
Fixes: 86fe66d45667 ("event/dlb2: allow CQ depths up to 1024") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
This commit fixes a bug, where we could assign a CQ depth
of zero, leading to a subsequent divide-by-zero fault.
It also fixes an issue where the original default CQ depth
was returned on a query, instead of the overridden value.
Fixes: 86fe66d45667 ("event/dlb2: allow CQ depths up to 1024") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
This commit fixes a segfault that resulted from reading
beyond the end of the port_cos array. The root cause was using
the DLB num ports define instead of the eventdev num ports define.
Fixes: bec8901bfe9f ("event/dlb2: support ldb port specific COS") Cc: stable@dpdk.org Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Add spinlock protection in queue delete function.
This protects the data path while the queue delete operation
is in progress.
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Cc: stable@dpdk.org Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
This commit removes any references to the old QAT
driver location 01.org in the documentation and
replaces them with the updated location IDZ (Intel
Development Zone).
This commit also adds a note to the docs to alert
users of a possible error when building the new QAT
driver and provides the patch needed to resolve this
error.
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Jakub Poczatek [Wed, 1 Jun 2022 09:35:52 +0000 (09:35 +0000)]
doc: fix grammar and parameters in l2fwd-crypto guide
Doc was updated with fixed grammar in most cases. These
include adding periods to ends of sentences and capitalizing
some words. Some instances of "a" were changed to "an". The
option "-n 4" has also been removed from the example of
running the application.
Fixes: ba7b86b1419 ("doc: add l2fwd-crypto sample app guide") Fixes: 2661f4fbe93 ("examples/l2fwd-crypto: add AEAD parameters") Fixes: 4790f99d2d3 ("examples/l2fwd-crypto: use cryptodev algorithm parser") Fixes: 5949e30dae6 ("doc: fix typo in l2fwd-crypto usage") Fixes: acf8616901b ("cryptodev: add auth IV") Fixes: b79e4c00af0 ("cryptodev: use AES-GCM/CCM as AEAD algorithms") Fixes: d2797f51cc6 ("examples/l2fwd-crypto: add cryptodev mask option") Fixes: e2a94f9ad3e ("doc: remove references to make from apps guide") Fixes: 10b9d471a6f ("doc: update minimum requirement of l2fwd-crypto") Fixes: 3cc28001a33 ("doc: fix typo in l2fwd-crypto guide") Cc: stable@dpdk.org Signed-off-by: Jakub Poczatek <jakub.poczatek@intel.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
Rebecca Troy [Wed, 29 Jun 2022 16:10:36 +0000 (16:10 +0000)]
crypto/qat: fix DOCSIS crash
Currently if AES or DES algorithms fail for DOCSIS test suite,
a segmentation fault occurs when cryptodev_qat_autotest is ran.
This is due to a duplicate call of EVP_CIPHER_CTX_free for the
session context. Ctx is freed firstly in the bpi_cipher_ctx_init
function and then again at the end of qat_sym_session_configure_cipher
function.
This commit fixes this bug by removing the first instance
of EVP_CIPHER_CTX_free, leaving just the dedicated function in
the upper level to free the ctx.
Anoob Joseph [Mon, 27 Jun 2022 08:12:33 +0000 (13:42 +0530)]
crypto/cnxk: decrement ESN to be used in session
ESN provided in the session would be the next sequence number to be
used. Hence predecrement the value, so that in datapath, incremented
value will be as expected.
Tejasree Kondoj [Thu, 23 Jun 2022 18:19:47 +0000 (23:49 +0530)]
test/crypto: add additional stream cipher cases
Added ZUC, SNOW3G and AES-CTR-CMAC auth-cipher
test vectors with same auth and cipher offsets
and total digest data encrypted.
Existing tests have different cipher and
auth offsets and partial or no digest encrypted.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com> Acked-by: Ciara Power <ciara.power@intel.com>
Ciara Power [Thu, 23 Jun 2022 14:42:49 +0000 (14:42 +0000)]
test/crypto: fix ZUC vector IV format
Some authentication and cipher IV formats were not following the spec [1].
For ZUC128 cipher IV, an 8 byte block is repeated,
with the last 3 bytes of each being 0x0.
IV[4] and IV[12] must have the last 2 bits set to 0.
Auth IVs must also have repeated bytes with the last 3 bytes
containing 0x0 in each 8 byte block.
IV[4] and IV[12] must have the last 3 bits set to 0.
IV[8] and IV[14] may have a flipped bit based on direction.
Ciara Power [Thu, 23 Jun 2022 14:31:42 +0000 (14:31 +0000)]
test/crypto: fix authentication IV for ZUC SGL
The wireless operation for ZUC SGL tests was being passed NULL instead
of a pointer to the test data authentication IV, and IV length 0.
This is now corrected to use the IV from the test data.
Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP") Cc: stable@dpdk.org Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Volodymyr Fialko [Wed, 22 Jun 2022 11:33:20 +0000 (13:33 +0200)]
test/security: add event inline IPsec cases
Enable ability to run inline security tests using event
API(rte_event_eth_tx_adapter_enqueue/rte_event_dequeue_burst).
New test command - event_inline_ipsec_autotest will run same list of
test cases as inline_ipsec_autotest, but packets will go through eventdev.
Somnath Kotur [Wed, 15 Jun 2022 14:57:03 +0000 (20:27 +0530)]
net/bnxt: fix check for autoneg enablement in the PHY FW
The current combination of checks to determine whether autoneg is
enabled in the card is a bit convoluted and may become incorrect
as well in the future as one of the fields being used - auto_link_speed
might become deprecated.
Switch to using the 'auto_mode' field obtained from the response of
HWRM_PHY_QCFG cmd as that is always deterministically set by the PHY
FW.
Fixed a bug in the 40G check to only look for the bit setting and
not the actual value.
Also, check the forced speeds first before trying to enforce the
auto speeds
Allow the user to set autoneg speed in all cases except for PAM4 200G
as PAM4 200G will come up only in forced mode.
Minor cleanup in bnxt_mtu_set_op() to move pre-mature
setting of jumbo flag post mtu check and remove
a redundant mtu set operation from rxq vnic configs.
Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: stable@dpdk.org Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
net/bnxt: disallow MTU change when device is started
With this patch, bnxt_mtu_set_op() will return an error code if the
device has already started. The user application will have to take
care to bring down device before invoking the mtu_set()
Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: stable@dpdk.org Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Wed, 15 Jun 2022 14:57:00 +0000 (20:27 +0530)]
net/bnxt: fix setting forced speed
The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response
does not return correct value till the link is up. Driver cannot
rely on active_fec_signal_mode while setting forced speed.
While setting forced speed of 50G/100G/200G, check if PAM4 speeds
are supported for the port first and then populate the HWRM request
accordingly.
Also, If PAM4 speed is supported, use PAM4 supported speed while
reporting speed capabilities.
Kalesh AP [Wed, 15 Jun 2022 14:56:58 +0000 (20:26 +0530)]
net/bnxt: reduce level of an Rx setup log
Broadcom HW drops packets when there are no descriptors available.
It does not matter what flag the application specifies in "rx_drop_en"
when configuring the Rx ring.
Reduce the verbosity of the log to print the status of the "rx_drop_en"
when configuring the Rx ring.
Ajit Khaparde [Wed, 15 Jun 2022 14:56:57 +0000 (20:26 +0530)]
net/bnxt: fix switch domain allocation
Allocate switch domain after the trusted VF capability is queried
from the FW. Currently we are calling the function earlier.
Since the switch domain is allocated only for PFs or trusted VF,
the current location of code fails to allocate the domain during init.
But during cleanup we try to free the domain incorrectly.
Fix the behavior by changing the sequence of function calls.
Somnath Kotur [Wed, 15 Jun 2022 14:56:56 +0000 (20:26 +0530)]
net/bnxt: remove assert for zero data length in Tx
Currently the PMD tries to detect a potential 0 byte DMA by
using RTE_VERIFY.
But since RTE_VERIFY internally calls rte_panic() it is fatal to
the application and some applications want to avoid that.
So return an error from the bnxt xmit handler if such a bad pkt is
encountered by logging an error message, dumping the pkt header and
dump the current stack as well
Ruifeng Wang [Mon, 13 Jun 2022 06:22:25 +0000 (14:22 +0800)]
net/bnxt: reduce barriers in NEON vector Rx
To read descriptors in expected order, barriers are inserted after each
descriptor read. The excessive use of barriers is unnecessary and could
cause performance drop.
Removed barriers between descriptor reads. And changed counting of valid
packets so as to handle discontinuous valid packets. Because out of
order read could lead to valid descriptors that fetched being
discontinuous.
In VPP L3 routing test, 6% performance gain was observed. The test was
done on a platform with ThunderX2 CPU and Broadcom PS225 NIC.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Dmitry Kozlyuk [Fri, 24 Jun 2022 13:19:54 +0000 (16:19 +0300)]
doc: add more instructions for running as non-root
The guide to run DPDK applications as non-root in Linux
did not provide specific instructions to configure the required access
and did not explain why each bit is needed.
The latter is important because running as non-root
is one of the ways to tighten security and grant minimal permissions.
Cc: stable@dpdk.org Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Dmitry Kozlyuk [Fri, 24 Jun 2022 13:19:53 +0000 (16:19 +0300)]
usertools: add options for hugetlbfs mount point owner
Per mount(8), the previous owner and mode of the mount point
become invisible as long as this filesystem remains mounted.
Because dpdk-hugepages.py must be run as root,
the new owner would be root.
This is undesirable if the hugepage directory is being set up
by the administrator for an unprivileged user.
HugeTLB filesystem has options to set the mount point owner.
Add --user/-U and --group/-G options to apply this when mounting.
The benefit of performing this in dpdk-hugepages.py
is that the user does not need to care about this detail
of mount command operation.
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Dmitry Kozlyuk [Fri, 24 Jun 2022 13:19:52 +0000 (16:19 +0300)]
usertools: add option for hugetlbfs directory
dpdk-hugepages.py had /dev/hugepages hardcoded as the mount point.
It may be desirable to setup hugepage directory at another path,
for example, when using hugepages of multiple sizes in different
directories or when granting different permissions to mount points.
Add --directory/-d option to the script.
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Wed, 16 Mar 2022 16:05:46 +0000 (16:05 +0000)]
doc: make doc roadmap common for Linux and BSD guides
Both the Linux and FreeBSD GSG docs had a "Documentation Roadmap"
section as part of the introduction page, and this contained the same
information, with only the reference to the GSGs themselves being
different. This text can be consolidated into a single text file which
is included by both GSG intro sections - using relative links for the
self reference.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Huisong Li [Fri, 24 Jun 2022 08:59:48 +0000 (16:59 +0800)]
net/hns3: fix statistics locking
The stats_lock is used to protect statistics update in stats APIs and
periodic task, but current code only protect queue related statistics.
Fixes: a65342d9d5d2 ("net/hns3: fix MAC and queues HW statistics overflow") Cc: stable@dpdk.org Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Huisong Li [Fri, 24 Jun 2022 08:59:47 +0000 (16:59 +0800)]
net/hns3: fix PTP interrupt logging
PMD driver will receive a PTP interrupt when receive a PTP packet.
But driver doesn't distinguish it. As a result, many unknown events
are printed when many PTP packets are received on the link. The PTP
interrupt is normal, so this patch doesn't log and ignores it.
Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP") Cc: stable@dpdk.org Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Huisong Li [Fri, 24 Jun 2022 08:59:46 +0000 (16:59 +0800)]
net/hns3: cancel heartbeat alarm when VF reset
The purpose of the heartbeat alarm is to keep alive for VF. The mailbox
channel is disabled when VF is reset, and the heartbeat mailbox message
will fail to send. If the reset is not complete, the error information
about the heartbeat sending failure will be printed continuously.
In fact, VF does set alive when VF restore its configuration. So the
heartbeat alarm can be canceled to prepare to start reset and start the
alarm when start service.
Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Chengwen Feng [Wed, 22 Jun 2022 03:09:57 +0000 (11:09 +0800)]
net/hns3: support backplane media type
The 802.11 physical PMA sub-layer defines three media: copper, fiber and
backplane. For PMD, the backplane is similar to the fiber, the main
differences are that backplane doesn't have optical module.
Because the interface of firmware fiber is also applicable to the
backplane, this patch supports the backplane only through simple
extension.
Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Huisong Li [Sat, 11 Jun 2022 07:42:26 +0000 (15:42 +0800)]
net/hns3: fix link status capability query from VF
Currently, the VF LSC capability is obtained from PF driver in
the interrupt mailbox interrupt thread, it is asynchronous.
The VF driver waits for 500ms to get this capability in probe
process.
The primary process will receive a message and do probe in the
interrupt thread context when attach a device in the secondary
process. At this case, VF driver never obtains this capability
from PF.
The root cause is that 'vf->pf_push_lsc_cap' is not updated by
the handling mailbox thread until finishing probe. The reason
this update wouldn't be done is that the handling mailbox interrupt
thread and the probe alarm thread are both in epool thread, and
the probe alarm thread is before the mailbox interrupt thread.
Fixes: 9bc2289fe5ea ("net/hns3: refactor VF LSC event report") Cc: stable@dpdk.org Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Gregory Etelson [Thu, 16 Jun 2022 09:15:35 +0000 (12:15 +0300)]
app/testpmd: fix flex parser destroy command
Separate flex item destruction function implementation.
Setups with installed JSON development library can use any value in
range [0, FLEX_MAX_PARSERS_NUM - 1] as input flex item ID.
In setups without JSON development library flex item destruction
function is resolved to empty stub.
Dmitry Kozlyuk [Wed, 15 Jun 2022 23:12:12 +0000 (02:12 +0300)]
app/testpmd: cleanup port resources after implicit close
When a port is closed implicitly by the PMD, for example,
if it is a representor port and its master port is detached,
flow indirect actions could remain with their handles no longer valid.
If a newly attached device is assigned the same ID as the closed port,
those indirect actions became accessible again.
Any attempt to use them resulted in an undefined behavior.
Flow flex items had no such issue on close, but had it on detach.
Introduce flush_port_owned_resources() function for consistent
cleanup and call it when a port is closed or detached.
Make it flush flow rules and multicast addresses too
because they logically belong to the port being removed.
Xiaoyun Li [Tue, 14 Jun 2022 09:10:13 +0000 (17:10 +0800)]
net/af_xdp: allow using copy mode in XSK
DPDK assumes that users only want AF_XDP socket (XSK) into zero copy
mode when the kernel supports it. However, sometimes kernel driver
doesn't support it well and copy mode is more stable and preferred.
This patch allows using devarg "-a xx:xx.x,force_copy=1" to force the
AF_XDP socket into copy mode.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Jin Liu [Thu, 23 Jun 2022 02:26:14 +0000 (04:26 +0200)]
net/nfp: add NFDk Tx
Implement NFP3800 card packet transmit function for firmware
with NFDk.
Signed-off-by: Jin Liu <jin.liu@corigine.com> Signed-off-by: Diana Wang <na.wang@corigine.com> Signed-off-by: Peng Zhang <peng.zhang@corigine.com> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Min Hu (Connor) [Mon, 6 Jun 2022 14:39:32 +0000 (22:39 +0800)]
app/procinfo: dump device private info
This patch adds support for dump the device private info
from a running application.
It can help developers locate a problem.
Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Subendu Santra [Wed, 25 May 2022 05:46:05 +0000 (22:46 -0700)]
app/procinfo: show all non-owned ports
Show all non-owned ports when no port mask is specified.
The show-port option, without the mask option,
was showing only the last non-owned port.
Show all the non-owned ports instead.
Fixes: 1dd6cffb6571 ("app/procinfo: provide way to request info on owned ports") Cc: stable@dpdk.org Signed-off-by: Subendu Santra <subendu@arista.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com>
rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and
rwc_perf_results->multi_rw are accessed at indexes
[0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index
overflows the array size in struct rwc_perf.
Wei Huang [Thu, 23 Jun 2022 03:11:40 +0000 (23:11 -0400)]
raw/ifpga: fix integer overflow for N3000
Expression "tx_chunks * ctx->dma_buf_size" in dma_fpga_to_fpga()
is evaluated using 32-bit arithmetic, which would overflow
potentially. Change tx_chunks to type "uint64_t" to avoid such
issue.
Bruce Richardson [Wed, 15 Jun 2022 17:10:12 +0000 (18:10 +0100)]
examples/l3fwd: add include for macro definition
The header files "l3fwd_em.h" and "l3fwd_em_sequential.h" use the
"__rte_always_inline" macro but don't directly include "rte_common.h" to
get the definition of it. This inclusion is not necessary for
compilation, but the lack of it can confuse some indexers - such as
those in eclipse, which reports the lines:
"static __rte_always_inline uint16_t"
as possible definitions of a variable called "uint16_t". This confusion
leads to uint16_t being flagged as an unknown type in all other parts of
the project being indexed, e.g. across all of DPDK code.
Adding in the include of rte_common.h makes it clear to the indexer that
those lines are part of a function definition, and that allows eclipse
to correctly recognise uint16_t as a type from stdint.h
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Thu, 23 Jun 2022 13:49:33 +0000 (14:49 +0100)]
dma/idxd: fix non-AVX builds with old compilers
When building without AVX2 support using an older compiler e.g. gcc 4.8
on Centos/RHEL 7, we get build errors due to the use of AVX2 intrinsics.
This is because the compiler does not support
"__attribute__((target(AVX2)))" function attribute. Disable build of
this driver such edge cases.
Generic builds using recent compilers, and all builds with a minimum
baseline of AVX2 are unaffected by this change.
Fixes: aa802b10237c ("dma/idxd: fix AVX2 in non-datapath functions") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Yu Jiang <yux.jiang@intel.com>
Bruce Richardson [Thu, 23 Jun 2022 13:49:32 +0000 (14:49 +0100)]
raw/ioat: fix build when ioat dmadev enabled
The build of the raw/ioat driver only occurs when the equivalent dmadev
drivers are disabled. Complications occur when the ioat dmadev is being
built but not the idxd. In this case, only the idxd part of raw/ioat
gets built, but the definition of the logtype is in the ioat part,
causing build errors.
.../raw_ioat_idxd_bus.c.o: In function `idxd_vdev_mmap_wq':
idxd_bus.c:(.text+0x116): undefined reference to `ioat_pmd_logtype'
Fix this by moving the logtype definition to the common C file, and
renaming it to avoid conflicts with a similarly named value in the
dma/ioat driver.