#
ed9726ce |
| 27-Mar-2021 |
Yunjian Wang <wangyunjian@huawei.com> |
net/mlx5: fix using flow tunnel before null check
Coverity flags that 'ctx->tunnel' variable is used before it's checked for NULL. This patch fixes this issue.
Coverity issue: 366201 Fixes: 868d2e3
net/mlx5: fix using flow tunnel before null check
Coverity flags that 'ctx->tunnel' variable is used before it's checked for NULL. This patch fixes this issue.
Coverity issue: 366201 Fixes: 868d2e342cf3 ("net/mlx5: fix tunnel offload hub multi-thread protection") Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
fb7ad441 |
| 21-Mar-2021 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: replace callback getting filter operations
Since rte_flow is the only API for filtering operations, the legacy driver interface filter_ctrl was too much complicated for the simple task of ge
ethdev: replace callback getting filter operations
Since rte_flow is the only API for filtering operations, the legacy driver interface filter_ctrl was too much complicated for the simple task of getting the struct rte_flow_ops.
The filter type RTE_ETH_FILTER_GENERIC and the filter operarion RTE_ETH_FILTER_GET are removed. The new driver callback flow_ops_get replaces filter_ctrl.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
048f0d45 |
| 18-Mar-2021 |
Xiaoyu Min <jackmin@nvidia.com> |
net/mlx5: support RSS expansion for IPv6 GRE
Currently RSS expansion only support IPv4 as GRE payload or delivery protocol (RFC2784). IPv6 as GRE payload or delivery protocol (RFC7676) is not suppor
net/mlx5: support RSS expansion for IPv6 GRE
Currently RSS expansion only support IPv4 as GRE payload or delivery protocol (RFC2784). IPv6 as GRE payload or delivery protocol (RFC7676) is not supported.
This patch add RSS expansion for RFC7676 so PMD can expand flow item correctly.
Fixes: f4b901a46aec ("net/mlx5: add flow GRE item") Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
4eefb20f |
| 07-Mar-2021 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
net/mlx5: fix Rx metadata leftovers
The Rx metadata might use the metadata register C0 to keep the values. The same register C0 might be used by kernel for source vport value handling, kernel uses u
net/mlx5: fix Rx metadata leftovers
The Rx metadata might use the metadata register C0 to keep the values. The same register C0 might be used by kernel for source vport value handling, kernel uses upper half of the register, leaving the lower half for application usage.
In the extended metadata mode 1 (dv_xmeta_en devarg is assigned with value 1) the metadata width is 16 bits only, the Rx datapath code fetched the entire 32-bit value of the metadata register and presented one to application. The patch provides data masking depending on the chosen metadata mode.
Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
1b9e9826 |
| 09-Mar-2021 |
Thomas Monjalon <thomas@monjalon.net> |
common/mlx5: remove extra line feed in log messages
The macro DRV_LOG already includes a terminating line feed character defined in PMD_DRV_LOG_. The extra line feeds added in some messages are remo
common/mlx5: remove extra line feed in log messages
The macro DRV_LOG already includes a terminating line feed character defined in PMD_DRV_LOG_. The extra line feeds added in some messages are removed.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c86e5b90 |
| 24-Feb-2021 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
net/mlx5: fix hashed list size for tunnel flow groups
The hashed list size must be the power of 2, otherwise the adjustment is applied and the warning message is emitted. This patch provides the cor
net/mlx5: fix hashed list size for tunnel flow groups
The hashed list size must be the power of 2, otherwise the adjustment is applied and the warning message is emitted. This patch provides the correct list size to eliminate the warning.
Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c83456cd |
| 01-Feb-2021 |
Dekel Peled <dekelp@nvidia.com> |
net/mlx5: fix shared RSS translation and cleanup
This patch includes several updates of the shared RSS action:
(1) The shared RSS action, introduced recently, uses existing definitions of the regul
net/mlx5: fix shared RSS translation and cleanup
This patch includes several updates of the shared RSS action:
(1) The shared RSS action, introduced recently, uses existing definitions of the regular RSS action. The new defined value MLX5_RSS_HASH_IPV4_TCP uses existing definition IBV_RX_HASH_SRC_PORT_TCP twice, instead of using IBV_RX_HASH_SRC_PORT_TCP and IBV_RX_HASH_DST_PORT_TCP. --- --- The same is true for IPv4-UDP, IPv6-TCP, IPv6-UDP. As result, a shared RSS action with L4 type is specified as src-only. Flow rule using such shared action, while specifying L4 item in flow pattern, will fail to create. This patch updates the new definitions, to use the existing values correctly.
(2) On shared RSS action destroy, in function __flow_dv_action_rss_release, the indirection table shared_rss->ind_tbl was released before shared_rss->refcnt was checked. This order is incorrect, since the indirection table should be released only when the shared RSS action is destroyed. This patch puts release function calls in correct order.
(3) Variables declared of type "struct mlx5_shared_action_rss" are named "shared_rss", "action", and "shared_action". To improve code readability, this patch renames all to "shared_rss".
Fixes: d7cfcddded61 ("net/mlx5: translate shared action for RSS action") Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS") Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
5f8ae44d |
| 12-Jan-2021 |
Dong Zhou <dongzhou@nvidia.com> |
net/mlx5: enlarge maximal flow priority
Currently, the maximal flow priority in non-root table to user is 4, it's not enough for user to do some flow match by priority, such as LPM, for one IPV4 add
net/mlx5: enlarge maximal flow priority
Currently, the maximal flow priority in non-root table to user is 4, it's not enough for user to do some flow match by priority, such as LPM, for one IPV4 address, we need 32 priorities for each bit of 32 mask length.
PMD will manage 3 sub-priorities per user priority according to L2, L3 and L4. The internal priority is 16 bits, user can use priorities from 0 - 21843.
Those enlarged flow priorities are only used for ingress or egress flow groups greater than 0 and for any transfer flow group.
Signed-off-by: Dong Zhou <dongzhou@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
07627fbf |
| 12-Jan-2021 |
Jiawei Wang <jiaweiw@nvidia.com> |
net/mlx5: support E-Switch mirroring with modify action
While there's the modify action and sample action with ratio=1 in the E-Switch flow, and modify action is after the sample action, means that
net/mlx5: support E-Switch mirroring with modify action
While there's the modify action and sample action with ratio=1 in the E-Switch flow, and modify action is after the sample action, means that the modify should only impact on after sample. MLX5 PMD will monitor the above case and split the E-Switch flow into two sub flows, similar as sample flow did before:
- the prefix sub flow with all actions preceding the sample and the sample action itself, also append the new jump action after sample in the prefix sub flow; - the suffix sub flow with the modify action and other actions following the sample action.
The flow split as below:
Original flow: items / actions pre / sample / modify / actions sfx prefix sub flow - items / actions pre / set_tag action / sample / jump suffix sub flow - tag_item / modify / actions sfx
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
ae2927cd |
| 12-Jan-2021 |
Jiawei Wang <jiaweiw@nvidia.com> |
net/mlx5: extend skip scale flag
The sampling feature introduces the scale flow group with factor, then the scaled table value can be used for the normal path table due to this table be created impl
net/mlx5: extend skip scale flag
The sampling feature introduces the scale flow group with factor, then the scaled table value can be used for the normal path table due to this table be created implicitly.
But if the input group value already be scaled, for example the group value of sampling suffix flow, then use 'skip_scale" flag to skip the scale twice in the translation action.
Consider the flow with jump action and this jump action could be created implicitly, PMD may only scale the original flow group value or scale the jump group value or both, so extend the 'skip_scale' flag to two bits: If bit0 of 'skip_scale' flag is set to 1, then skip the scale the original flow group; If bit1 of 'skip_scale' flag is set to 1, then skip the scale the jump flow group.
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
6a951567 |
| 12-Jan-2021 |
Jiawei Wang <jiaweiw@nvidia.com> |
net/mlx5: support E-Switch mirroring and jump in one flow
mlx5 E-Switch mirroring is implemented as multiple destination array in one steering table. The array currently supports only port ID as des
net/mlx5: support E-Switch mirroring and jump in one flow
mlx5 E-Switch mirroring is implemented as multiple destination array in one steering table. The array currently supports only port ID as destination actions.
This patch adds the jump action support to the array as one of destination. The packets can be mirrored to the port and jump to the next table in the same destination array allowing to continue handling in the new table.
For example: set sample_actions 0 port_id id 1 / end flow create 0 ingress transfer pattern eth / end actions sample ratio 1 index 0 / jump group 1 / end flow create 1 ingress transfer group 1 pattern eth / end actions set_mac_dst mac_addr 00:aa:bb:cc:dd:ee / port_id id 2 / end
The flow results all the matched ingress packets are mirrored to port id 1 and go to group 1. In the group 1, packets are modified with the destination mac and sent to port id 2.
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
df96fd0d |
| 29-Jan-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by:
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Steven Webster <steven.webster@windriver.com>
show more ...
|
#
bd49d1d3 |
| 14-Jan-2021 |
Jiawei Wang <jiaweiw@nvidia.com> |
net/mlx5: handle RSS action in sample
PMD validates the rss action in the sample sub-actions list, then translates into rdma-core action and it will be used for sample path destination.
If the RSS
net/mlx5: handle RSS action in sample
PMD validates the rss action in the sample sub-actions list, then translates into rdma-core action and it will be used for sample path destination.
If the RSS action is in both sample sub-actions list and original flow, the rss level and rss type in the sample sub-actions list should be consistent with the original flow list, since the expanding items for RSS should be the same for both actions.
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
6c2a3a90 |
| 14-Jan-2021 |
Jiawei Wang <jiaweiw@nvidia.com> |
net/mlx5: fix unnecessary checking for RSS action
RSS action is valid only in NIC-RX domain, this fix bypass the function that getting RSS action from the flow action list under no NIC-RX domain.
F
net/mlx5: fix unnecessary checking for RSS action
RSS action is valid only in NIC-RX domain, this fix bypass the function that getting RSS action from the flow action list under no NIC-RX domain.
Fixes: e745f900072e ("net/mlx5: optimize flow RSS struct") Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
f7239fce |
| 17-Jan-2021 |
Shiri Kuzin <shirik@nvidia.com> |
net/mlx5: add GENEVE TLV option flow validation
This patch adds validation routine for the GENEVE header TLV option.
The GENEVE TLV option match must include all fields with full masks due to NIC d
net/mlx5: add GENEVE TLV option flow validation
This patch adds validation routine for the GENEVE header TLV option.
The GENEVE TLV option match must include all fields with full masks due to NIC does not support masking on option class, type and length.
The option data length must be non zero and provided data pattern should be zero neither due to hardware limitations.
Signed-off-by: Shiri Kuzin <shirik@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
19e13263 |
| 10-Jan-2021 |
Dekel Peled <dekelp@nvidia.com> |
net/mlx5: fix hairpin flow split decision
Previously, the identification of hairpin queue was done using mlx5_rxq_get_type() function. Recent patch replaced it with use of mlx5_rxq_get_hairpin_conf(
net/mlx5: fix hairpin flow split decision
Previously, the identification of hairpin queue was done using mlx5_rxq_get_type() function. Recent patch replaced it with use of mlx5_rxq_get_hairpin_conf(), and check of the return value conf != NULL. The case of return value is NULL (queue is not hairpin) was not handled. As result, non-hairpin flows were wrongly handled. This patch adds the required check for return value is NULL.
Fixes: 509f8470de55 ("net/mlx5: do not split hairpin flow in explicit mode") Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
5d55a494 |
| 07-Jan-2021 |
Tal Shnaiderman <talshn@nvidia.com> |
net/mlx5: split multi-thread flow handling per OS
multi-threaded flows feature uses pthread function pthread_key_create but for Windows the destruction option in the function is unimplemented.
To r
net/mlx5: split multi-thread flow handling per OS
multi-threaded flows feature uses pthread function pthread_key_create but for Windows the destruction option in the function is unimplemented.
To resolve it, Windows will implement destruction mechanism to cleanup mlx5_flow_workspace object for each terminated thread.
Linux flow will keep the current behavior.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> Acked-by: Khoa To <khot@microsoft.com>
show more ...
|
#
8e615556 |
| 15-Dec-2020 |
Suanming Mou <suanmingm@nvidia.com> |
net/mlx5: fix shared RSS and mark actions combination
In order to allow mbuf mark ID update in Rx data-path, there is a mechanism in the PMD to enable it according to the rte_flows. When a flow with
net/mlx5: fix shared RSS and mark actions combination
In order to allow mbuf mark ID update in Rx data-path, there is a mechanism in the PMD to enable it according to the rte_flows. When a flow with mark ID and RSS/QUEUE action exists, all the relevant Rx queues will be enabled to report the mark ID.
When shared RSS action is combined with mark action, the PMD mechanism misses the Rx queues updates.
This commit handles the shared RSS case in the mechanism too.
Fixes: e1592b6c4dea ("net/mlx5: make Rx queue thread safe") Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
16047bd0 |
| 28-Dec-2020 |
Tal Shnaiderman <talshn@nvidia.com> |
net/mlx5: fix comparison sign in flow engine
The clang compiler warns on size mismatches of several comparisons.
warning: comparison of integers of different signs
To resolve those the right types
net/mlx5: fix comparison sign in flow engine
The clang compiler warns on size mismatches of several comparisons.
warning: comparison of integers of different signs
To resolve those the right types is used/cast to.
Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query") Fixes: e554b672aa05 ("net/mlx5: support flow tag") Fixes: c8f0abe7f89d ("net/mlx5: fix meter color register consideration") Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
b012b4ce |
| 28-Dec-2020 |
Ophir Munk <ophirmu@nvidia.com> |
net/mlx5: unify operations for all OS
There are three types of eth_dev_ops: primary, secondary and isolate represented in three callback tables per OS. In this commit the OS specific eth dev tables
net/mlx5: unify operations for all OS
There are three types of eth_dev_ops: primary, secondary and isolate represented in three callback tables per OS. In this commit the OS specific eth dev tables are unified into shared tables in file mlx5.c. Starting from this commit all operating systems must implement the same eth dev APIs. In case an OS does not support an API - it can return in its implementation an error ENOTSUP.
Fixes: 042f5c94fd3a ("net/mlx5: refactor device operations for Linux") Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
f1ae0b35 |
| 28-Dec-2020 |
Ophir Munk <ophirmu@nvidia.com> |
net/mlx5: enable more shared code on Windows
Use macro HAVE_INFINIBAND_VERBS_H to successfully compile files both under Linux and Windows (or any non Linux in general). Under Windows this macro: 1.
net/mlx5: enable more shared code on Windows
Use macro HAVE_INFINIBAND_VERBS_H to successfully compile files both under Linux and Windows (or any non Linux in general). Under Windows this macro: 1. Hides Verbs references. 2. Exposes required DV structs that are under ifdefs related to rdma core.
Linux code under definitions such as #ifdef HAVE_IBV_FLOW_DV_SUPPORT is required unconditionally under Windows however those definitions are never effective without rdma-core presence. Therefore update the #ifdef condition to consider HAVE_INFINIBAND_VERBS_H as well (undefined macro when running without an rdma-core library).
For example: -#ifdef HAVE_IBV_FLOW_DV_SUPPORT +#if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
07a99de8 |
| 28-Dec-2020 |
Tal Shnaiderman <talshn@nvidia.com> |
net/mlx5: wrap glue reg/dereg UMEM per OS
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters.
Signed
net/mlx5: wrap glue reg/dereg UMEM per OS
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
09a5e977 |
| 28-Dec-2020 |
Tal Shnaiderman <talshn@nvidia.com> |
net/mlx5: fix constant array size
Before this commit the PMD used: const int elt_n = 8 const int *stack[elt_n];
In Windows clang compiler complains: net/mlx5/mlx5_flow.c:215:19: error: variab
net/mlx5: fix constant array size
Before this commit the PMD used: const int elt_n = 8 const int *stack[elt_n];
In Windows clang compiler complains: net/mlx5/mlx5_flow.c:215:19: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
Fix it by using a constant macro definition instead of a variable: #define MLX5_RSS_EXP_ELT_N 8 const int *stack[MLX5_RSS_EXP_ELT_N];
Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver") Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
f5b0aed2 |
| 03-Dec-2020 |
Suanming Mou <suanmingm@nvidia.com> |
net/mlx5: optimize hash list entry memory
Currently, the hash list saves the hash key in the hash entry. And the key is mostly used to get the bucket index only.
Save the entire 64 bits key to the
net/mlx5: optimize hash list entry memory
Currently, the hash list saves the hash key in the hash entry. And the key is mostly used to get the bucket index only.
Save the entire 64 bits key to the entry will not be a good option if the key is only used to get the bucket index. Since 64 bits costs more memory for the entry, mostly the signature data in the key only uses 32 bits. And in the unregister function, the key in the entry causes extra bucket index calculation.
This commit saves the bucket index to the entry instead of the hash key. For the hash list like table, tag and mreg_copy which save the signature data in the key, the signature data is moved to the resource data struct itself.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
bb5d49c6 |
| 25-Nov-2020 |
Gregory Etelson <getelson@nvidia.com> |
net/mlx5: fix tunnel offload freeing
PMD did not remove tunnel offload object from tunnels database before it released the object memory. As the result, the tunnels database become corrupted and sub
net/mlx5: fix tunnel offload freeing
PMD did not remove tunnel offload object from tunnels database before it released the object memory. As the result, the tunnels database become corrupted and subsequent search operations triggered PMD crash. The patch removes tunnel offload object from the tunnels database when the object is not in-use by PMD any more.
Fixes: bc1d90a3cf6f ("net/mlx5: fix build with Direct Verbs disabled")
Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|