summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_prm.h
AgeCommit message (Collapse)Author
2018-10-26net/mlx5: support metadata as flow rule criteriaDekel Peled
As described in series starting at [1], it adds option to set metadata value as match pattern when creating a new flow rule. This patch adds metadata support in mlx5 driver, in two parts: - Add the validation and setting of metadata value in matcher, when creating a new flow rule. - Add the passing of metadata value from mbuf to wqe when indicated by ol_flag, in different burst functions. [1] "ethdev: support metadata as flow rule criteria" http://mails.dpdk.org/archives/dev/2018-September/113269.html Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-10-11net/mlx5: add Direct Verbs translate itemsOri Kam
This commit handles the translation of the requested flow into Direct Verbs API. The Direct Verbs introduce the matcher object which acts as shared mask for all flows that are using the same mask. So in this commit we translate the item and get in return a matcher and the value that should be matched. Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-10-11net/mlx5: add Direct Verbs prepare functionOri Kam
This function allocates the Direct Verbs device flow, and introduce the relevant PRM structures. This commit also adds the matcher object. The matcher object acts as a mask and should be shared between flows. For example all rules that should match source IP with full mask should use the same matcher. A flow that should match dest IP or source IP but without full mask should have a new matcher allocated. Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-07-12net/mlx5: use a macro for the RSS key sizeNelio Laranjeiro
ConnectX 4-5 support only 40 bytes of RSS key, using a compiled size hash key is not necessary. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-07-03net/mlx5: add new fields in Rx completion entryYongseok Koh
Stride index is added to mlx5_mini_cqe8 structure and WQE ID is added to mlx5_cqe structure. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-05-14net/mlx5: add Multi-Packet Rx supportYongseok Koh
Multi-Packet Rx Queue (MPRQ a.k.a Striding RQ) can further save PCIe bandwidth by posting a single large buffer for multiple packets. Instead of posting a buffer per a packet, one large buffer is posted in order to receive multiple packets on the buffer. A MPRQ buffer consists of multiple fixed-size strides and each stride receives one packet. Rx packet is mem-copied to a user-provided mbuf if the size of Rx packet is comparatively small, or PMD attaches the Rx packet to the mbuf by external buffer attachment - rte_pktmbuf_attach_extbuf(). A mempool for external buffers will be allocated and managed by PMD. Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-04-27net/mlx5: support generic tunnel offloadingXueming Li
This commit adds support for generic tunnel TSO and checksum offload. PMD will compute the inner/outer headers offset according to the mbuf fields. Hardware will do calculation based on offsets and types. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-04-11align SPDX Mellanox copyrightsShahaf Shuler
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-02-01net/mlx5: use SPDX tags in 6WIND copyrighted filesOlivier Matz
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-06net/mlx5: support upstream rdma-coreShachar Beiser
This removes the dependency on specific Mellanox OFED libraries by using the upstream rdma-core and linux upstream community code. Both rdma-core upstream and Mellanox OFED are Linux user-space packages: 1. Rdma-core is Linux upstream user-space package.(Generic) 2. Mellanox OFED is Mellanox's Linux user-space package.(Proprietary) The difference between the two are the APIs towards the kernel. Support for x86-32 is removed due to issues in rdma-core library. ICC compilation will be supported as soon as the following patch is integrated in rdma-core: https://marc.info/?l=linux-rdma&m=150643474705690&w=2 Signed-off-by: Shachar Beiser <shacharbe@mellanox.com> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06net/mlx5: enforce Tx num of segments limitationShahaf Shuler
Mellanox NICs has a limitation on the number of mbuf segments a multi segment mbuf can have. The max number depends on the Tx offloads requested. The current code not enforce such limitation, which might cause malformed work requests to be written to the device. This commit adds verification for the number of mbuf segments posted to the device. In case of overflow the packet will not be sent. In addition update the nic documentation with the limitation. Considering device limitation is 63 data segments in a work request, the maximum number of segment in mbuf was calculated taking TSO as the worst case: max_nb_segs = 63 - (control_segment + ethernet segment + TSO headers inline + inline segment + extra inline to align to cacheline) Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06net/mlx5: remove old MLNX OFED 3.3 verificationNélio Laranjeiro
This version of MLNX_OFED is no more supported. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-04-04net/mlx5: fix mark id retrievalNélio Laranjeiro
Mark ID in the completion queue entry is 24 bits, the remaining 8 bits are reserved and may be nonzero. Do not take them into account when looking for marked packets. Fixes: ea3bc3b1df94 ("net/mlx5: support mark flow action") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04net/mlx5: add enhanced multi-packet send for ConnectX-5Yongseok Koh
ConnectX-5 supports enhanced version of multi-packet send (MPS). An MPS Tx descriptor can carry multiple packets either by including pointers of packets or by inlining packets. Inlining packet data can be helpful to better utilize PCIe bandwidth. In addition, Enhanced MPS supports hybrid mode - mixing inlined packets and pointers in a descriptor. This feature is enabled by default if supported by HW. Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04net/mlx5: add hardware checksum offload for tunnel packetsShahaf Shuler
Prior to this commit Tx checksum offload was supported only for the inner headers. This commit adds support for the hardware to compute the checksum for the outer headers as well. The support is for tunneling protocols GRE and VXLAN. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04net/mlx5: support flag flow actionNélio Laranjeiro
This action is not terminal in this PMD, it must be followed by a queue action. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-01-30net/mlx5: fix Rx packet validation and typeNélio Laranjeiro
Rx checksum validation and packet type offloads are read from the wrong location. Fixes: 501505c5608a ("net/mlx: fix IPv4 and IPv6 packet type") Fixes: 350f4c482e46 ("net/mlx5: fix Rx checksum macros") Fixes: 6218063b39a6 ("net/mlx5: refactor Rx data path") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17net/mlx5: use vector types to speed up processingNélio Laranjeiro
Let compiler automatically use the vector capabilities of the target machine to optimize instructions. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17net/mlx5: use work queue buffer as a raw bufferNélio Laranjeiro
Define a single work queue element type that encompasses them all. It includes control, Ethernet segment and raw data all grouped in a single place. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17net/mlx5: support mark flow actionNélio Laranjeiro
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-11-07net/mlx5: define explicit fields for Rx offloadsNelio Laranjeiro
This commit redefines the completion queue element structure as the original lacks the required fields. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-11-07net/mlx5: fix Rx checksum macrosNelio Laranjeiro
Add missing: - MLX5_CQE_RX_IPV4_PACKET - MLX5_CQE_RX_IPV6_PACKET - MLX5_CQE_RX_OUTER_IPV4_PACKET - MLX5_CQE_RX_OUTER_IPV6_PACKET - MLX5_CQE_RX_TUNNEL_PACKET - MLX5_CQE_RX_OUTER_IP_CSUM_OK - MLX5_CQE_RX_OUTER_TCP_UDP_CSUM_OK Fixes: 51a50a3d9b8f ("net/mlx5: add definitions for data path without Verbs") Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-09-30net/mlx5: support Mellanox OFED 3.4Nélio Laranjeiro
Some macros are renamed by Mellanox OFED 3.4. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-09-30net/mlx5: rework hardware structuresNélio Laranjeiro
Rework Work Queue Element (aka WQE) structures to fit PMD needs. A WQE is an aggregation of 16 bytes elements known as "data segments" (aka dseg). The only common part is the first two elements i.e. the control one to define the job type, and the Ethernet segment which embed offload requests with other information, after that, it can have: - a raw data packet, - a data pointer to the packet itself, - both. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2016-09-30net/mlx: fix debug build with gcc 6.1Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored. error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas] #pragma GCC diagnostic ignored "-pedantic" ^~~~~~~~~~~ These errors can be removed by changing the "-pedantic" to "-Wpedantic". Fixes: 7fae69eeff13 ("mlx4: new poll mode driver") Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-06-27net/mlx5: add definitions for data path without VerbsNélio Laranjeiro
These structures and macros extend those exposed by libmlx5 (in mlx5_hw.h) to let the PMD manage work queue and completion queue elements directly. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>