summaryrefslogtreecommitdiff
path: root/doc/guides/nics/mlx5.rst
AgeCommit message (Collapse)Author
14 daysnet/mlx5: adjust inline setting for large Tx queue sizesViacheslav Ovsiienko
The hardware may have limitations on maximal amount of supported Tx descriptors building blocks (WQEBB). Application requires the Tx queue must accept the specified amount of packets. If inline data feature is engaged the packet may require more WQEBBs and overall amount of blocks may exceed the hardware capabilities. Application has to make a trade-off between Tx queue size and maximal data inline size. In case if the inline settings are not requested explicitly with devarg keys the default values are used. This patch adjusts the applied default values if large Tx queue size is requested and default inline settings can not be satisfied due to hardware limitations. The explicitly requested inline setting may be aligned (enlarging only) by configurations routines to provide better WQEBB filling, this implicit alignment is the subject for adjustment either. The warning message is emitted to the log if adjustment happens. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-20net/mlx5: support modify VLAN ID on existing VLAN headerMoti Haimovsky
This commit adds support for modifying the VID of the outermost VLAN header already present in the packet. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-20net/mlx5: support modify VLAN ID on new VLAN headerMoti Haimovsky
This commit adds support for modifying the VLAN ID (VID) field in an about-to-be-pushed VLAN header. This feature can only modify the VID field of a new VLAN header yet to be pushed. It does not support modifying an existing or already pushed VLAN headers. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-20net/mlx5: support modifying VLAN priority on VLAN headerMoti Haimovsky
This commit adds support for modifying the VLAN priority (PCP) field in about-to-be-pushed VLAN header. This feature can only modify the PCP field of a new VLAN header yet to be pushed. It does not support modifying an existing or already pushed VLAN headers. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-20net/mlx5: support push flow action on VLAN headerMoti Haimovsky
This commit adds support for RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN using direct verbs flow rules. If present in the flow, The VLAN default values are taken from the VLAN item configuration. In this commit only the VLAN TPID value can be set since VLAN modification actions are not supported yet. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-20net/mlx5: support pop flow action on VLAN headerMoti Haimovsky
This commit adds support for RTE_FLOW_ACTION_TYPE_OF_POP_VLAN via direct verbs flow rules. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-08doc: add limitation with mlx5 Tx inline settingsViacheslav Ovsiienko
Introduces the possible limitations on maximal Tx queue size in descriptors if Tx inline data are enabled. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-07doc: update Tx inline settings in mlx5 guideViacheslav Ovsiienko
This patch updates mlx5 documentation in parts: - txq_inline_min parameter is described in more details, values are fixed - maximal amount of segments in multi-segment packets. Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06doc: add more details about mlx5 offloadsThomas Monjalon
Add firmware config for MPLS and DevX (required by LRO and DR). Add a table for queue offloads requirements. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06doc: add mlx5 design detailsThomas Monjalon
Some details about libibverbs were missing: - automatic detection by meson - main ways to access the device Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06doc: remove useless console syntax in mlx guidesThomas Monjalon
It is not needed to use "console" syntax highlighting for literal blocks. The file is easier to read by removing the code-block lines and simply having double colons in previous line. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06doc: fix wording and formatting of mlx5 guideThomas Monjalon
These are simple fixes of punctuation, anchor placement or wording. The table format is fixed to avoid having a long line in the first column. Fixes: 909be50a34d0 ("doc: update Mellanox guides and release notes") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06doc: improve firmware configuration in mlx5 guideThomas Monjalon
The command mlxconfig was not enough explained and too much verbose at the same time. The syntax is now explained in introduction before listing the options, without repeating the commands. Some options, which are explained elsewhere in the doc, are added to this list. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2019-08-06net/mlx5: fix packet size inline settingsViacheslav Ovsiienko
This patch fixes the default settings for packet size to inline with Enhanced Multi-Packet Write feature, allowing 256B packets to be inlined with Out-Of-the-Box settings. Fixes: 50724e1bba76 ("net/mlx5: update Tx definitions") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-31doc: update features supported by mlxThomas Monjalon
Flow control was not documented as a supported feature since the first fill of features matrix for mlx drivers. Flow API and CRC offload flag support in mlx4 were missing in the feature matrix when they were implemented (see below commits). Fixes: 46d5736a7049 ("net/mlx4: support basic flow items and actions") Fixes: ce07b1514d59 ("net/mlx4: fix CRC stripping capability report") Fixes: e86b85ca757b ("doc: fill nics features matrix for mlx") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29net/mlx5: handle LRO packets in regular Rx queueMatan Azrad
When LRO offload is configured in Rx queue, the HW may coalesce TCP packets from same TCP connection into single packet. In this case the SW should fix the relevant packet headers because the HW doesn't update them according to the new created packet characteristics but provides the update values in the CQE. Add update header code to the regular Rx burst function to support LRO feature. Make sure the first mbuf has enough space to include each TCP header, otherwise the header update may cross mbufs what complicates the operation too match. Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29net/mlx5: support mbuf headroom for LRO packetMatan Azrad
Patch [1] zeroes the mbuf headroom when the port is configured with LRO because when working with more than one stride per packet the HW cannot guaranty an headroom in the start stride of each packet. Change the solution to support mbuf headroom by adding an empty buffer as the first packet segment, scatter mode must be enabled to support it. [1] http://patches.dpdk.org/patch/56912/ Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23net/mlx5: zero LRO mbuf headroomMatan Azrad
LRO packet may consume all the stride memory, hence the PMD cannot guaranty head-room for the LRO mbuf. The issue is lack in HW support to write the packet in offset from the stride start. A new striding RQ feature may be added in CX6 DX to allow head-room and tail-room for the LRO strides. Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23net/mlx5: check conditions to enable LRODekel Peled
Use DevX API to read device LRO capabilities. Check if LRO is supported and can be enabled. Check if MPRQ is supported and can be used. Enable MPRQ for LRO use if not enabled by user. Added note for mlx5_mprq_enabled(), to emphasize that LRO enables MPRQ. Disable CQE compression and CRC stripping if LRO is enabled. Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23net/mlx5: introduce LRODekel Peled
Add command-line argument to set LRO session timeout. Add LRO settings struct in PMD configuration struct. Add support of LRO offload in port configuration. Add macros and function to check if LRO is supported and enabled. Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23net/mlx5: add Tx devargsViacheslav Ovsiienko
This patch introduces new mlx5 PMD devarg options: - txq_inline_min - specifies minimal amount of data to be inlined into WQE during Tx operations. NICs may require this minimal data amount to operate correctly. The exact value may depend on NIC operation mode, requested offloads, etc. - txq_inline_max - specifies the maximal packet length to be completely inlined into WQE Ethernet Segment for ordinary SEND method. If packet is larger the specified value, the packet data won't be copied by the driver at all, data buffer is addressed with a pointer. If packet length is less or equal all packet data will be copied into WQE. - txq_inline_mpw - specifies the maximal packet length to be completely inlined into WQE for Enhanced MPW method. Driver documentation is also updated. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23net/mlx5: remove Tx implementationViacheslav Ovsiienko
This patch removes the existing Tx datapath code as preparation step before introducing the new implementation. The following entities are being removed: - deprecated devargs support - tx_burst() routines - related PRM definitions - SQ configuration code - Tx routine selection code - incompatible Tx completion code The following devargs are deprecated and ignored: - "txq_inline" is going to be converted to "txq_inline_max" for compatibility issue - "tx_vec_en" - "txqs_max_vec" - "txq_mpw_hdr_dseg_en" - "txq_max_inline_len" is going to be converted to "txq_inline_mpw" for compatibility issue The deprecated devarg keys are recognized by PMD and ignored/converted to the new ones in order not to block device probing. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23net/mlx5: support IP-in-IP tunnelXiaoyu Min
Enabled IP-in-IP tunnel type support on DV/DR flow engine. This includes the following combination: - IPv4 over IPv4 - IPv4 over IPv6 - IPv6 over IPv4 - IPv6 over IPv6 MLX5 NIC supports IP-in-IP tunnel via FLEX Parser so need to make sure fw using FLEX Paser profile 0. mlxconfig -d <mst device> -y set FLEX_PARSER_PROFILE_ENABLE=0 The example testpmd commands would be: - Match on IPv4 over IPv4 packets and do inner RSS: testpmd> flow create 0 ingress pattern eth / ipv4 proto is 0x04 / ipv4 / udp / end actions rss level 2 queues 0 1 2 3 end / end - Match on IPv6 over IPv4 packets and do inner RSS: testpmd> flow create 0 ingress pattern eth / ipv4 proto is 0x29 / ipv6 / udp / end actions rss level 2 queues 0 1 2 3 end / end Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-08net/mlx5: support matching on ICMP/ICMP6Xiaoyu Min
On DV/DR flow engine, MLX5 can match on ICMP/ICMP6's code and type field via FLEX Parser, which can be enabled by config FW using FLEX Parser profile 2: mlxconfig -d <mst device> -y set FLEX_PARSER_PROFILE_ENABLE=2 The testpmd commands could be: testpmd> flow create 0 ingress pattern eth / ipv4 / icmp type is 8 code is 0 / end actions rss queues 0 1 end / end testpmd> flow create 0 ingress pattern eth / ipv6 / icmp6 type is 128 code is 0 / end actions rss queues 0 1 end / end Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-05net/mlx5: remove TCF supportMoti Haimovsky
This commit removes the support of configuring the device E-switch using TCF since it is now possible to configure it via DR (direct verbs rules), and by that to also remove the PMD dependency in libmnl. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-06-14net/mlx5: add log file procedure for debug dataMatan Azrad
Add a global function in the PMD which dumps debug information to specific file. The data can be printed in hexadecimal format or as regular string. The number of debug files per PMD entity should be limited by a new PMD probe parameter called max_dump_files_num. The files will be created in the /var/log directory or in the current directory. Cc: stable@dpdk.org Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-05-13doc: update Mellanox guides and release notesOri Kam
This patch adds some missing features to Mellanox drivers release notes. It also updates the mlx5/mlx4 documentations. Fixes: d85b204b5dba ("doc: update release notes for Mellanox drivers") Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-05-08doc: fix typo in mlx5 guideYongseok Koh
Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-03doc: fix spelling reported by aspell in guidesJohn McNamara
Fix spelling errors in the guide docs. Signed-off-by: John McNamara <john.mcnamara@intel.com> Acked-by: Rami Rosen <ramirose@gmail.com>
2019-04-05net/mlx5: enable secondary process to register DMA memoryYongseok Koh
The Memory Region (MR) for DMA memory can't be created from secondary process due to lib/driver limitation. Whenever it is needed, secondary process can make a request to primary process through the EAL IPC channel (rte_mp_msg) which is established on initialization. Once a MR is created by primary process, it is immediately visible to secondary process because the MR list is global per a device. Thus, secondary process can look up the list after the request is successfully returned. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-05net/mlx5: add control of excessive memory pinning by kernelYongseok Koh
A new PMD parameter (mr_ext_memseg_en) is added to control extension of memseg when creating a MR. It is enabled by default. If enabled, mlx5_mr_create() tries to maximize the range of MR registration so that the LKey lookup tables on datapath become smaller and get the best performance. However, it may worsen memory utilization because registered memory is pinned by kernel driver. Even if a page in the extended chunk is freed, that doesn't become reusable until the entire memory is freed and the MR is destroyed. To make freed pages available immediately, this parameter has to be turned off but it could drop performance. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-05net/mlx5: fix external memory registrationYongseok Koh
Secondary process is not allowed to register MR due to a restriction of library and kernel driver. Fixes: 7e43a32ee060 ("net/mlx5: support externally allocated static memory") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-05doc: fix typos in mlx5 guideDekel Peled
Correct typing mistakes: appiled ==> applied tarffic ==> traffic Fixes: 0280f2812284 ("doc: add mlx5 E-Switch VXLAN tunnels limitations") Cc: stable@dpdk.org Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-12mk: use linux and freebsd in config namesBruce Richardson
Rather than using linuxapp and bsdapp everywhere, we can change things to use the, more readable, terms "linux" and "freebsd" in our build configs. Rather than renaming the configs we can just duplicate the existing ones with the new names using symlinks, and use the new names exclusively internally. ["make showconfigs" also only shows the new names to keep the list short] The result is that backward compatibility is kept fully but any new builds or development can be done using the newer names, i.e. both "make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc" work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-01-31doc: add references to flow isolated mode in NICs guideThomas Monjalon
Some drivers (mlx, mvpp2, sfc) support the flow isolated mode, but the feature was not advertised. A reference to the feature description is added for each driver. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-31doc: add Mellanox EN support in mlx5 guideYongseok Koh
Mellanox EN package is supported along with Mellanox OFED. Mellanox EN is distriubuted for Ethernet users. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-31doc: add mlx5 note for Bluefield build configurationYongseok Koh
Fixes: d14e4e976f65 ("config: add Mellanox BlueField armv8 SoC") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-18net/mlx5: fix Rx packet paddingYongseok Koh
Rx packet padding is supposed to be set by an environment variable - MLX5_PMD_ENABLE_PADDING, but it has been missing for some time by mistake. Rather than using such a variable, a PMD parameter (rxq_pkt_pad_en) is added instead. Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Reviewed-by: Erez Ferber <erezf@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14config: add static linkage of mlx dependencyThomas Monjalon
The libraries provided by rdma-core may be statically linked if enabling CONFIG_RTE_IBVERBS_LINK_STATIC in the make-based build. If CONFIG_RTE_BUILD_SHARED_LIB is disabled, the applications will embed the mlx PMDs with ibverbs and the mlx libraries. If CONFIG_RTE_BUILD_SHARED_LIB is enabled, the mlx PMDs will embed ibverbs and the mlx libraries. Support with meson may be added later. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-14config: gather options for dlopen mlx dependencyThomas Monjalon
Rename options CONFIG_RTE_LIBRTE_MLX4_DLOPEN_DEPS and CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS to a single option CONFIG_RTE_IBVERBS_LINK_DLOPEN. Rename meson option enable_driver_mlx_glue to ibverbs_link. There was no good reason for setting a different link option for mlx4 and mlx5. Having a single common option makes it easier to understand and unify make and meson systems. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-01-03net/mlx5: add ConnectX-6 device IDsWisam Jaddo
This commit includes the add of: - ConnectX-6 device ID - ConnectX-6 SRIOV device ID Signed-off-by: Wisam Jaddo <wisamm@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-12-13net/mlx5: report imissed statisticsTom Barbette
The imissed counters (number of packets dropped because the queues were full) were actually reported through xstats as "rx_out_of_buffer" but was not reported through stats. Following a recent discussion on the ML, as there is no way to tell the user if a counter is implemented or not, this should be considered a bug. For example, user looking at imissed will think the packets are lost before reaching the device. Signed-off-by: Tom Barbette <barbette@kth.se> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-22doc: add mlx5 E-Switch VXLAN tunnels limitationsViacheslav Ovsiienko
This patch adds limitation notice for MLX5 PMD regarding VXLAN tunnels support on E-Switch Flows. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2018-11-21doc: update Mellanox supported OFED versionShahaf Shuler
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14doc: add mlx5 IPv6 multicast limitation in VMDekel Peled
This patch adds limitation notice for MLX5 PMD. IPv6 multicast messages are not received on VM when promiscuous and allmulticast modes are off, due to netlink restriction. Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14doc: add mlx5 Direct Verbs flow engine limitationShahaf Shuler
Would be good to add also a code which disable the dv_flow_en the user requested. However such support will need to use new netlink command to query the switchdev mode from the underlying kernel. Considering the current 18.11 release is close to RC3, only a documentation is added. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-05net/mlx5: support default RSS key as nullOphir Munk
Applications which add RSS rules must supply an RSS key and length. If an application is only interested in default RSS operation it should not care about the exact RSS key. By setting the key to NULL - the PMD will use the default RSS key. In addition if the application does not care about the RSS type it can set it to 0 and the PMD will use the default type (ETH_RSS_IP). Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-05net/mlx5: make vectorized Tx threshold configurableYongseok Koh
Add txqs_max_vec parameter to configure the maximum number of Tx queues to enable vectorized Tx. And its default value is set according to the architecture and device type. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-05net/mlx5: add 128B padding of Rx completion entryYongseok Koh
A PMD parameter (rxq_cqe_pad_en) is added to enable 128B padding of CQE on RX side. The size of CQE is aligned with the size of a cacheline of the core. If cacheline size is 128B, the CQE size is configured to be 128B even though the device writes only 64B data on the cacheline. This is to avoid unnecessary cache invalidation by device's two consecutive writes on to one cacheline. However in some architecture, it is more beneficial to update entire cacheline with padding the rest 64B rather than striding because read-modify-write could drop performance a lot. On the other hand, writing extra data will consume more PCIe bandwidth and could also drop the maximum throughput. It is recommended to empirically set this parameter. Disabled by default. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-10-11net/mlx5: add runtime parameter to enable Direct VerbsOri Kam
DV flow API is based on new kernel API and is missing some functionality like counter but add other functionality like encap. In order not to affect current users even if the kernel supports the new DV API it should be enabled only manually. Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>