Xiaoyu Min [Tue, 3 Nov 2020 13:20:22 +0000 (21:20 +0800)]
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:
09315fc83861 ("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>
Gregory Etelson [Wed, 28 Oct 2020 04:58:06 +0000 (06:58 +0200)]
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:
4ec6360de37d ("net/mlx5: implement tunnel offload")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Alexander Kozyrev [Thu, 29 Oct 2020 17:58:22 +0000 (17:58 +0000)]
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:
1ded26239aa0 ("net/mlx5: refactor vectorized Rx")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Venkat Duvvuru [Sun, 1 Nov 2020 16:51:41 +0000 (22:21 +0530)]
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:
675e31d877b6 ("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>
Ajit Khaparde [Mon, 2 Nov 2020 02:43:16 +0000 (18:43 -0800)]
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:
c23f9ded0391 ("net/bnxt: support 200G PAM4 link")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ivan Malov [Mon, 2 Nov 2020 11:43:16 +0000 (14:43 +0300)]
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>
Ivan Malov [Mon, 2 Nov 2020 11:43:15 +0000 (14:43 +0300)]
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>
Steve Yang [Mon, 2 Nov 2020 08:52:33 +0000 (08:52 +0000)]
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:
35b2d13fd6fd ("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>
Lijun Ou [Mon, 2 Nov 2020 14:38:19 +0000 (22:38 +0800)]
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>
Hongbo Zheng [Mon, 2 Nov 2020 14:38:17 +0000 (22:38 +0800)]
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:
27911a6e62e5 ("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>
Huisong Li [Mon, 2 Nov 2020 14:38:16 +0000 (22:38 +0800)]
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:
59fad0f32135 ("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>
Chengchang Tang [Mon, 2 Nov 2020 14:38:15 +0000 (22:38 +0800)]
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>
Chengchang Tang [Mon, 2 Nov 2020 14:38:14 +0000 (22:38 +0800)]
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:
bba636698316 ("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>
Chengchang Tang [Mon, 2 Nov 2020 14:38:13 +0000 (22:38 +0800)]
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:
bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes:
6dca716c9e1d ("net/hns3: support TSO")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Chengchang Tang [Mon, 2 Nov 2020 14:38:12 +0000 (22:38 +0800)]
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>
Xiaoyun Wang [Sat, 31 Oct 2020 03:38:36 +0000 (11:38 +0800)]
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:
8c8b61234ffd ("net/hinic: refactor checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Sat, 31 Oct 2020 03:38:35 +0000 (11:38 +0800)]
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:
8c8b61234ffd ("net/hinic: refactor checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Ciara Power [Mon, 2 Nov 2020 15:03:23 +0000 (15:03 +0000)]
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:
66fde1b943eb ("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>
Zhenghua Zhou [Tue, 27 Oct 2020 06:42:52 +0000 (06:42 +0000)]
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:
0c0db76f42ed ("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>
Wei Huang [Fri, 30 Oct 2020 07:35:07 +0000 (03:35 -0400)]
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:
ef1e8ede3da5 ("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>
Wei Huang [Fri, 30 Oct 2020 07:35:06 +0000 (03:35 -0400)]
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:
9c006c45d0c5 ("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>
Simei Su [Mon, 2 Nov 2020 11:55:47 +0000 (19:55 +0800)]
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:
91f27b2e39ab ("net/iavf: refactor RSS")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Junfeng Guo [Mon, 2 Nov 2020 01:54:36 +0000 (09:54 +0800)]
net/ice: delete unsupported ptypes in default hash set
Ptypes for GTPU with inner SCTP are not supported in current DDP pkg.
Thus, delete them in the default hash set config function.
Also clean up the rss vsi when calling the hash set config function.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Matan Azrad [Sun, 1 Nov 2020 17:57:52 +0000 (17:57 +0000)]
net/mlx5: allow age modes combination
ASO age action mode is not supported in group 0 while counter base age
action mode supports group 0.
Allow using the 2 modes of age action in parallel, so group 0 flows will
use counter base age actions and group > 0 flows will use ASO age
actions.
Currently, counter base age action doesn't support shared action API so
group 0 flows cannot share age actions.
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Dekel Peled <dekelp@nvidia.com>
Matan Azrad [Sun, 1 Nov 2020 17:57:51 +0000 (17:57 +0000)]
net/mlx5: support shared age action
Add support for rte_flow shared action API for ASO age action.
First step here to support validate, create, query and destroy.
The support is only for age ASO mode.
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Dekel Peled <dekelp@nvidia.com>
Matan Azrad [Sun, 1 Nov 2020 17:57:50 +0000 (17:57 +0000)]
net/mlx5: optimize shared RSS action memory
The RSS shared action was saved in flow memory by a pointer.
It means that every flow memory includes 8B only for optional shared
RSS case.
Move the RSS objects to be used by indexed pool which reduces the flow
handle memory to 4B.
So, now, the shared action handler is also just a 4B index.
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Dekel Peled <dekelp@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:49 +0000 (17:57 +0000)]
net/mlx5: support flow hit action for aging
A new ASO (Advanced Steering Operation) feature was added in the last
mlx5 adapters to support flow hit detection.
Using this new steering action, the driver can detect flow traffic hit
and to reset this indication any time.
The ASO age action cannot support flows in table 0.
Add support for flow aging action in rte_flow using this new feature.
The counter aging mode will be taken only when the ASO feature is not
supported for the user flow groups.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:48 +0000 (17:57 +0000)]
common/mlx5: add definitions for ASO flow hit
This patch adds different PRM definitions, related to ASO flow hit
feature, in MLX5 PMD code.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:47 +0000 (17:57 +0000)]
common/mlx5: add glue function to create flow hit action
Add glue function to create the flow hit action using DV API,
if rdma-core support exists.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:46 +0000 (17:57 +0000)]
common/mlx5: add read ASO flow hit HCA capability
Read and store the device capability of FLOW_HIT_ASO general object,
using the DevX API.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:45 +0000 (17:57 +0000)]
common/mlx5: use general object type for cap index
PRM defines the general object types using positive numbers.
The same values are used as index for the relevant bit in HCA
capabilities general_obj_types bit mask.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Sun, 1 Nov 2020 17:57:44 +0000 (17:57 +0000)]
common/mlx5: add DevX API to create ASO flow hit object
Add DevX API to create ASO flow hit object.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Alexander Kozyrev [Sun, 1 Nov 2020 16:27:39 +0000 (16:27 +0000)]
net/mlx5: support flow tag and packet header miniCQEs
CQE compression allows us to save the PCI bandwidth and improve
the performance by compressing several CQEs together to a miniCQE.
But the miniCQE size is only 8 bytes and this limits the ability
to successfully keep the compression session in case of various
traffic patterns.
The current miniCQE format only keeps the compression session alive
in case of uniform traffic with the Hash RSS as the only difference.
There are requests to keep the compression session in case of tagged
traffic by RTE Flow Mark Id and mixed UDP/TCP and IPv4/IPv6 traffic.
Add 2 new miniCQE formats in order to achieve the best performance
for these traffic patterns: Flow Tag and Packet Header miniCQEs.
The existing rxq_cqe_comp_en devarg is modified to specify the
desired miniCQE format. Specifying 2 selects Flow Tag format
for better compression rate in case of RTE Flow Mark traffic.
Specifying 3 selects Checksum format (existing format for MPRQ).
Specifying 4 selects L3/L4 Header format for better compression
rate in case of mixed TCP/UDP and IPv4/IPv6 traffic.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
David Marchand [Mon, 19 Oct 2020 09:41:51 +0000 (11:41 +0200)]
net/mlx: remove separate ABI version for glue libraries
The glue libraries are tightly bound to the mlx drivers of a dpdk
version and are packaged with them.
Keeping a separate ABI version prevents us from installing two versions
of dpdk.
Maintaining this separate version just adds confusion.
Align the glue library ABI version to the global ABI version.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Ophir Munk [Tue, 27 Oct 2020 10:16:59 +0000 (10:16 +0000)]
common/mlx5/linux: replace malloc and free in glue
This commit replaces mlx5_malloc and mlx5_free calls with Linux calls
malloc and free in file mlx5_glue.c.
The current mlx5_malloc calls have no flags, alignment or socket
selection, so they are equivalent to calling malloc. Rdma-core itself
is using malloc. When using mlx5_malloc the glue library is dependent
on common_mlx5 library which must be compiled first. Not doing so and
in case ibverbs_link=dlopen will result in compilation failure:
mlx5_glue.c: undefined reference to `mlx5_malloc'.
To make all of this simpler and remove the common_mlx5 dependency - this
commit does the alloc/free replacements.
Fixes:
66914d19d135 ("common/mlx5: convert control path memory to unified malloc")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tal Shnaiderman [Mon, 26 Oct 2020 18:17:48 +0000 (20:17 +0200)]
common/mlx5: fix DevX SQ object creation
Fix wrong assignment of allow_multi_pkt_send_wqe
in mlx5_devx_cmd_create_sq.
The incorrect assignment was introduced in the initial
mlx5_devx_cmd_create_sq implementation.
sq_attr->flush_in_error_en is
mistakenly assigned to both allow_multi_pkt_send_wqe and
flush_in_error_en, it was detected during Windows PMD development.
The fix is simply assigning the right value in mlx5_devx_cmd_create_sq
to sq_attr->allow_multi_pkt_send_wqe
Fixes:
ae18a1ae9692 ("net/mlx5: support Tx hairpin queues")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Ali Alnubani [Mon, 26 Oct 2020 09:20:35 +0000 (11:20 +0200)]
common/mlx5: fix glue library name
The MLX5 glue library wasn't following the standard
'librte_<class>_<name>.so' naming.
Fixes:
a20b2c01a7a1 ("build: standardize component names and defines")
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Ali Alnubani [Mon, 26 Oct 2020 09:20:34 +0000 (11:20 +0200)]
net/mlx4: fix glue library name
The MLX4 library wasn't being successfully initialized with
-Dibverbs_link=dlopen because it expected a shared object file
with a different name.
Fixes:
a20b2c01a7a1 ("build: standardize component names and defines")
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Somnath Kotur [Fri, 30 Oct 2020 07:03:04 +0000 (12:33 +0530)]
net/bnxt: fix pass by reference
Pass 'eth_da' pointer instead of pass by value to bnxt_rep_port_probe()
Coverity issue: 360841
Fixes:
322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Somnath Kotur [Fri, 30 Oct 2020 07:03:03 +0000 (12:33 +0530)]
net/bnxt: add a failure log
Check and log an error message if switch domain free API fails
Coverity issue: 362757
Fixes:
322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Long Li [Sat, 31 Oct 2020 00:24:09 +0000 (17:24 -0700)]
net/netvsc: control use of external mbuf on Rx
When receiving packets, netvsp puts data in a buffer mapped through UIO.
Depending on packet size, netvsc may attach the buffer as an external
mbuf. This is not a problem if this mbuf is consumed in the application,
and the application can correctly read data out of an external mbuf.
However, there are two problems with data in an external mbuf.
1. Due to the limitation of the kernel UIO implementation, physical
address of this external buffer is not exposed to the user-mode. If
this mbuf is passed to another driver, the other driver is unable to
map this buffer to iova.
2. Some DPDK applications are not aware of external mbuf, and may bug
when they receive an mbuf with external buffer attached.
Introduce a driver parameter "rx_extmbuf_enable" to control if netvsc
should use external mbuf for receiving packets. The default value is 0.
(netvsc doesn't use external mbuf, it always allocates mbuf and copy
data to mbuf) A non-zero value tells netvsc to attach external buffers
to mbuf on receiving packets, thus avoid copying memory.
Signed-off-by: Long Li <longli@microsoft.com>
Stephen Hemminger [Sat, 31 Oct 2020 00:24:08 +0000 (17:24 -0700)]
net/netvsc: allow setting Rx and Tx copy break
The values for Rx and Tx copy break should be tunable rather
than hard coded constants.
The rx_copybreak sets the threshold where the driver uses an
external mbuf to avoid having to copy data. Setting 0 for copybreak
will cause driver to always create an external mbuf. Setting
a value greater than the MTU would prevent it from ever making
an external mbuf and always copy. The default value is 256 (bytes).
Likewise the tx_copybreak sets the threshold where the driver
aggregates multiple small packets into one request. If tx_copybreak
is 0 then each packet goes as a VMBus request (no copying).
If tx_copybreak is set larger than the MTU, then all packets smaller
than the chunk size of the VMBus send buffer will be copied; larger
packets always have to go as a single direct request. The default
value is 512 (bytes).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
Nithin Dabilpuram [Wed, 28 Oct 2020 11:46:43 +0000 (17:16 +0530)]
net/octeontx2: avoid per packet barrier with multi segment
Avoid per-pkt barrier with multi-seg with fast free
and remove mbuf update to NULL.
Fixes:
ce8628c66a22 ("net/octeontx2: fix jumbo frame crash")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Satheesh Paul [Wed, 21 Oct 2020 03:31:31 +0000 (09:01 +0530)]
net/octeontx2: support VF base steering rule
Adds support for merging a base steering rule with
all flow rules created on a VF.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Yunjian Wang [Tue, 20 Oct 2020 15:02:37 +0000 (23:02 +0800)]
net/thunderx: fix memory leak on rbdr desc ring failure
In nicvf_qset_rbdr_alloc(), we allocate memory for the 'rbdr'
structure but not released when allocate 'rbdr desc ring' fails.
Fixes:
7413feee662d ("net/thunderx: add device start/stop and close")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:21 +0000 (12:31 +0100)]
net/ena: upgrade driver version to v2.2.0
The v2.2.0 adds support for network interface metrics, includes some bug
fixes and updates HAL to the latest version.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:20 +0000 (12:31 +0100)]
doc: mark Armv8 as supported by ena PMD
The ARMv8 platform support was tested and works fine with the ENA PMD.
It can be used on the AWS a1.* and m6g.* instances.
The ARMv8 support in ENA is at least from v19.11, where the VFIO DPDK
driver was fixed to work with 32-bit applications compiled for arm.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:19 +0000 (12:31 +0100)]
net/ena/base: align IO CQ allocation to 4K
Latest generation HW requires IO completion queue descriptors to be
aligned to a 4K in order to achieve the best performance.
Because of that, the new allocation macros were added, which allows
driver to allocate the memory with specified alignment.
The previous allocation macros are now wrappers around the macros
doing the alignment, with the alignment value equal to cacheline size.
Fixes:
b68309be44c0 ("net/ena/base: update communication layer for the ENAv2")
Cc: stable@dpdk.org
Signed-off-by: Ido Segev <idose@amazon.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:18 +0000 (12:31 +0100)]
net/ena: change name of supported PCI device IDs
The ID 0xEC21 is not associated with LLQ feature of the device, so it
would be misleading for the user. Because of that, the current
identifier is more precise.
Together with code update, the documentation was changed to reflect
current changes
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:17 +0000 (12:31 +0100)]
net/ena: fix setting Rx checksum flags in mbuf
The driver was never setting PKT_RX_*_CKSUM_GOOD flags, so the only way
of checking if the checksum was checked was by testing for the
PKT_RX_*_CKSUM_BAD. In that situation, the application couldn't detect
if the checksum was valid or unknown, as unknown flag is equal to 0.
Moreover, the l3_csum_err value is only valid if the l3_proto is
indicating IPv4, so it shouldn't be checked for other protocols.
Fixes:
1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Michal Krawczyk [Fri, 30 Oct 2020 11:31:16 +0000 (12:31 +0100)]
net/ena: fix getting xstats global stats offset
There was a bug in a code, which was reading stat_offset value from the
ena_stats_rx_strings array instead of ena_stats_global_strings.
It wasn't causing real problems just because ena_stats_rx_strings was
not smaller than ena_stats_global_strings and both arrays hold the same
offsets.
Fixes:
7830e905b7c9 ("net/ena: expose extended stats")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Hyong Youb Kim [Fri, 30 Oct 2020 07:27:49 +0000 (00:27 -0700)]
net/enic: fix header sizes when copying flow patterns
Several functions use sizeof(struct rte_flow_item_eth) and
sizeof(struct rte_flow_item_ipv6) when copying headers. These sizes
used to coincide with the sizes of rte_ether_hdr and
rte_ipv6_hdr. But, with recently added fields, rte_flow_item_eth and
rte_flow_item_ipv6 have grown in size. Use sizeof(rte_ether_hdr) and
sizeof(rte_ipv6_hdr) instead.
Coverity issue: 363572, 363573
Fixes:
ea7768b5bba8 ("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>
Lijun Ou [Thu, 29 Oct 2020 12:51:57 +0000 (20:51 +0800)]
net/hns3: fix enabling SVE Rx/Tx
The ARM SVE vector implementation defined macro is
__ARM_FEATURE_SVE and RTE_MACHINE_CPUFLAG macros
have replaced by regular compiler macros.
Besides, we remove the unused macro RTE_LIBRTE_HNS3_INC_VECTOR_SVE.
Fixes:
952ebacce4f2 ("net/hns3: support SVE Rx")
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Hongbo Zheng [Thu, 29 Oct 2020 12:51:56 +0000 (20:51 +0800)]
net/hns3: check setting VF PCI bus return value
Currently hns3vf_reinit_dev only judge whether the return value of
setting PCI bus function is not 0, while it will return a negative
value when execute failed.
Fixes:
243651cb6c8c ("net/hns3: check PCI config space reads")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Chengchang Tang [Thu, 29 Oct 2020 12:51:55 +0000 (20:51 +0800)]
net/hns3: fix clearing HW ring after queue stop
Currently, the rx HW ring is not cleared after queue stop.
When there are packets remaining in the HW rings and the
queues have been stopped, if upper layer user calls the
rx_burst function at this time, an illegal memory access
will occur due to the sw rings has been released.
This patch fix this by reset the sw ring after disable the
queue.
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>
Huisong Li [Thu, 29 Oct 2020 12:51:54 +0000 (20:51 +0800)]
net/hns3: fix data type to store queue number
Currently, u8 type variable is used to control to release fake queues in
hns3_fake_rx/tx_queue_config function. Although there is no case in
which more than 256 fake queues are created in hns3 network engine, it
is unreasonable to compare u8 variable with u16 variable.
Fixes:
a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Hongbo Zheng [Thu, 29 Oct 2020 12:51:53 +0000 (20:51 +0800)]
net/hns3: fix unchecked return value
There are coverity defects related "calling
hns3_reset_all_tqps without checking return value
in hns3_do_start".
This patch fixes the warning by add "void" declaration
because here is exception handling, hns3_reset_all_tqps
will have the corresponding error message if it is
handled incorrectly, so it is not necessary to check
hns3_reset_all_tqps return value, here keep ret as the
error code causing the exception.
Coverity issue: 363048
Fixes:
fa29fe45a7b4 ("net/hns3: support queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Chengchang Tang [Thu, 29 Oct 2020 12:51:52 +0000 (20:51 +0800)]
net/hns3: fix packet type report in Rx
Currently, hns3 supports recognizing a lot of ptypes, but most
tunnel packet types are not reported to the API
rte_eth_dev_get_supported_ptypes.
And there are some errors in L2 and L3 packet recognition. The
ARP and LLDP are classified to L3 field in RX descriptor. So,
the ptype of LLDP and ARP packets will be set twice. And ptypes
are assigned by bitwise OR, which will eventually cause the ptype
result to be incorrect.
Besides, when a packet with only L2 header, its ptype will not
report by hns3 PMD. This is because the L2/L3 ptype table is not
initialized properly. In this case, the table query result is 0
by default.
As a result, it fixes missing supported ptypes and the mistake in
L2/L3 packet recognition and the unreported L2 packet ptype by
reporting its L2 type when the L3 type unrecognized..
Fixes:
bba636698316 ("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>
Huisong Li [Thu, 29 Oct 2020 12:51:51 +0000 (20:51 +0800)]
net/hns3: fix RSS max queue id allowed in multi-TC
Currently, driver uses the maximum number of queues configured by user
as the maximum queue id that can be specified by the RSS rule or the
reta_update api. It is unreasonable and may trigger an incorrect
behavior in the multi-TC scenario. The driver must ensure that the queue
id configured in the redirection table must be within the range of the
number of queues allocated to a TC.
Fixes:
c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Lijun Ou [Thu, 29 Oct 2020 12:51:50 +0000 (20:51 +0800)]
net/hns3: get number of used descriptors of Rx queue
Implement the available and used rxd number count function.
In Kunpeng series, the NIC hardware supports to read the bd numbers
which wait processed from the hardware FBD (Full Buffer Descriptor),
and the driver maintains the bd number to be written back hardware.
Compare the number of FBDs with the number of BDs to be written back to
the hardware.
The number of used descriptors of a rx queue is computed as follows:
The fbd numbers of reading from FBD register plus the bd numbers to be
written back to hardware maintained by the driver.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Jeff Guo [Fri, 30 Oct 2020 08:40:30 +0000 (16:40 +0800)]
net/iavf: support flex desc metadata extraction
Enable metadata extraction for flexible descriptors in AVF, that would
allow network function directly get metadata without additional parsing
which would reduce the CPU cost for VFs. The enabling metadata
extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/MPLS
flexible descriptors, and the VF could negotiate the capability of
the flexible descriptor with PF and correspondingly configure the
specific offload at receiving queues.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Haiyue Wang [Tue, 27 Oct 2020 01:23:28 +0000 (09:23 +0800)]
net/ice: rename dynamic mbuf name
Rename the dynamic mbuf name to 'intel_pmd_xxx' format, so that the
Intel PMD which has the protocol extraction feature will share the
same dynamic field/flags space in mbuf.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Bing Zhao [Fri, 30 Oct 2020 09:29:22 +0000 (17:29 +0800)]
doc: add mlx5 header to API index
The file "rte_pmd_mlx5.h" is used to provide mlx5 PMD specific APIs
and it needs to be included in the document generation.
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Martin Weiser [Thu, 29 Oct 2020 11:25:42 +0000 (12:25 +0100)]
net/af_xdp: fix integer overflow in umem size calculation
The multiplication of two u32 integers may cause an overflow with large
mempool sizes.
Fixes:
74b46340e2d4 ("net/af_xdp: support shared UMEM")
Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bing Zhao [Thu, 29 Oct 2020 05:35:25 +0000 (13:35 +0800)]
app/testpmd: fix eCPRI command line style
In the current implementation of eCPRI flow item parsing of the CLI,
the token items in the list are not connected properly.
A command containing "rtc_ctrl rtc_id spec 14857 rtc_id mask 0xff00"
will be considered invalid. In order to support spec with mask, the
common entry needs to be typed twice and the whole command will be
too long.
By changing the token lists, it could support spec with mask without
backing from the entry of the item.
Fixes:
17d103cc9365 ("app/testpmd: add eCPRI in flow creation patterns")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Morten Brørup [Mon, 14 Sep 2020 11:05:11 +0000 (13:05 +0200)]
ethdev: document Rx packet number requirement for vector Rx
Updated description of rte_eth_rx_burst() to reflect what drivers,
when using vector instructions, expect from nb_pkts.
Also discussed on the mailing list here:
http://inbox.dpdk.org/dev/
98CBD80474FA8B44BF855DF32C47DC35C61257@smartserver.smartshare.dk/
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 12:24:07 +0000 (13:24 +0100)]
net/sfc: support aarch64 architecture
Enable the PMD build on aarch64.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Andrew Rybchenko [Thu, 22 Oct 2020 12:24:06 +0000 (13:24 +0100)]
net/sfc: use compat for 128-bit unsigned integer
Prepare to support ARMv8.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Andrew Rybchenko [Thu, 22 Oct 2020 12:24:05 +0000 (13:24 +0100)]
common/sfc_efx: introduce 128-bit unsigned integer compat
Intel SSE has __m128i, but ARMv8 has __uint128_t. So, add compat
efsys_uint128_t to be used in driver source and have either __u128i
or __uint128_t behind.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Lijun Ou [Wed, 21 Oct 2020 08:54:43 +0000 (16:54 +0800)]
net/hns3: enable RSS for IPv6-SCTP dst/src port fields
For Kunpeng930 NIC hardware, it supports to use dst/src port to
RSS hash for ipv6-sctp packet type. However, the Kunpeng920 NIC
hardware is different with it. The Kunpeng920 NIC only supports
dst/src ip to RSS hash for ipv6-sctp packet type.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Lijun Ou [Mon, 19 Oct 2020 14:27:10 +0000 (22:27 +0800)]
maintainers: update for hns3
I am a new hns3 pmd developer and reviewer for upstreaming hns3
pmd driver. So I want to help out here as well.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Andrew Rybchenko [Thu, 22 Oct 2020 10:06:20 +0000 (11:06 +0100)]
ethdev: move L2 tunnel config structure to ixgbe driver
net/ixgbe driver is the only user of the struct rte_eth_l2_tunnel_conf.
Move it to the driver and use ixgbe_ prefix instead of rte_eth_.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 10:06:19 +0000 (11:06 +0100)]
ethdev: remove L2 tunnel offload control API
Remove rte_eth_dev_l2_tunnel_offload_set() and corresponding
ethdev driver operation.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 10:06:18 +0000 (11:06 +0100)]
ethdev: remove API to config L2 tunnel EtherType
Remove rte_eth_dev_l2_tunnel_eth_type_conf() and corresponding
ethdev driver operation.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:37 +0000 (10:42 +0100)]
ethdev: remove legacy filter API functions
The legacy filter API, including rte_eth_dev_filter_supported() and
rte_eth_dev_filter_ctrl() is removed. Flow API should be used.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:36 +0000 (10:42 +0100)]
app/testpmd: remove command to set FDIR flexible filter mask
The command uses FDIR filter information get API which
is not supported any more.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:35 +0000 (10:42 +0100)]
ethdev: remove legacy FDIR filter type support
Instead of FDIR filters RTE flow API should be used.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:34 +0000 (10:42 +0100)]
ethdev: remove legacy global filter configuration support
Global filter configuration request was supported by net/i40e
driver only to configure GRE key length.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:33 +0000 (10:42 +0100)]
ethdev: remove legacy L2 tunnel filter type support
Instead of L2 tunnel filter RTE flow API should be used.
Preserve RTE_ETH_FILTER_L2_TUNNEL since it is used in drivers
internally in RTE flow API support.
rte_eth_l2_tunnel_conf structure is used in other ethdev API
functions.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:32 +0000 (10:42 +0100)]
ethdev: remove legacy HASH filter type support
Instead of HASH filter RTE flow API should be used.
Preserve RTE_ETH_FILTER_HASH since it is used in drivers
internally in RTE flow API support.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:31 +0000 (10:42 +0100)]
ethdev: remove legacy tunnel filter type support
Instead of TUNNEL filter RTE flow API should be used.
Move corresponding defines and helper structure to ethdev
driver interface since it is still used by drivers internally.
Preserve RTE_ETH_FILTER_TUNNEL because of usage in drivers.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:30 +0000 (10:42 +0100)]
ethdev: remove legacy N-tuple filter type support
Instead of N-tuple filter RTE flow API should be used.
Preserve struct rte_eth_ntuple_filter in ethdev API since
the structure and related defines are used in flow classify
library and a number of drivers.
Preserve RTE_ETH_FILTER_NTUPLE because of usage in drivers.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:29 +0000 (10:42 +0100)]
ethdev: remove legacy SYN filter type support
Instead of SYN filter RTE flow API should be used.
Move corresponding definitions to ethdev internal driver API
since it is used by drivers internally.
Preserve RTE_ETH_FILTER_SYN because of it as well.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:28 +0000 (10:42 +0100)]
ethdev: move flexible filter type to e1000 driver
net/e1000 driver is the only user of the struct rte_eth_flex_filter
and helper defines. Move it to the driver and use igb_ prefix
instead of rte_eth_.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:27 +0000 (10:42 +0100)]
ethdev: remove legacy flexible filter type support
Instead of FLEXIBLE filter RTE flow API should be used.
Temporarily preserve helper defines in public interface.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:26 +0000 (10:42 +0100)]
ethdev: remove legacy EtherType filter type support
Instead of EtherType filter RTE flow API should be used.
Move corresponding definitions to ethdev internal driver API
since it is used by drivers internally.
Preserve RTE_ETH_FILTER_ETHERTYPE because of it as well.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:25 +0000 (10:42 +0100)]
ethdev: move MAC filter type to i40e driver
net/i40e driver is the only user of the enum rte_mac_filter_type.
Move the define to the driver and use i40e_ prefix instead of rte_.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Thu, 22 Oct 2020 09:42:24 +0000 (10:42 +0100)]
ethdev: remove legacy MACVLAN filter type support
Instead of MACVLAN filter RTE flow API should be used.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Long Li [Thu, 22 Oct 2020 08:11:34 +0000 (01:11 -0700)]
net/vdev_netvsc: fix device probing error flow
If a device probe fails, the alarm is canceled and will no longer work
for previously probed devices.
Fix this by checking if alarm is necessary at the end of each device
probe. Reset the alarm if there are vdev_netvsc_ctx created.
Fixes:
e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality")
Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Jiawen Wu [Wed, 28 Oct 2020 02:29:57 +0000 (10:29 +0800)]
net/txgbe: prevent driver forcing application to exit
Replace the 'rte_panic()' with an error return.
Also change the type of the calling function.
Fixes:
a6712cd029a4 ("net/txgbe: add PF module init and uninit for SRIOV")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Xueming Li [Wed, 28 Oct 2020 10:44:39 +0000 (10:44 +0000)]
vdpa/mlx5: specify lag port affinity
If set TIS lag port affinity to auto, firmware assign port affinity on
each creation with Round Robin. In case of 2 PFs, if create virtq,
destroy and create again, then each virtq will get same port affinity.
To resolve this fw limitation, this patch sets create TIS with specified
affinity for each PF.
Fixes:
bff735011078 ("vdpa/mlx5: prepare virtio queues")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xueming Li [Wed, 28 Oct 2020 10:44:38 +0000 (10:44 +0000)]
common/mlx5: get number of ports that can be bonded
Get HCA capability: number of physical ports that can be bonded.
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Patrick Fu [Tue, 27 Oct 2020 08:50:19 +0000 (16:50 +0800)]
vhost: fix uninitialized local variable
This patch initializes a local parameter in async data path to avoid
compiler warnings.
Fixes:
cd6760da1076 ("vhost: introduce async enqueue for split ring")
Cc: stable@dpdk.org
Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xueming Li [Tue, 27 Oct 2020 08:28:45 +0000 (08:28 +0000)]
vdpa/mlx5: handle hardware error
When hardware error happens, vdpa didn't get such information and leave
driver in silent: working state but no response.
This patch subscribes firmware virtq error event and try to recover max
3 times in 3 seconds, stop virtq if max retry number reached.
When error happens, PMD log in warning level. If failed to recover,
outputs error log. Query virtq statistics to get error counters report.
Acked-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xueming Li [Tue, 27 Oct 2020 08:28:44 +0000 (08:28 +0000)]
common/mlx5: add virtq attributes error fields
Add the needed fields for virtq DevX object to read the error state.
Acked-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Patrick Fu [Tue, 27 Oct 2020 02:06:08 +0000 (10:06 +0800)]
vhost: fix guest/host physical address conversion
gpa_to_hpa() function almost always fails due to the wrong setup of
the binary tree search key. Since there has already been a similar
function gpa_to_first_hpa() available in the vhost, instead of fixing
the issue in its original logic, gpa_to_hpa() function is rewritten to
be a wrapper of the gpa_to_first_hpa() to avoid code redundancy.
Fixes:
e246896178e6 ("vhost: get guest/host physical address mappings")
Fixes:
faa9867c4da2 ("vhost: use binary search in address conversion")
Cc: stable@dpdk.org
Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Adrian Moreno [Mon, 26 Oct 2020 16:39:30 +0000 (17:39 +0100)]
net/virtio-user: set status on socket reconnect
Newer vhost-user backends will rely on SET_STATUS to start the device
so this required to support them.
Fixes:
57912824615f ("net/virtio-user: support vhost status setting")
Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Adrian Moreno [Mon, 26 Oct 2020 16:39:29 +0000 (17:39 +0100)]
net/virtio-user: do not assume vhost status feature
There are some status reads and updates that need to happen before the
protocol features are negotiated. Therefore, assuming the backend does
support this feature can lead to failures.
On server mode, do not assume the backend supports
VHOST_USER_PROTOCOL_F_STATUS. Activate it back on reconnection and
clear it on disconnection.
Fixes:
57912824615f ("net/virtio-user: support vhost status setting")
Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Adrian Moreno [Mon, 26 Oct 2020 16:39:28 +0000 (17:39 +0100)]
net/virtio-user: lock-protect status updates
In order to safely set and get the device status from different
threads (e.g: interrupt handlers).
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Adrian Moreno [Mon, 26 Oct 2020 16:39:27 +0000 (17:39 +0100)]
net/virtio-user: ignore result if status is unsupported
GET/SET STATUS is an optional feature, so it may not be negotiated. In
that case, the VIRTIO_GET_STATUS call will not update the status (given
as a pointer argument). Failing to identify this case would lead to
undefined behavior as the device status will be updated with the value
of a stack-allocated variable.
To fix this, return ENOTSUP if the feature is not supported and, in that
case, don't update device status.
Fixes:
44102e6298e7 ("net/virtio: check protocol feature in user backend")
Cc stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>