Commit Graph

25832 Commits

Author SHA1 Message Date
Thomas Monjalon
a655cbd5be devtools: fix build test config inheritance from env
The variables DPDK_MESON_OPTIONS, PATH, PKG_CONFIG_PATH,
CPPFLAGS, CFLAGS and LDFLAGS can be customized in the config file
loaded by devtools/load-devel-config at each build.
The configuration can be adjusted per target thanks to the value set
in the DPDK_TARGET variable.

PKG_CONFIG_PATH is specific to each target, so it must be empty
before configuring each build from the file according to DPDK_TARGET.
Inheriting a default PKG_CONFIG_PATH for all targets does not make sense
and is prone to confusion.

DPDK_MESON_OPTIONS might take a global initial value from environment
to customize a build test from the shell. Example:
	DPDK_MESON_OPTIONS="b_lto=true"
Some target-specific options can be added in the configuration file:
	DPDK_MESON_OPTIONS="$DPDK_MESON_OPTIONS kernel_dir=$MYKERNEL"

Fixes: 2722367412 ("devtools: load target-specific compilation environment")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-11-12 15:40:28 +01:00
David Marchand
4760b32b64 usertools: fix pmdinfo parsing
This script inspects an ELF file (binary or shared library) and its
linked dependencies by following DT_NEEDED tags.
So far a simple librte_pmd prefix was used as a filter to only parse
DPDK drivers dependencies.
While the reason is not clear from the commitlog of the patch that
introduced this filter, it was probably added for performance reasons,
since going through all dependencies can be quite long.
Testing with a DPDK built before the driver name changes:
- running the script takes ~0.3s with the filter,
- running the script takes ~9s without the filter,

Now that we changed the driver library names, it becomes more difficult
to identify only DPDK drivers, but we can just filter on the librte_
prefix to identify DPDK libraries: the script later checks for the
PMD_INFO_STRING string in .rodata and it is enough to differentiate the
DPDK drivers from the other DPDK libraries.

Running the script with this patch takes ~0.5s.

A debug message was logged for each inspected file, it gives no useful
information and is removed.

Fixes: a20b2c01a7 ("build: standardize component names and defines")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-11-12 14:26:42 +01:00
Bruce Richardson
a8adac0bc0 doc: add instructions for building 32-bit DPDK
For users with 32-bit applications who wish to use DPDK we need to provide
instructions on creating a 32-bit build of DPDK with meson. Therefore add a
section with this information to the GSG.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2020-11-06 18:49:57 +01:00
Bruce Richardson
9b83106d87 devtools: test 32-bit build
It's reasonably common for patches to have issues when built on 32-bits, so
to prevent this, we can add a 32-bit build (if supported) to the
"test-meson-builds.sh" script. The tricky bit is using a valid
PKG_CONFIG_LIBDIR, so for now we use two common possibilities for where that
should point to in order to get a successful build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-06 18:12:10 +01:00
Thomas Monjalon
60af9bd63d version: 20.11-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-05 19:30:22 +01:00
Thomas Monjalon
13e0b599ac app/testpmd: revert max Rx packet length adjustment
The fix of max_rx_pkt_len for allowing VLAN packets in all cases
was breaking configuration of some drivers. Example with virtio:

	Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
	Fail to configure port 0

Trying to fix the logic was revealing other issues in some drivers.
That's why it is decided to revert.

The workaround for the original issue would be
to set the MTU explicitly from the application
with rte_eth_dev_set_mtu().
See RFC: https://patches.dpdk.org/patch/83756/

Fixes: f6870a7ed6 ("app/testpmd: fix max Rx packet length for VLAN packet")
Cc: stable@dpdk.org

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-05 19:16:59 +01:00
Morten Brørup
3a35c1c0f6 mbuf: clean up comments and prefix
The mbuf header files had some commenting style errors that affected the
API documentation.
Also, the RTE_ prefix was missing on a macro and a definition.

Note: This patch does not touch the offload and attachment flags that are
also missing the RTE_ prefix.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-11-05 17:53:15 +01:00
Dmitry Kozlyuk
c2341bb671 cmdline: avoid name clash with Windows system types
cmdline_numtype member names clash with Windows system identifiers.
Add RTE_ prefix to cmdline constants to avoid this and possible
future conflicts.

Suggested-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Jie Zhou <jizh@microsoft.com>
Tested-by: Jie Zhou <jizh@microsoft.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-11-05 17:49:00 +01:00
Dharmik Thakkar
924e8e1a29 test/lpm: avoid code duplication in RCU perf tests
Avoid code duplication by combining single and multi threaded tests

Also, enable support for more than 2 writers

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2020-11-05 16:01:16 +01:00
Dharmik Thakkar
f02383671a test/lpm: remove unneeded checks in RCU perf tests
Remove redundant error checking for reader threads
since they never return error.

Fixes: eff30b59cc ("test/lpm: add RCU performance tests")
Cc: stable@dpdk.org

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2020-11-05 16:01:06 +01:00
Dharmik Thakkar
57db1feb78 test/lpm: report errors in RCU perf tests
Return error if Add/Delete fail in multiwriter perf test
Return error if single or multi writer test fails

Fixes: eff30b59cc ("test/lpm: add RCU performance tests")
Cc: stable@dpdk.org

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2020-11-05 15:59:29 +01:00
Dharmik Thakkar
c4c5b44c21 test/lpm: fix cycle calculation in RCU perf tests
Fix incorrect calculations for LPM adds, LPM deletes,
and average cycles in RCU QSBR perf tests

Since, rcu qsbr tests run for 'RCU_ITERATIONS' and not
'ITERATIONS', replace 'ITERATIONS' with 'RCU_ITERATIONS'
for calculating adds, deletes, and cycles.

Also, for multi-writer perf test, each writer only writes
half of NUM_LDEPTH_ROUTE_ENTRIES.
For 2 writers, total adds (or deletes) should be
(RCU_ITERATIONS * NUM_LDEPTH_ROUTE_ENTRIES) instead of
(2 * RCU_ITERATIONS * NUM_LDEPTH_ROUTE_ENTRIES).

Since, for both the single and multi writer tests, total adds/deletes
is equal to (RCU_ITERATIONS * NUM_LDEPTH_ROUTE_ENTRIES),
this has been replaced with a macro 'TOTAL_WRITES' and furthermore,
'g_writes' has been removed since it is always a fixed value
equal to TOTAL_WRITES.

Fixes: eff30b59cc ("test/lpm: add RCU performance tests")
Cc: stable@dpdk.org

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2020-11-05 15:59:26 +01:00
Olivier Matz
f8e90bcc1d eal: fix MCS lock and ticketlock headers install
Add missing arch-specific headers in meson.build.

Fixes: 2173f3333b ("mcslock: add MCS queued lock implementation")
Fixes: ca49b92079 ("ticketlock: enable generic ticketlock on all arch")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
2020-11-05 12:08:19 +01:00
Thomas Monjalon
d47e1d6426 version: 20.11-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-11-04 22:09:09 +01:00
Ciara Power
6bb0193c5f test/telemetry: fix typo at beginning of line
A "+" symbol was incorrectly placed at the beginning of a line,
this is now removed.

Fixes: 52af6ccb2b ("telemetry: add utility functions for creating JSON")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
2020-11-04 22:07:43 +01:00
Georgios Katsikas
4c0708ab7e app/flow-perf: configure rule batches
Currently, flow-perf measures the performance of
rule installation/deletion operations by breaking
down the entire number of operations into windows
of fixed size (i.e., 100000 operations per window).
Then, flow-perf measures the total time per window
and computes an average time across all windows.

This commit allows flow-perf users to configure
the number of rules per window instead of using
a fixed pre-compiled value. To do so, users must
pass --rules-batch=N, where N is the number of
rules per window (or batch).
For consistency reasons, flow_count variable is
now renamed to rules_count. This variable is the
total number of rules to be installed/deleted.

For example, if a user wants to measure how much
time it takes to install 1M rules in a certain NIC,
he/she can input:
--rules-count=1000000
This way flow-perf will break down 1M flow rules into
10 batches of 100k flow rules each (this is the default
batch size) and compute an average across the 10
measurements.
Now, if the user modifies the number of rules per
batch as follows:
--rules-count=1000000 --rules-batch=500000
then flow-perf will break down 1M flow rules into
2 batches of 500k flow rules each and compute the
average across the 2 measurements.

Finally, this commit also adds default variables
to the usage function instead of hardcoded values.

Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
2020-11-04 21:17:35 +01:00
David Hunt
f348642d6f doc: remove obsolete deprecation notice for power library
Remove notice announcing an already-implemented change.

In 19.05, rte_power_set_env was changed to return -1 in cases where
the environment was already set up, and for the same release, a
deprecation notice was added.
This patch removes that notice.

The API change was tested by calling rte_power_set_env twice. The first
call succeeded, and the second call failed, as expected.

Fixes: 5a5f3178d4 ("power: return error when environment already set")
Cc: stable@dpdk.org

Signed-off-by: David Hunt <david.hunt@intel.com>
2020-11-04 21:08:30 +01:00
Ciara Power
cbd2f21ab7 doc: fix typo in KNI guide
The typo "withe" should have been "with the". This is now fixed.

Fixes: 89397a01ce ("kni: set default carrier state of interface")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2020-11-04 21:08:30 +01:00
Stephen Hemminger
0429a2e1a4 mbuf: fix dynamic fields and flags with multiprocess
The dynamic flag management is broken if rte_mbuf_dynflag_lookup()
is done in a secondary process because the local pointer to
the memzone is not ever initialized.

Fix it by using the same checks as dynfield_register().
I.e if shared memory zone has not been looked up already,
then discover it.

Fixes: 4958ca3a44 ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-11-04 20:47:14 +01:00
Hemant Agrawal
082ac00826 license: remove dual prefix
This patch removes the dual keyword from dual license
definitions to avoid confusion. As the *dual* word is
not required to be added SPDX license.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2020-11-04 20:17:28 +01:00
Luca Boccassi
e8cff6142a fix spellings that Lintian complains about
Fixes: 103809d032 ("app/test-fib: add test application for FIB")
Fixes: 1265b5372d ("net/hns3: add some definitions for data structure and macro")
Fixes: a85e378cc6 ("net/ixgbe/base: add debug traces")
Fixes: 4861cde461 ("i40e: new poll mode driver")
Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Fixes: 86a2265e59 ("qede: add SRIOV support")
Fixes: 1db4d2330b ("net/virtio-user: check negotiated features before set")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
2020-11-04 20:11:31 +01:00
Tal Shnaiderman
e82ddd28e3 common/mlx5: split PCI relaxed ordering for read and write
The current DevX implementation of the relaxed ordering feature is
enabling relaxed ordering usage only if both relaxed ordering read AND
write are supported.  In that case both relaxed ordering read and write
are activated.

This commit will optimize the usage of relaxed ordering by enabling it
when the read OR write features are supported.  Each relaxed ordering
type will be activated according to its own capability bit.

This will align the DevX flow with the verbs implementation of
ibv_reg_mr when using the flag IBV_ACCESS_RELAXED_ORDERING

Fixes: 53ac93f71a ("net/mlx5: create relaxed ordering memory regions")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2020-11-04 19:16:24 +01:00
Guoyang Zhou
1e4593db1d net/hinic/base: fix log info for PF command channel
When PF command channel is error, the variables in the log has been
cleared, which is not printed yet.

Fixes: 214164a6bf ("net/hinic/base: remove unused function parameters")
Cc: stable@dpdk.org

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
2020-11-04 15:07:07 +01:00
Guoyang Zhou
17ff26b630 net/hinic/base: support two or more AEQS for chip
For device initialize, driver only supports four aeqs before,
and now driver can supports two or more aeqs from chip
config file.

Fixes: 611faa5f46 ("fix various typos found by Lintian")
Cc: stable@dpdk.org

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
2020-11-04 15:07:07 +01:00
Yunjian Wang
4bb02a6f5b ethdev: fix data type for port id
The ethdev port id is 16 bits now. This patch fixes the data type
of the variable for 'pid', which changing from uint32_t to uint16_t.

RTE_MAX_ETHPORTS is the maximum number of ports, which customized by
the user. To avoid 16-bit unsigned integer overflow, the valid value
of RTE_MAX_ETHPORTS should be set from 0 to UINT16_MAX, and it is
safer to cut one more port from space.

So we use RTE_BUILD_BUG_ON() to ensure that RTE_MAX_ETHPORTS is less
to UINT16_MAX.

Fixes: 5b7ba31148 ("ethdev: add port ownership")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-04 14:48:45 +01:00
Alvin Zhang
6fda724378 doc: update release notes for iavf
Update release notes with feature of outer IP hash for GTPC and GTPU.

Fixes: 6cd2d6adc7 ("net/iavf: support outer IP hash for GTPC")
Fixes: 262100a34a ("net/iavf: support outer IP hash for no inner GTPU")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-04 14:18:33 +01:00
Jeff Guo
9d5817fd3b net/iavf: fix protocol field for RSS hash
Add PROT field into IPv4 and IPv6 protocol headers for rss hash.

Fixes: 91f27b2e39 ("net/iavf: refactor RSS")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-11-04 13:29:53 +01:00
Yunjian Wang
b9b67d0674 ethdev: fix using Rx split config before null check
Coverity flags that 'rx_conf' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 363570
Fixes: 4ff702b5df ("ethdev: introduce Rx buffer split")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-04 12:21:06 +01:00
Xiaoyu Min
3e34ec3d4e app/testpmd: fix protocol size for copy
The rte_flow_item_eth and rte_flow_item_vlan items are refined.
The structs do not exactly represent the packet bits captured on the
wire anymore so set raw_encap/decap commands should only copy real
header instead of the whole struct.

Replace the rte_flow_item_* with the existing corresponding rte_*_hdr.

Fixes: 09315fc838 ("ethdev: add VLAN attributes to ethernet and VLAN items")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:35:08 +01:00
Gregory Etelson
64ed71d59a net/mlx5: fix tunnel flow destroy
Flow destructor tired to access flow related resources after the
flow object memory was already released and crashed dpdk process.

The patch moves flow memory release to the end of destructor.

Fixes: 4ec6360de3 ("net/mlx5: implement tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2020-11-03 23:35:08 +01:00
Alexander Kozyrev
71094ae3ce net/mlx5: fix CQE decompression for Arm and PowerPC
The recent Rx code refactoring moved the incrementing
of the CQ completion index out of the rxq_cq_decompress_v()
function to the rxq_burst_v() function.

The advancing of CQ completion index was removed in SSE
version only causing Neon and Altivec Rx bursts to stall.

Remove the incrementation of CQ completion index for all
the architectures in order to fix the stall.

Fixes: 1ded26239a ("net/mlx5: refactor vectorized Rx")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2020-11-03 23:35:08 +01:00
Venkat Duvvuru
8665487e31 net/bnxt: fix VXLAN decap offload
This patch fixes a couple of scenarios which were overlooked
by the patch which added VXLAN rte_flow offload support.

1. When a PMD application queries for flow counters, it could ask PMD
   to reset the counters when the application is doing the counters
   accumulation. In this case, PMD should not accumulate rather reset
   the counter.

2. Some of the PMD applications may set the protocol field in the IPv4
   spec but don't set the mask. So, consider the mask in the proto
   value calculation.

4. The cached tunnel inner flow is not getting installed in the
   context of tunnel outer flow create because of the wrong
   error code check when tunnel outer flow is installed in the
   hardware.

5. When a dpdk application offloads the same tunnel inner flow on
   all the uplink ports, other than the first one the driver rejects
   the rest of them. However, the first tunnel inner flow request
   might not be of the correct physical port. This is fixed by
   caching the tunnel inner flow entry for all the ports on which
   the flow offload request has arrived on. The tunnel inner flows
   which were cached on the irrelevant ports will eventually get
   aged out as there won't be any traffic on these ports.

Fixes: 675e31d877 ("net/bnxt: support VXLAN decap offload")

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2020-11-03 23:35:08 +01:00
Ajit Khaparde
739356da98 net/bnxt: fix PAM4 link negotiation
In some instances link was not coming up if PAM4 signaling is enabled.
Added check to disable autoneg if FW indicates auto speeds are zero.
Use default auto speeds if PAM4 auto speeds is not set.
Added a fix for forced link setting.

Fixes: c23f9ded03 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-11-03 23:35:07 +01:00
Ivan Malov
f1a6a986c1 app/testpmd: support shared flow action attribute transfer
This attribute helps PMDs to tell actions supposed to work
on the so-called hardware e-switch level from regular ones.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2020-11-03 23:35:07 +01:00
Ivan Malov
9ff91c0d81 ethdev: introduce transfer attribute to shared action conf
In a flow rule, attribute "transfer" means operation level
at which both traffic is matched and actions are conducted.

Add the very same attribute to shared action configuration.
If a driver needs to prepare HW resources in two different
ways, depending on the operation level, in order to set up
an action, then this new attribute will indicate the level.
Also, when handling a flow rule insertion, the driver will
be able to turn down a shared action if its level is unfit.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrey Vesnovaty <andreyv@nvidia.com>
2020-11-03 23:35:07 +01:00
Steve Yang
f6870a7ed6 app/testpmd: fix max Rx packet length for VLAN packet
When the max Rx packet length is smaller than the sum of MTU size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Fixes: 35b2d13fd6 ("net: add rte prefix to ether defines")
Cc: stable@dpdk.org

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:35:07 +01:00
Lijun Ou
445b0c8eba net/hns3: cleanup includes
Some header files have included by others. Also,
some header files have a header file self-contained
error will trigger building warning. As a result,
it is unnecessary and move it into the correct
location.

Beside, here also remove some unused lines.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Hongbo Zheng
44df0175dd net/hns3: check quantity limiter support before using it
If hardware does not support QL (quantity limiter), the int_ql_max
is 0, software should confirm ql_value is less than int_ql_max
before write QL register. This patch add check of int_ql_max
value from firmware and delete the unused variable coalesce_mode.

Fixes: 27911a6e62 ("net/hns3: add Rx interrupts compatibility")
Cc: stable@dpdk.org

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Huisong Li
d55f3d9c1a net/hns3: fix configurations of port-level scheduling rate
Scheduling rate of port-level in hns3 PF driver configured to
hardware is obtained from firmware, which determines the
bandwidth capability of the port. The rate in firmware is
generally configured with the maximum value for network engine
supporting multiple rates, such as 10G and 25G. It may cause
the following issues:
1) When a 10G optical module is used on the network engine, scheduling
   rate of this port will also be configured to hardware with 25G.
   However, the MAC rate of this port is 10G. In this case, it is
   unreasonable that the port scheduling rate is different from the MAC
   rate.
2) If default speed in firmware is not the maximum value, the 25G port
   may not reach the capability of the port.

Therefore, we fix configurations of port-level scheduling rate
according to updating of MAC link speed.

Fixes: 59fad0f321 ("net/hns3: support link update operation")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Chengchang Tang
938eb23693 net/hns3: support VXLAN-GPE TSO and checksum
Kupeng920 support tso and checksum offload for VXLAN_GPE with
the next protocol id 3(i.e., Ethernet).

Kupeng930 support TSO and checksum offload for VXLAN_GPE with
the next protocol id 1,2,3(i.e., IPv4, IPv6 and Ethernet).

This patch add support for this tunnel type.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Chengchang Tang
fb6eb9009f net/hns3: fix Tx checksum with fixed header length
Currently, the header length of all the layers are fixed, It would
lead to a csum error when the header length changed.

This patch fixes above problem by using the header length in mbuf
instead of the fixed header length to perform the TX cksum offload.

Fixes: bba6366983 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Chengchang Tang
f9edada651 net/hns3: fix Tx checksum outer header prepare
Currently, there are two mistakes in Tx checksum outer header prepare.
1) Check whether the packet outer header is IPV4 based on PKT_TX_IPV4
   which is incorrect.
2) For HIP08, the outer UDP cksum could not be offloaded. And driver
   should ensure the outer udp cksum filed set to 0. In current code,
   PKT_TX_UDP_CKSUM is used to determine whether the outer layer of
   the packet is a UDP header. Actually, for tunnel TSO, the flag will
   never be set.

For the first mistake, it is fixed by replacing PKT_TX_IPV4 with
PKT_TX_OUTER_IPV4. And the protocol number in L3 header is used to check
whether the outer L4 header is UDP.

Fixes: bba6366983 ("net/hns3: support Rx/Tx and related operations")
Fixes: 6dca716c9e ("net/hns3: support TSO")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Chengchang Tang
82c737f0a6 net/hns3: limit promiscuous mode for VF
For Kunpeng920, both tx and rx promisc is set when the promisc mode
is enabled. In other words, all the ingress packets and the packets sent
from the PF and other VFs on the same physical port will be copied
to the function which set promisc mode on.

Kunpeng930 support to turn off the tx unicast promisc. A limit promisc
mode is introduced, which means turn off the tx unicast promisc when
promisc is set.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2020-11-03 23:35:07 +01:00
Xiaoyun Wang
0e63dcc956 net/hinic: fix SCTP checksum error
For SCTP checksum offload, pmd driver does not parse payload offset
info, which may cause hardware calculate SCTP checksum failed.

Fixes: 8c8b61234f ("net/hinic: refactor checksum functions")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-11-03 23:35:07 +01:00
Xiaoyun Wang
d8d677baff net/hinic: fix outer L3 length parse
This patch fixes outer_l3_len parse error when
PKT_TX_OUTER_IP_CKSUM is not set, which does not affect
checksum function, just be consistent with mbuf meta
information description.

The outer_l3_len is calculated wrong because 'vlan_hdr' is calculated
wrong, 'vlan_hdr' fixed and code refactored.

Fixes: 8c8b61234f ("net/hinic: refactor checksum functions")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-11-03 23:35:07 +01:00
Ciara Power
35ce677cfa doc: fix hyperlink in igc guide
The hyperlink in the IGC documentation showed the whole link in italics
and was not clickable. This is now fixed to have a clickable label.

Fixes: 66fde1b943 ("net/igc: add skeleton")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:35:07 +01:00
Zhenghua Zhou
653c6ed4a1 app/testpmd: do not allow dynamic change of core number
When the number of forwarding cores changed in runtime, the issue may
be encountered:
If the nbcore set little than current nbcore, the forwarding thread
will still running on the extra cores. Therefore, trying to stop
forwarding will hang testpmd, since it will wait for the extra cores to
stop.

So do not allow to change nbcore number when forwarding is running.

Fixes: 0c0db76f42 ("app/testpmd: separate forward config setup from display")
Cc: stable@dpdk.org

Signed-off-by: Zhenghua Zhou <zhenghuax.zhou@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:35:07 +01:00
Wei Huang
ceccbcd738 raw/ifpga: use trusted buffer to free
In rte_fpga_do_pr, calling function read() may taints argument buffer
which turn to an untrusted value as argument of rte_free().

Coverity issue: 279449
Fixes: ef1e8ede3d ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-11-03 23:35:07 +01:00
Wei Huang
5a906909af raw/ifpga: terminate string filled by readlink with null
readlink() does not terminate string, add a null character at the end
of the string if readlink() succeeds.

Coverity issue: 362820
Fixes: 9c006c45d0 ("raw/ifpga: scan PCIe BDF device tree")
Cc: stable@dpdk.org

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-11-03 23:35:07 +01:00
Simei Su
a100fe47f9 net/iavf: fix supported RSS type
When a RSS rule with symmetric hash function, the RSS type shouldn't
carry with l3/l4 SRC/DST_ONLY. This patch adds invalid RSS type check
for the case.

Fixes: 91f27b2e39 ("net/iavf: refactor RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-11-03 23:35:07 +01:00