Anatoly Burakov [Thu, 19 Nov 2020 10:41:56 +0000 (10:41 +0000)]
doc: allow external build
Currently, when building sphinx documentation, the build will only
succeed if being run from the build system, because the conf.py script
expects DPDK_VERSION environment variable to be set, and crashes if it
is not.
However, there are certain external tools (such as sphinx documentation
preview extensions for certain IDE's) that use live preview and thus
rely on running their own sphinx commands. In these cases, it is useful
to permit building sphinx documentation without specifying the
DPDK_VERSION environment variable. The version string is the only thing
preventing manual sphinx build commands from working.
Fix the conf.py to use "None" as a version string in cases when
DPDK_VERSION environment variable is not set.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Mon, 16 Nov 2020 10:12:12 +0000 (11:12 +0100)]
bus/pci: fix comment explaining device naming
The original triple negative was hard to read and the attempt
to improve the formulation was commendable, unfortunately the new
comment is the inverse of correct.
Fixes: a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums") Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Gaetan Rivet <grive@u256.net> Acked-by: Luca Boccassi <bluca@debian.org> Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand [Mon, 16 Nov 2020 10:06:18 +0000 (11:06 +0100)]
bus/vdev: fix comment
RTE_DEV_WHITELISTED is now replaced with RTE_DEV_ALLOWED.
Fixes: a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
eal: replace usage of blacklist/whitelist in enums
Rename the enum values in the EAL include files.
As a backward compatible temporary migration tool, define
a replacement mapping for old values.
The old names relating to blacklist and whitelist are replaced
by block list and allow list, but applications may be using the
older compatibility macros, marked as deprecated.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Luca Boccassi <bluca@debian.org> Acked-by: Gaetan Rivet <grive@u256.net> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Fix the detection of instruction pattern with multiple emits followed
by TX. Once detected, this is one of the instruction patterns that is
internally replaced with a single optimized instruction, as long as
none of the instructions to be replaced is referenced by a jump
instruction. The fix enforces this check for the TX instruction of
the pattern.
Conor Walsh [Tue, 10 Nov 2020 11:03:13 +0000 (11:03 +0000)]
test/ring: fix build for O1 optimization
When DPDK is compiled with gcc < 9 with the optimization level set to 1
gcc sees zcd in test_ring.h as possibly being uninitialised. To correct
this error if statements from _st_ring_dequeue_bulk and
_st_ring_enqueue_bulk were corrected within test_ring_mt_peek_stress_zc.c
Fixes: f72299fd157d ("test/ring: add stress tests for zero copy API") Signed-off-by: Conor Walsh <conor.walsh@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
David Marchand [Sat, 14 Nov 2020 09:05:33 +0000 (10:05 +0100)]
examples: restore trace point
Before make removal, those examples were built with experimental flag
for tracepoints to be compiled in but the pkg-config part of those
makefiles were missed.
Fixes: 78d44153de8f ("ethdev: add tracepoints") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:30 +0000 (10:05 +0100)]
examples/performance-thread: fix build with pkg-config
main.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
2091 | tx_conf->conf.cpu_id = sched_getcpu();
| ^~~~~~~~~~~~
| sched_getparam
cc1: all warnings being treated as errors
Explicitly pass _GNU_SOURCE and include missing header (rather than
rely on automagic inclusion from other system headers).
David Marchand [Sat, 14 Nov 2020 09:05:29 +0000 (10:05 +0100)]
examples/ntb: fix clean target
When introducing this example, the cleanup from commit 7e9562a107f1
("examples: fix make clean when using pkg-config") was missed.
Fixes: c5eebf85badc ("examples/ntb: add example for NTB") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:28 +0000 (10:05 +0100)]
examples/l3fwd-graph: fix pkg-config usage
This example missed the fixes from commit 69b1bb49ed82
("examples: hide error for missing pkg-config path flag") and
commit 12a652a02b08 ("examples: fix build with old pkg-config").
David Marchand [Sat, 14 Nov 2020 09:05:26 +0000 (10:05 +0100)]
examples/l2fwd-crypto: fix build with pkg-config
Two issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to
`rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status
Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions") Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 14 Nov 2020 09:05:25 +0000 (10:05 +0100)]
examples/kni: fix build with pkg-config
rm -f build/kni build/kni-static build/kni-shared
test -d build && rmdir -p build || true
[...]
/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol
'pthread_join@@GLIBC_2.2.5'
This example explicitly call pthread API and should be linked against
the pthread library.
Fixes: 724beb913b44 ("examples/kni: monitor and update link state continually") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:24 +0000 (10:05 +0100)]
examples/ipsec-gw: fix build with pkg-config
flow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
154 | &rule->ipv4.mask.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:170:23: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
171 | &rule->ipv4.mask.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings.
Replicate it for make.
Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:23 +0000 (10:05 +0100)]
examples/fips_validation: fix build with pkg-config
When this example started using rte_cryptodev_sym_session_pool_create,
the part for pkg-config builds was not updated.
Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fan Zhang [Thu, 5 Nov 2020 13:58:57 +0000 (13:58 +0000)]
test/crypto: fix out-of-place test
This patch fixes bypassed out of place test for PMDs that support it.
Fixes: 4868f6591c6f ("test/crypto: add cases for raw datapath API") Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Ciara Power [Fri, 30 Oct 2020 13:11:26 +0000 (13:11 +0000)]
test/crypto: fix null dereference of crypto op
In two test cases, the op value is set by the return of the
process_crypto_request function, which may be NULL. The op->status
value was checked afterwards, which was causing a dereference issue.
To fix this, a temporary op variable is used to hold the return
from the process_crypto_request function, so the original op->status
can be checked after the possible NULL return value.
The original op value is then set to hold the temporary op value.
Coverity issue: 363452, 363465 Fixes: 4868f6591c6f ("test/crypto: add cases for raw datapath API") Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Michael Baum [Wed, 11 Nov 2020 07:36:48 +0000 (07:36 +0000)]
common/mlx5: fix freeing on flex parser creation failure
The mlx5_devx_cmd_create_flex_parser function defines a local array
(with constant size) named in, and then allocates a pointer to
mlx5_devx_obj structure by the mlx5_malloc function.
If the allocation fails, the function releases the array in and returns
NULL. However, the array has been defined locally on the stack and the
mlx5_free function is not required to release it.
Remove the call to the mlx5_free function.
Fixes: 66914d19d135 ("common/mlx5: convert control path memory to unified malloc") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:46 +0000 (07:36 +0000)]
net/mlx5: fix leak on ASO age pools resize failure
In ASO age pools resize, the PMD starts ASO data-path.
When starting ASO data-path is failed, the pools memory was not freed
what caused a memory leak.
Free it.
Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:44 +0000 (07:36 +0000)]
net/mlx5: remove unused calculation in RSS expansion
The RSS flow expansion get a memory buffer to fill the new patterns of
the expanded flows.
This memory management saves the next address to write into the buffer
in a dedicated variable.
The calculation for the next address was wrongly also done when all the
patterns were ready.
Remove it.
Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Xueming Li [Mon, 9 Nov 2020 22:57:59 +0000 (22:57 +0000)]
net/mlx5: fix nested flow creation
If xmedata mode 1 enabled and create a flow with RSS and mark action,
there was an error that rdma-core failed to create RQT due to wrong
queue definition. This was due to mixed flow creation in thread specific
flow workspace.
This patch introduces nested flow workspace(context data), each flow
uses dedicate flow workspace, pop and restore workspace when nested flow
creation done, the original flow with continue with original flow
workspace. The total number of thread specific flow workspace should be
2 due to only one nested flow creation scenario so far.
Fixes: 8bb81f2649b1 ("net/mlx5: use thread specific flow workspace") Fixes: 3ac3d8234b82 ("net/mlx5: fix index when creating flow") Cc: stable@dpdk.org Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Suanming Mou [Thu, 12 Nov 2020 08:51:43 +0000 (16:51 +0800)]
net/mlx5: fix detection of counter offset support
Currently, the counter offset support is discovered by creating the
rule with invalid offset counter and jump action in root table. If
the rule creation fails with EINVAL errno, that mean counter offset
is not supported in root table.
However, jump action may not be supported in some rdma-core version.
In this case, the discover code will not work properly.
This commits changes the jump action to generic drop action. That
makes the discover code to be more compatible.
Bing Zhao [Fri, 13 Nov 2020 07:05:33 +0000 (15:05 +0800)]
net/mlx5: fix hairpin unbind
In the implementation of mlx5_hairpin_unbind, a copy-paste error was
inside. If a single peer Rx port needed to be unbound, it would be
bound again by mistake.
All the hardware resources were released when stopping the device and
no mess of the configuration was introduced. But when trying to unbind
the ports again, the issue would appear.
The typo of the function call is fixed. If there is no hairpin queue
bound between two ports, the unbinding process should be considered
successful.
Fixes: 37cd4501e873 ("net/mlx5: support two ports hairpin mode") Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Xiaoyu Min [Tue, 10 Nov 2020 11:59:53 +0000 (19:59 +0800)]
net/mlx5: validate MPLSoGRE with GRE key
Currently PMD only accept flow which item_mpls directly follow item_gre,
means to match the GRE header without GRE optional field key in MPLSoGRE
encapsulation.
However, for the MPLSoGRE, the GRE header could have the optional field
(i.e, key) according to the RFC. So PMD need to accept this.
Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min <jackmin@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Bing Zhao [Wed, 11 Nov 2020 09:28:50 +0000 (17:28 +0800)]
net/mlx5: fix check of eCPRI previous layer
Based on the specification, eCPRI can only follow ETH (VLAN) layer
or UDP layer. When creating a flow with eCPRI item, this should be
checked and invalid layout of the layers should be rejected.
The number of descriptors configured is returned to a user
via the rxq_info_get API. This number is incorrect for MPRQ.
For SPRQ this number matches the number of mbufs allocated.
For MPRQ we have fewer external MPRQ buffers that can hold
multiple packets in strides of this big buffer. Take that
into account and return the number of MPRQ buffers multiplied
by the number of strides in this case.
There is a performance penalty for the replenish scheme
used in vectorized Rx burst for both MPRQ and SPRQ.
Mbuf elements are being filled at the end of the mbufs
array and being replenished at the beginning. That leads
to an increase in cache misses and the performance drop.
The more Rx descriptors are used the worse the situation.
Change the allocation scheme for vectorized MPRQ Rx burst:
allocate new mbufs only when consumed mbufs are almost
depleted (always have one burst gap between allocated and
consumed indices). Keeping a small number of mbufs allocated
improves cache locality and improves performance a lot.
Unfortunately, this approach cannot be applied to SPRQ Rx
burst routine. In MPRQ Rx burst we simply copy packets from
external MPRQ buffers or attach these buffers to mbufs.
In SPRQ Rx burst we allow the NIC to fill mbufs for us.
Hence keeping a small number of allocated mbufs will limit
NIC ability to fill as many buffers as possible. This fact
offsets the advantage of better cache locality.
Olivier Matz [Fri, 13 Nov 2020 10:39:57 +0000 (11:39 +0100)]
net/pcap: fix registration of timestamp dynamic field
In pcap pmd, the timestamp mbuf dynamic field is mandatory. When the
pcap pmd is created in a secondary process (this is the case for pdump),
it cannot be registered because this is not allowed from a secondary
process.
To ensure that the field is properly registered, do it from probe()
instead of configure(). Indeed, probe() is first invoked on the primary
process when a device is created in a secondary, this enables
registering dynfield from secondary process.
Ferruh Yigit [Fri, 13 Nov 2020 11:44:00 +0000 (11:44 +0000)]
app/testpmd: fix MTU after device configure
In 'rte_eth_dev_configure()', if 'DEV_RX_OFFLOAD_JUMBO_FRAME' is not set
the max frame size is limited to 'RTE_ETHER_MAX_LEN' (1518).
This is mistake because for the PMDs that has frame size bigger than
"RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN" (18 bytes), the MTU becomes
less than 1500, causing a valid frame with 1500 bytes payload to be
dropped.
Since 'rte_eth_dev_set_mtu()' works as expected, it is called after
'rte_eth_dev_configure()' to fix the MTU.
It may look redundant to set MTU after 'rte_eth_dev_configure()', both
with default values, but it is not, the resulting MTU config can be
different in the device based on frame overhead of the PMD.
And instead of setting the MTU to default value, it is first get via
'rte_eth_dev_get_mtu()' and set again, this is to cover cases MTU
changed from testpmd command line.
'rte_eth_dev_set_mtu()', '-ENOTSUP' error is ignored to prevent
irrelevant warning messages for the virtual PMDs.
Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Tested-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Michael Pfeiffer [Fri, 13 Nov 2020 14:03:32 +0000 (15:03 +0100)]
net/tap: allow all-zero checksum for UDP over IPv4
Unlike TCP, UDP checksums are optional and may be zero to indicate "not
set" [RFC 768] (except for IPv6, where this prohibited [RFC 8200]). Add
this special case to the checksum offload emulation in net/tap.
Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Maxime Coquelin [Thu, 12 Nov 2020 17:10:27 +0000 (18:10 +0100)]
vhost: fix error path when setting memory tables
If an error is encountered before the memory regions are
parsed, the file descriptors for these shared buffers are
leaked.
This patch fixes this by closing the message file descriptors
on error, taking care of avoiding double closing of the file
descriptors. guest_pages is also freed, even though it was not
leaked as its pointer was not overridden on subsequent function
calls.
Fixes: 8f972312b8f4 ("vhost: support vhost-user") Cc: stable@dpdk.org Reported-by: Xuan Ding <xuan.ding@intel.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Cheng Jiang [Thu, 12 Nov 2020 15:49:02 +0000 (15:49 +0000)]
examples/vhost: fix ioat dependency
Fix vhost-switch compiling issue when ioat dependency is missing.
Change 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file.
Use 'RTE_RAW_IOAT' to control conditional compiling in source file.
Clean some codes.
Fixes: abec60e7115d ("examples/vhost: support vhost async data path") Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing") Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Tested-by: David Marchand <david.marchand@redhat.com>
Haiyue Wang [Thu, 12 Nov 2020 02:00:06 +0000 (10:00 +0800)]
net/ixgbe: remove redundant MAC flag check
The flag of RTE_ETHTYPE_FLAGS_MAC has been checked twice, so remove the
first error message "Not supported by ethertype filter" which is not so
specific, and keep the error message "mac compare is unsupported" which
aligns to the definition of RTE_ETHTYPE_FLAGS_MAC.
Conor Walsh [Wed, 11 Nov 2020 15:39:33 +0000 (15:39 +0000)]
net/txgbe: fix build by simplifying xstats return
When DPDK is compiled with gcc 7.5 with the optimization level set to 1
gcc sees the 'offset' variable in txgbe_ethdev.c as possibly being
uninitialised.
The 'txgbe_get_offset_by_id()' return value, "-(int)(id + 1)", seems
confusing gcc that it assumes '0' can be returned in the failure case.
To correct this the return statement for error case in
'txgbe_get_offset_by_id()' is simplified to return '-1'.
Guoyang Zhou [Wed, 11 Nov 2020 06:33:37 +0000 (14:33 +0800)]
net/hinic/base: add message check for command channel
In the command channel, a message may has several fragments,
and the several fragments should have same message id. To
prevent problems, this check is added.
Fixes: 1e4593db1d58 ("net/hinic/base: fix log info for PF command channel") Cc: stable@dpdk.org Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
Leyi Rong [Thu, 12 Nov 2020 05:51:54 +0000 (13:51 +0800)]
net/iavf: fix performance drop after port reset
Needs to reset rxq->rxrearm_start to 0 when reset_rx_queue(),
otherwise, the random value of rxrearm_start will cause performance drop
due to L3 contested accesses.
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Cc: stable@dpdk.org Signed-off-by: Leyi Rong <leyi.rong@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ferruh Yigit [Mon, 9 Nov 2020 13:30:05 +0000 (13:30 +0000)]
net/af_xdp: fix pointer storage size
'uint64_t' is used to hold the pointer, for 32-bits build this
assumption is wrong and giving following build error:
rte_eth_af_xdp.c: In function ‘xdp_umem_configure’:
rte_eth_af_xdp.c:970:15:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
970 | base_addr = (void *)get_base_addr(mb_pool, &align);
| ^
Replacing the 'uint64_t' return type of the 'get_base_addr()' to the
'uintptr_t'.
Although not sure if the overall logic supports the 32-bits, using
'uintptr_t' should be safe both for 64/32 bits.
Matan Azrad [Tue, 10 Nov 2020 17:06:39 +0000 (17:06 +0000)]
app/testpmd: support age shared action context
When an age action becomes aged-out the next call for
rte_flow_get_aged_flows API should return the action context supplied
by the action configuration structure.
In case the age action is created by the shared action API, the shared
action context of the Testpmd application was not set.
In addition, the application handler of the contexts returned by the
rte_flow_get_aged_flows API didn't consider the fact that the action
could be set by the shared action API and considered it as regular flow
context.
This caused a crash in Testpmd when the context is parsed.
This patch set context type in the flow and shared action context and
uses it to parse the aged-out contexts correctly.
Suanming Mou [Tue, 10 Nov 2020 03:28:02 +0000 (11:28 +0800)]
net/mlx5: fix shared RSS action release
As shared RSS action will be shared by multiple flows, the action
is created as global standalone action and managed only by the
relevant shared action management functions.
Currently, hrxqs will be created by shared RSS action or general
queue action. For hrxqs created by shared RSS action, they should
also only be released with shared RSS action. It's not correct to
release the shared RSS action hrxqs as general queue actions do
in flow destroy.
This commit adds a new fate action type for shared RSS action to
handle the shared RSS action hrxq release correctly.
Ting Xu [Wed, 11 Nov 2020 06:42:50 +0000 (14:42 +0800)]
net/iavf: check RSS rule queue region size
When a rule is set to do RSS to redirect flows to a group of queues, the
queue region size should not be larger than the max RSS queue region
supported by HW. This patch added the step to check the queue region
size, and report failure if the size does not meet the requirement.
Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues") Cc: stable@dpdk.org Signed-off-by: Ting Xu <ting.xu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ting Xu [Wed, 11 Nov 2020 03:06:51 +0000 (11:06 +0800)]
net/iavf: fix releasing mbufs
In the function _iavf_rx_queue_release_mbufs_vec to release rx mbufs,
rxq->rxrearm_nb is given the value of rx descriptor number at last.
However, since the process to release and allocate mbufs lacks the
initialization of rxrearm_nb, if we try to release mbufs next time, it
will return without releasing directly. In this patch, rxrearm_nb is
initialized to be zero in rx queue reset.
Wenzhuo Lu [Tue, 10 Nov 2020 06:46:01 +0000 (14:46 +0800)]
net/iavf: check cache pointer before dereference
The return value of rte_mempool_default_cache should be
checked as it can be NULL.
Fixes: 9ab9514c150e ("net/iavf: enable AVX512 for Tx") Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Tue, 10 Nov 2020 06:45:52 +0000 (14:45 +0800)]
net/ice: check cache pointer before dereference
The return value of rte_mempool_default_cache should be
checked as it can be NULL.
Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512") Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Chenxu Di [Tue, 10 Nov 2020 07:08:14 +0000 (07:08 +0000)]
net/i40e: fix flow director flex configuration
The configuration of FDIR flex mask and flex pit should not be set
during flow validate. It should be set when flow create.
Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR") Cc: stable@dpdk.org Signed-off-by: Chenxu Di <chenxux.di@intel.com> Tested-by: Jun W Zhou <junx.w.zhou@intel.com> Acked-by: Jeff Guo <jia.guo@intel.com>
Simei Su [Tue, 10 Nov 2020 02:01:50 +0000 (10:01 +0800)]
net/ice: fix crash when device reset
When device resets, it should not implement ACL initialization
which is only executed in DCF. This patch disable ACL init and
uninit when in DPDK PF only mode.
Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF") Signed-off-by: Simei Su <simei.su@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Lijun Ou [Mon, 9 Nov 2020 14:29:02 +0000 (22:29 +0800)]
net/hns3: remove some blank lines
According to the rule of the static check tools
that arrange blank lines properly to keep the
code compact, here remove some unnecessary blank
line to fix the above rule warning.
Chengchang Tang [Mon, 9 Nov 2020 14:29:01 +0000 (22:29 +0800)]
net/hns3: fix queue state after reset
FLR operation will reset the queue enabling state and
the driver needs to restore the state after reset.
If the driver does not restore the state, it will result
in unpredictable behavior with reset when user start or
stop queue by calling the relevant function if.
This patch fix it by add a queue enabling state restore
function to the reset handler.
Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com>
Hongbo Zheng [Mon, 9 Nov 2020 14:28:59 +0000 (22:28 +0800)]
net/hns3: adjust code style for struct initialization
According to the rule of the used static check tool,
each member is initialized on a separate lines when
struct and union members are initialized, here is
tempting to adjust some code lines in order to remove
the warning.
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com>