Commit Graph

30680 Commits

Author SHA1 Message Date
Kiran Kumar K
9603e432bd test/crypto-perf: fix memory allocation in asym case
While populating the crypto ops in case of asymmetric, result
is being allocated from stack. This is causing crash in the
application. And operation type is also not being initialized
properly. Adding a fix by allocating the result from global
memory and initialized the operation memory properly.

Fixes: ba588ce3f9 ("test/crypto-perf: test asymmetric crypto throughput")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Archana Muniganti
3f956cea85 crypto/cnxk: support IPv6 mixed tunnel mode
Adds IPv6 mixed tunnel mode support for cn9k.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Archana Muniganti
30351b0f94 crypto/cnxk: update auth key size
Update auth key size in capabilities for to support
SHA256_HMAC for cn9k.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Archana Muniganti
ba62b473f0 doc: update feature list in CN9K crypto guide
Updated feature list supported with cn9k crypto PMD.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Archana Muniganti
b00ae6f8dd crypto/cnxk: support ESN and anti-replay on CN9K
Adds ESN and anti-replay support for lookaside IPsec
on CN9K platforms.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Anoob Joseph
fd1d6c95ec crypto/cnxk: support null authentication in IPsec
Add null auth support with lookaside IPsec on cn10k crypto PMDs.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Anoob Joseph
90a2ec4ae8 common/cnxk: add null authentication with IPsec
Add support for null auth with IPsec operations on cn10k.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Radu Nicolau
a7f32947a3 examples/ipsec-secgw: support TCP TSO
Add support to allow user to specific MSS for TCP TSO offload on a per SA
basis. MSS configuration in the context of IPsec is only supported for
outbound SA's in the context of an inline IPsec Crypto offload.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Radu Nicolau
ff4a29d167 ipsec: support TSO
Add support for transmit segmentation offload to inline crypto processing
mode. This offload is not supported by other offload modes, as at a
minimum it requires inline crypto for IPsec to be supported on the
network interface.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Tejasree Kondoj
f063054f8a crypto/octeontx2: fix lookaside IPsec IPv6
Fixing IPv6 mixed tunnel mode support by updating
inputs to firmware.

Fixes: 4edede7bc6 ("crypto/octeontx2: support lookaside IPsec IPv6")
Cc: stable@dpdk.org

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-11-04 19:46:27 +01:00
Fan Zhang
3b2311cc09 examples/fips_validation: fix device start
This patch fixes the missing device start for fips validation
sample app.

Bugzilla ID: 842
Fixes: 261bbff75e ("examples: use separate crypto session mempools")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:46:27 +01:00
Archana Muniganti
255204e653 crypto/octeontx2: fix ESN seqhi
For current pkt, previous seqhi is used instead of its
guessed seqhi. Fixed it.

Fixes: 5be562bc5b ("crypto/octeontx2: support IPsec ESN and anti-replay")
Cc: stable@dpdk.org

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-11-04 19:46:27 +01:00
Raja Zidane
350e25fabd compress/mlx5: add block size option
Currently, the compression block size is 15 by default, which
is the maximum.

Add "log-block-size" devarg to select compression block size manually.
The value provided should be between 4 to 15.
Any out-of-range value will be defaulted to 15.

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:46:27 +01:00
Raja Zidane
b8871a7ec5 compress/mlx5: fix compression level configuration
The mlx5 compress PMD uses HW acceleration for the compress operations.
The mlx5 HW device has no level style mode, which does a tradeoff between
throughput and compression ratio, unlike SW drivers where the CPU is doing
the compress, and more CPU effort can cause a better compression ratio.
The mlx5 driver wrongly defined the Huffman block size configuration
according to the level that doesn't fill the level API requirement for
the tradeoff.

Remove the effect of the level configuration in compress operation.

Fixes: 237aad8824 ("compress/mlx5: fix compression level translation")
Fixes: 39a2c8715f ("compress/mlx5: add transformation operations")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:43:14 +01:00
Kiran Kumar K
b85b329bd3 crypto/cnxk: fix bus error on RSA verify
While creating RSA session, private key length is not being
calculated properly. This is causing bus error on RSA verify.
This patch fix the issue with length calculation.

Fixes: 5a3513caeb ("crypto/cnxk: add asymmetric session")
Cc: stable@dpdk.org

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-11-04 19:43:14 +01:00
Arek Kusztal
867ba300f9 crypto/qat: fix uncleared cookies after operation
This commit fixes uncleared cookies issue when using
RSA algorithm.

Fixes: e2c5f4ea99 ("crypto/qat: support RSA in asym")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-11-04 19:43:14 +01:00
Arek Kusztal
0a9e639403 crypto/qat: fix status in RSA decryption
This commit fixes not set crypto op status when decrypting
with RSA algorithm.

Fixes: e2c5f4ea99 ("crypto/qat: support RSA in asym")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-11-04 19:43:14 +01:00
Chandubabu Namburu
29860a6712 maintainers: update for AMD CCP
Updating AMD CCP crypto maintainer.

Signed-off-by: Chandubabu Namburu <chandu@amd.com>
Acked-by: Somalapuram Amaranath <asomalap@amd.com>
2021-11-04 19:43:14 +01:00
Kai Ji
6d4c594e46 test/crypto: fix max length for raw data path
Update the calculation of the max length needed when converting mbuf to
data vec in partial digest test case. This update make sure the enough
vec buffers are allocated for the appended digest in sgl op for raw
datapath api.

Fixes: 4868f6591c ("test/crypto: add cases for raw datapath API")
Cc: stable@dpdk.org

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:43:14 +01:00
Nicolas Chautru
ba2469cddf bbdev: promote API as stable
This promotes the bbdev interface to stable.
Overdue for some time as bbdev interface has been stable.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:43:14 +01:00
Tal Shnaiderman
b4a4fb7e5d crypto/mlx5: support on Windows
Add support for mlx5 crypto pmd on Windows OS.
Add changes to release note and PMD guide.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:43:14 +01:00
Tal Shnaiderman
5731efea6f drivers/crypto: move Windows build check
Remove the check and build failure from crypto/meson.build
in case building for Windows OS.

Add this check/failure in the meson.build file of each crypto PMD
that is not enforcing it to allow PMD support for Windows
per driver when applicable.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:43:14 +01:00
Tal Shnaiderman
ddcc44b5d3 crypto/mlx5: fix size of UMR WQE
The size of the UMR WQE allocated object is decided by a sizof
operation on the struct, however since the struct contains
a union of flexible array members this sizeof results can differ
between compilers.

GCC for example treats the union as 0 sized, MSVC adds a padding
of 16Bits.

To resolve the ambiguity the allocation size will be calculated
by the sizes of the members excluding the flexible union.

Fixes: a1978aa23b ("crypto/mlx5: add maximum segments configuration")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:43:14 +01:00
Tal Shnaiderman
2f5dceff71 crypto/mlx5: replace mutex initializer
Remove the usage of PTHREAD_MUTEX_INITIALIZER which is not
supported in Windows and initialize priv_list_lock in RTE_INIT.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:43:14 +01:00
Tal Shnaiderman
11f99cfc88 common/mlx5: add Direct Verbs constants for Windows
Add needed DV enums used by the crypto PMD and missing
for Windows OS.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-04 19:43:14 +01:00
Gowrishankar Muthukrishnan
1c559ee846 cryptodev: add telemetry endpoint for capabilities
Add telemetry endpoint for getting cryptodev capabilities.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:43:14 +01:00
Rebecca Troy
d3d98f5ce9 cryptodev: support telemetry
The cryptodev library now registers commands with telemetry, and
implements the corresponding callback functions. These commands
allow a list of cryptodevs to be queried, as well as info and stats
for the corresponding cryptodev.

An example usage can be seen below:

Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
{"version": "DPDK 21.11.0-rc0", "pid": 1135019, "max_output_len": 16384}
--> /
{"/": ["/", "/cryptodev/info", "/cryptodev/list", "/cryptodev/stats", ...]}
--> /cryptodev/list
{"/cryptodev/list": [0,1,2,3]}
--> /cryptodev/info,0
{"/cryptodev/info": {"device_name": "0000:1c:01.0_qat_sym", \
	 "max_nb_queue_pairs": 2}}
--> /cryptodev/stats,0
{"/cryptodev/stats": {"enqueued_count": 0, "dequeued_count": 0, \
	"enqueue_err_count": 0, "dequeue_err_count": 0}}

Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-04 19:43:14 +01:00
Harman Kalra
5cee6f7d3d doc: remove deprecation notice for interrupt
Deprecation notice targeted for 21.11 has been committed with
following as the first commit of the series.

Fixes: b7c9842916 ("interrupts: add allocator and accessors")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2021-11-05 18:28:00 +01:00
Viacheslav Galaktionov
ce1f72dc4f net/sfc: allow control threads for counter queue polling
MAE counters can be polled from a control thread if no service core is
allocated for this.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-11-04 17:57:00 +01:00
Andrew Rybchenko
50448dd3ab net/sfc: merge Rx and Tx doorbell counters into one
Datapath queue is either Rx or Tx, so just one counter is sufficient
for doorbells. It can count Tx doorbells in the case of Tx queue and
Rx doorbells in the case of Rx queue.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-04 17:42:05 +01:00
Gregory Etelson
40d7d38a7a doc: add flow flex item to default NIC features
Flex item or flex parser is port infrastructure that allows
application to add support for a custom network header and
offload flows to match the header elements.

Flex item API adds FLEX flow item to RTE flows.

Fixes: dc4d860e8a ("ethdev: introduce configurable flexible item")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-04 17:25:20 +01:00
Jiawen Wu
3d4f43ea31 net/txgbe: fix packet statistics
Fix specific length packet statistics caused by wrong register
addresses.

Fixes: 24a4c76aff ("net/txgbe: add error types and registers")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-11-04 17:17:28 +01:00
Huisong Li
ff6dc76e40 net/hns3: refactor multi-process initialization
Currently, the logic of the PF and VF initialization codes for multiple
process is the same. A common function can be extracted to initialize
and unload multiple process.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
443242212b net/hns3: unregister MP action on close for secondary
This patch fixes lack of unregistering MP action for secondary process
when PMD is closed.

Fixes: 9570b1fdbd ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
841f869353 net/hns3: fix multi-process action register and unregister
The multi-process has the following problems:
1) After a port in primary process is closed, the mp action of the
   process is unregistered. Which will cause that other device in the
   primary process cannot respond to requests from secondary processes.
2) Because variable "hns3_inited" is set to true without returning an
   initial value, the mp action cannot be registered again after it is
   unregistered.
3) The mp action of primary and secondary process need to be registered
   only once regardless of port numbers in the process. That's what
   variable "hns3_inited" does. But the variable is difficult to
   understand.

This patch adds a hns3_process_local_data structure to resolve above
problems.

Fixes: 9570b1fdbd ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
3232637177 net/hns3: fix secondary process reference count
The "secondary_cnt" will be increased when a secondary process
initialized. But the value of this variable is not decreased when the
secondary process exits, which causes the primary process senses that
the secondary process still exists. As a result, the primary process
fails to send messages to the secondary process after the secondary
process exits.

Fixes: 23d4b61fee ("net/hns3: support multiple process")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Dapeng Yu
3378e71244 net/ice: fix flow redirect
It's possible that a switch rule can't be redirect successfully due
to kernel driver is busy to handle an ongoing VF reset, so the
redirect action need to be deferred into next redirect request which
is promised by kernel driver after VF reset done.

This patch uses the saved flow rule's data to replay switch rule
remove/add during next flow redirect.

Fixes: 397b4b3c50 ("net/ice: enable flow redirect on switch")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:55:22 +01:00
Dapeng Yu
9fda31c322 net/ice: save rule on switch filter creation
The VSI number, lookup elements and rule information for creating switch
filter are abandoned when switch filter is created in original
implementation.

This patch saved the abandoned data in RTE flow, it is for future
use on replay when handling exception at flow redirect.

Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:54:36 +01:00
Yuying Zhang
7f89f41860 net/ice: fix order of flow filter parser list
The order of flow filter parser list was not definite and
linked to the register order of parsers. It caused ACL filter
covered by switch filter in some cases.

This patch fixed order of parser list to guarantee the usage
of each filter. Below lists the order.
ACL filter > Switch filter > FDIR > Hash filter.

Fixes: e4a0a7599d ("net/ice: fix flow priority support in non-pipeline mode")
Cc: stable@dpdk.org

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:47:43 +01:00
Gregory Etelson
de39080bd6 ethdev: fix variable length flow elements support
RTE flow API defines two flow elements types - common and PMD private.
Common RTE flow types are defined in rte_flow.h while PMD private
types exists inside specific PMD only. Application can create a flow
rule with PMD private items or actions. RTE flow API restricts
private PMD types to negative values.

Current implementation tried to use negative PMD private item type
value as index in the rte_flow_desc_item[] array.

The patch allows access to rte_flow_desc_item[] and
rte_flow_desc_action[] arrays to non-private PMD types only.

Fixes: 6cf7204733 ("ethdev: support flow elements with variable length")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-04 13:23:29 +01:00
Tudor Cornea
f86d553cc1 net/af_packet: fix ignoring full ring on Tx
The poll call can return POLLERR which is ignored, or it can return
POLLOUT, even if there are no free frames in the mmap-ed area.

We can account for both of these cases by re-checking if the next
frame is empty before writing into it.

We have attempted to reproduce this issue with pktgen-dpdk, using the
following configuration.

pktgen -l 1-4 -n 4 --proc-type=primary --no-pci --no-telemetry \
    --no-huge -m 512 \
    --vdev=net_af_packet0,iface=eth1,blocksz=16384,framesz=8192, \
    framecnt=2048,qpairs=1,qdisc_bypass=0 \
    -- \
    -P \
    -T \
    -m "3.0" \
    -f themes/black-yellow.theme

We configure a low tx rate (~ 335 packets / second) and a small
packet size, of about 300 Bytes from the pktgen CLI.

set 0 size 300
set 0 rate 0.008
set 0 burst 1
start 0

After bringing the interface down, and up again, we seem to arrive
in a state in which the tx rate is inconsistent, and does not recover.

ifconfig eth1 down; sleep 7; ifconfig eth1 up

[1] http://code.dpdk.org/pktgen-dpdk/pktgen-20.11.2/source/INSTALL.md

Fixes: 364e08f2bb ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org

Signed-off-by: Mihai Pogonaru <pogonarumihai@gmail.com>
Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-04 12:56:32 +01:00
Igor Romanov
b75d85b766 net/sfc: support Xilinx Riverhead VF
Add the device and vendor numbers to the PCI ID map so
that a VF can be probed.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-04 12:41:34 +01:00
John Daley
db79f2d5c9 net/enic: support GTP header flow matching
The GTP, GTP-U, GTP-C header fields can be matched, however NIC does not
support GTP tunneling so no items after the GTP header can be specified.
If a GTP-U or GTP-C item is specified without a preceding UDP item, the
UDP destination port is implicitly matched. For GTP, the destination UDP
port must be specified but its value is not enforced.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2021-11-04 12:34:46 +01:00
Thomas Monjalon
285725d93b ethdev: promote device removal check function as stable
The function rte_eth_dev_is_removed() was introduced in DPDK 18.02,
and is integrated in error checks of ethdev library.

It is promoted as stable ABI.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-04 11:11:28 +01:00
Ting Xu
1b9c68120a net/ice: enable protocol agnostic flow offloading in RSS
Enable protocol agnostic flow offloading to support raw pattern input
for RSS hash flow rule creation. It is based on Parser Library feature.
Current rte_flow raw API is utilized.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 04:15:29 +01:00
Ting Xu
0837da2e27 net/ice/base: support add HW profile for RSS raw flow
Based on the parser library, we can directly set HW profile and
associate VSI for RSS raw flows. Add symmetric hash configuration
for raw flow.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 04:10:43 +01:00
Hyong Youb Kim
af397b3c93 net/enic: avoid error message when no advanced filtering
Probing the availability of Flow Manager API may print the following
error log.

PMD: rte_enic_pmd: Devcmd 88 failed with error code -1

The error indicates a flow manager operation failed and happens when
advanced filtering is disabled on vNIC. It is harmless but confusing
to the user. Since advanced filtering is a prerequisite, check first
if it is available and avoid the error message altogether.

Fixes: ea7768b5bb ("net/enic: add flow implementation based on Flow Manager API")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-11-03 19:56:55 +01:00
Hyong Youb Kim
bcd68b6841 net/enic: fix crash caused by changing MTU
Changing MTU after the device start causes a segfault in the Rx
handler. The MTU handler (enic_set_mtu) performs the following steps.
1. Stop NIC Rx
2. Change Rx handler '(struct rte_eth_dev)->rx_pkt_burst' to
   the dummy handler and sleep a while to quiesce
3. Re-allocate/initialize Rx structures
4. Change Rx handler back to the real handler
   (e.g. enic_noscatter_recv_pkts)

enic_set_mtu does not update the recently introduced fast-path pointer
'(struct rte_eth_fp_ops)->rx_pkt_burst'. Since rte_eth_rx_burst only
uses the fast-path pointer, it keeps invoking the real Rx handler, not
the dummy one set by (2). And, (3) causes a segfault in the real Rx
handler (e.g. dereferencing freed structures).

Fix the segfault by updating the fast-path pointer as well.

Fixes: c87d435a4d ("ethdev: copy fast-path API into separate structure")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-11-03 19:41:15 +01:00
Tomasz Duszynski
8a8dc9b815 doc: add BPHY to list of cnxk platform blocks
Add BPHY to the list of platform hardware accelerator blocks.

Fixes: 3d27e49e07 ("raw/cnxk_bphy: add BPHY CGX/RPM skeleton driver")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:19:27 +01:00
Tomasz Duszynski
a90735a7a4 raw/cnxk_bphy: add header includes
Generally it is good practice to include all headers that provide APIs
which are being used. This is especially true in situations where 3rd
party apps include our public headers and assume that all should work
out of the box.

Including all headers explicitly helps to achieve that.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:15:13 +01:00