summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2019-11-26remove blank lines at end of fileStephen Hemminger
Remove trailing blank lines. They serve no purpose and are just editor leftovers. These can cause git to complain about whitespace errors during merges. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-21bus/pci: clear driver on detachMatan Azrad
When probing, a bus is responsible for filling the driver field to indicate the device is bound. Let's clear this field when detaching to keep a consistent behavior. This is not a fix per se, since the device is freed when detaching. But at least clearing the field has been added to remind that the driver field has a meaning for the EAL. Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20build: align symbols with global ABI versionPawel Modrak
Merge all versions in linker version script files to DPDK_20.0. This commit was generated by running the following command: :~/DPDK$ buildtools/update-abi.sh 20.0 Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20common/octeontx: add missing public symbolAnatoly Burakov
The logtype symbol was missing from the .map file. Add it. Fixes: d8dd31652cf4 ("common/octeontx: move mbox to common folder") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20build: remove individual library versionsAnatoly Burakov
Since the library versioning for both stable and experimental ABI's is now managed globally, the LIBABIVER and version variables no longer serve any useful purpose, and can be removed. The replacement in Makefiles was done using the following regex: ^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)? (LIBABIVER := numbers, optionally preceded by a comment and optionally succeeded by an empty line) The replacement for meson files was done using the following regex: ^(#.*\n)?version\s*=\s*\d+\n(\s*\n)? (version = numbers, optionally preceded by a comment and optionally succeeded by an empty line) [David]: those variables are manually removed for the files: - drivers/common/qat/Makefile - lib/librte_eal/meson.build [David]: the LIBABIVER is restored for the external ethtool example library. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20build: change ABI versioning to globalMarcin Baran
As per new ABI policy [1], all of the libraries are now versioned using one global ABI version. Stable libraries use the MAJOR.MINOR ABI version for their shared objects, while experimental libraries use the 0.MAJORMINOR convention for their versioning. Experimental library versioning is managed globally. Changes in this patch implement the necessary steps to enable that. The CONFIG_RTE_MAJOR_ABI option was introduced to permit multiple DPDK versions installed side by side. The problem is now addressed through the new ABI policy, and thus can be removed. [David] For external libraries relying on Makefile, LIBABIVER is preserved to avoid using DPDK global ABI version. [1] https://doc.dpdk.org/guides/contributing/abi_policy.html Signed-off-by: Marcin Baran <marcinx.baran@intel.com> Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20net/mlx5: fix Rx queue release assertionsMatan Azrad
In debug mode, there is assertion to validate the CQ object before the release. Wrongly, the assertion is done for any type of RX queue even if it doesn't use CQ at all, for example in hairpin Rx queue. Ignore CQ assertion when hairpin queue is released. Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues") Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
2019-11-20net/hinic: fix secondary processXiaoyun Wang
The secondary process does not need to register interrupt handle, remove rte_intr_callback_register from secondary process branch. Fixes: 64727024d2fd ("net/hinic: add device initialization") Cc: stable@dpdk.org Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-11-20net/mlx5: fix L3 encapsulation flow validationMatan Azrad
In order to configure L3 encapsulation\decapsulation flow to mlx5 devices, 2 actions should be added to the flow actions list: RTE_FLOW_ACTION_TYPE_RAW_DECAP and RTE_FLOW_ACTION_TYPE_RAW_ENCAP. One of the validations for this scenario is to check that modify actions is not done before the L3 decapsulation, because it doesn't make sense to decapsulate a modified data. Wrongly, this check was done for the case of L3 encapsulation what causes a validation failure in modify + L3 encapsulation flow. Ignore this check in case of L3 encapsulation. Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs") Cc: stable@dpdk.org Signed-off-by: Matan Azrad <matan@mellanox.com>
2019-11-20net/bnxt: fix flow check for null spec and maskAjit Khaparde
bnxt_validate_and_parse_flow_type already has protocol specific NULL checks for rte_flow_item spec and mask and take actions accordingly. A check at the top of the loop is redundant and is preventing the protocol specific checks from being executed. Fixes: b7e01f386059 ("net/bnxt: handle cleanup if flow creation fails") Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20net/bnxt: fix vector Rx selectionLance Richardson
Take DEV_RX_OFFLOAD_RSS_HASH into account when deciding whether vector mode receive can be enabled. Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities") Signed-off-by: Lance Richardson <lance.richardson@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-11-20net/bnxt: fix jumbo frame configuration in firmwareRahul Gupta
In order to prevent reconfiguration of firmware resources for every MTU change, configure FW with max MTU value using hwrm_func_cfg to support all frame sizes. There is no need to overwrite the driver level MTU variable data->mtu with the FW MTU. Fixes: 905cd45ce30e ("net/bnxt: use configured MTU during load") Cc: stable@dpdk.org Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20net/bnxt: fix resource qcaps with older FWAjit Khaparde
On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an error. This is because the command was not implemented completely in FW till the subsequent version. Ignore the error and continue with the driver initialization. Fixes: edafb57ba4a1 ("net/bnxt: fix VF resource allocation") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20net/ice: fix flow director rule duplication checkYahui Cao
When FDIR filter detects duplicated rule and then returns EEXIST, ice flow will capture this error and return immediately. Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework") Signed-off-by: Yahui Cao <yahui.cao@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20net/mlx5: fix hairpin split detectionOri Kam
When creating a flow, the flow is checked if it should be split into 2 flows based on the queue/rss acton. If the RSS action with given without any queues, it will result in crash due to the fact that the function checks the queue type. This commit fixes this issue by checking if the rss action is not empty, and at least one queue. Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows") Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20net/mlx5: fix assert in Tx inline settingsViacheslav Ovsiienko
Assert condition is fixed to not alert for the case when multi-packet write is not supported/engaged at all. Fixes: b53cd86965a1 ("net/mlx5: adjust inline setting for large Tx queue sizes") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20net/mlx5: fix port action for LAGViacheslav Ovsiienko
To support LAG configurations the mlx5dv_dr_action_create_dest_ib_port() should be called instead of mlx5dv_dr_action_create_dest_vport(). Fixes: f07341e7aed3 ("net/mlx5: update source and destination vport translations") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
2019-11-20net/ice: add flow mark hintQi Zhang
Since not all data paths support flow mark, the driver needs a hint from application to select the correct data path if flow mark is required. The patch introduces a devarg "flow-mark-support" as a workaround solution, since a standard way is still ongoing. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-11-20net/ice: fix flow director rule after device stopYahui Cao
By moving irq enable/disable from device start/stop to FDIR setup/teardown, FDIR queue irq config is independent of LAN queue irq config. So device stop will not cause FDIR rule failure. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Signed-off-by: Yahui Cao <yahui.cao@intel.com> Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Tested-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20net/ice: fix flow director programming status checkYahui Cao
To make sure if FDIR programming succeed or fail, legacy programming status descriptor WB format is enabled and FDIR queue irq is opened. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Signed-off-by: Yahui Cao <yahui.cao@intel.com> Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Tested-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20net/ice: fix flow type selection for flow directorQi Zhang
The FDIR parser will select ICE_FLTR_PTYPE_NONF_IPV4_OTHER as flow type for an IPv4 UDP flow with empty l4 matching field which is not correct. Same issues happens on all the combination between IPv4/IPv6 and UDP/TCP/SCTP cases. The patch fixes all the wrong flow ptype selections. Fixes: f5cafa961fae ("net/ice: add flow director create and destroy") Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-11-20net/mlx5: fix Tx doorbell write memory barrierViacheslav Ovsiienko
As the result of testing it was found that some hosts have the performance penalty imposed by required write memory barrier after doorbell writing. Before 19.08 release there was some heuristics to decide whether write memory barrier should be performed. For the bursts of recommended size (or multiple) it was supposed there were some extra ongoing packets in the next burst and write memory barrier may be skipped (supposed to be performed in the next burst, at least after descriptor writing). This patch restores that behaviour, the devargs tx_db_nc=2 must be specified to engage this performance tuning feature. Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20net/mlx5: change default flow engine to DVDekel Peled
The default flow engine is Verbs flow engine, for legacy reasons. This patch changes the default to DV flow engine (dv_flow_en = 1). Documentation is updated accordingly. Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20net/af_packet: advertise Tx offload capabilitiesPaul Atkins
The af_packet pmd already supports MULTI_SEG tx packets, and tx VLAN_INSERT so advertise these capabilities. Signed-off-by: Paul Atkins <paul.atkins@intl.att.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20net/mlx5: fix vport index in port actionViacheslav Ovsiienko
The rdma_core routine mlx5dv_dr_create_flow_action_dest_vport() requires the vport id parameter to create port action. The register c[0] value was used to deduce the port id value and it fails in bonding configuration. The correct way is to apply vport_num value queried from the rdma_core library. Fixes: f07341e7aed3 ("net/mlx5: update source and destination vport translations") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20net/mlx5: fix flow table hash list conversionMatan Azrad
For the case when DR is not supported and DV is supported: multi-tables feature is off. In this case, only table 0 is supported. Table 0 structure wrongly was not created what prevented any matcher object to be created and even caused crashes. Create the table hash list in DV case too. Create table zero empty structure for each domain when DR is not supported. Allow NULL DR internal table object to be used. Fixes: 860897d2895a ("net/mlx5: reorganize flow tables with hash list") Signed-off-by: Matan Azrad <matan@mellanox.com>
2019-11-20net/ice/base: update versionQi Zhang
Update base code version info in readme. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-11-20net/memif: support zero-copy slaveJakub Grajciar
Zero-copy slave support for memif PMD. Slave interface exposes DPDK memory to master interface. Only single file segments are supported (EAL option --single-file-segments). Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20net/bonding: fix selection logicKrzysztof Kanas
Arrays agg_count and agg_bandwidth should be indexed by slave_id not by aggregator port_id. The new_agg_id should be chosen as slave_id from slaves table in different selection modes. Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes") Cc: stable@dpdk.org Signed-off-by: Krzysztof Kanas <kkanas@marvell.com> Acked-by: Chas Williams <chas3@att.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20net: use IPV4 VHL constantReshma Pattan
Use new macro RTE_IPV4_VHL_DEF instead of IP_VHL_DEF wherever applicable. Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20drivers/net: fix RSS hash offload flag if no RSSAndrew Rybchenko
By default RSS hash delivery (offload) is bound to RSS mode and it is incorrect to advertise it as enabled if Rx multi-queue mode has no RSS. Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities") Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20net/octeontx2: support reduced set of packet typesPavan Nikhilesh
Add support to set supported ptypes for octeontx2 and remove devarg scheme to disable ptype parsing support as application can use rte_eth_dev_set_ptypes() normative API to enable the same use case. Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20net/octeontx2: fix PTP configurations for VFHarman Kalra
Issue has been observed if PTP is already enabled on PF and later VFs are configured. Since PTP requires mbuf data off to be shifted by 8 bytes, due to this l3fwd/l2fwd was not working with VFs. Also some extra garbage bytes were observed in packet data when ptp was enabled. Fixes: b5dc3140448e ("net/octeontx2: support base PTP") Cc: stable@dpdk.org Signed-off-by: Harman Kalra <hkalra@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20net/octeontx2: fix error handling after CQ initAnoob Joseph
After otx2_nix_register_cq_irqs() is called and the IRQs are setup, otx2_nix_unregister_cq_irqs() need to be called in the subsequent error exit paths. Fixes: d34db5ccbf30 ("net/octeontx2: fix driver reconfiguration") Cc: stable@dpdk.org Signed-off-by: Anoob Joseph <anoobj@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20net/octeontx2: add Rx/Tx burst mode infoSunil Kumar Kori
Retrieve burst mode information according to the selected Rx/Tx mode and offloads. Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20net/bnxt: fix IP checksum error indicationKalesh AP
Update "mbuf->ol_flags" correctly for 'Checksum Unknown' errors for both tunneled and non-tunneled IP packets. Fixes: b875339622a3 ("net/bnxt: fix L4 checksum indication in non-vector Rx") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20raw/ifpga: introduce IRQ functionsTianfei Zhang
Introducing new register and unregister API for ifpga interrupt. 1. register FME and AFU interrupt ifpga_register_msix_irq() 2. unregister FME and AFU interrupt ifpga_unregister_msix_irq() On PAC N3000 card, there is one PCIe MSIX interrupt for FME management, like the error report, thermal management, we use this interrupt in ifpga_rawdev device driver. on the other hand, there are about 4 PCIe MSIX interrupts are reserved for AFU which end-user can use those interrupts in their AFU logic design. End-user can use those APIs to register interrupt handler in their AFU drivers. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: support multiple cardsTianfei Zhang
In PAC N3000 card, there is one MAX10 chip in each card, and all of the sensors are connected to MAX10 chip. To support multiple cards in one server, we introducing a sensor device list under intel_max10_device instead of a global list. On the other hand, we using separate intel_max10_device instance for each opae_adatper. Add mutex lock on do_transaction() function for SPI driver to avoid race condition. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga: support lightweight FPGA imageAndy Pei
if fpga image support lightweight feature, set afu uuid to all 0, ipn3ke representor will not be probed. Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: get board infoTianfei Zhang
Add new API to get the board info. opae_mgr_get_board_info() Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: clean FME errorsTianfei Zhang
Clean fme errors register when some fme errors occurred. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: configure FEC modeTianfei Zhang
We can change the PKVL FEC mode when the A10 NIOS FW initialization. The end-user can use this feature the change the FEC mode, the default mode is RS FEC mode. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: support max10 security featureTianfei Zhang
In PAC N3000 Card, MAX10 Board Management Controller (BMC) implements the security functionality. Security functionality adds secure Remote System Update (RSU) authentication and integrity checks for FPGA flat image, and FW updates to the card. This patch adds security feature support for MAX10, in secure solution some registers and the content of the Device Tree changes. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20net/ipn3ke: remove configuration for i40e port bondingRosen Xu
The ipn3ke board FPGA and i40e BDF scan has added in ifpga_rawdev, so it doesn't need to provide configuration for i40e port bonding. Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga: scan PCIe BDF device treeRosen Xu
Add PCIe BDF devices tree scan for ipn3ke. Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga: add SEU error handlerRosen Xu
Add SEU interrupt support for FPGA. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: update SEU register definitionTianfei Zhang
Update the SEU register definition. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: introduce sensor functionsTianfei Zhang
Introducing sensor APIs to PMD driver for PAC N3000 card. Those sensor APIs: 1. opae_mgr_for_each_sensor() 2. opae_mgr_get_sensor_by_name() 3. opae_mgr_get_sensor_by_id() 4. opae_mgr_get_sensor_value_by_name() 5. opae_mgr_get_sensor_value_by_id() 6. opae_mgr_get_sensor_value() Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: support sensorTianfei Zhang
The sensor devices are connected in MAX10 FPGA. we used the device tree to describe those sensor devices. Parse the device tree to get the sensor devices and add them into a list. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20raw/ifpga/base: align send buffer for SPITianfei Zhang
The length of send buffer of SPI bus should be 4bytes align. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>