#
56932338 |
| 19-Feb-2020 |
Matan Azrad <matan@mellanox.com> |
net/mlx5: fix GENEVE tunnel flow validation
The new Mellanox devices support GENEVE tunnel stateless offloads by native HW parsers, FW doesn't need to configure flex parser to support it.
The FW ca
net/mlx5: fix GENEVE tunnel flow validation
The new Mellanox devices support GENEVE tunnel stateless offloads by native HW parsers, FW doesn't need to configure flex parser to support it.
The FW capability for GENEVE flex parser is not set for the above devices, hence the GENEVE flow validation failed for them.
Remove the flex parser validation for GENEVE, stay only with the direct FW capability for GENEVE support.
Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item") Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
431f1998 |
| 06-Feb-2020 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: fix meter header modify before decap
The meter flows are split into three subflows each, the prefix subflow with meter action color the packet, the meter subflow filters out the colored pa
net/mlx5: fix meter header modify before decap
The meter flows are split into three subflows each, the prefix subflow with meter action color the packet, the meter subflow filters out the colored packets, the suffix subflow applies all the remaining actions to the passed packets. The tag header modify action is added to the prefix subflow to make the suffix subflow to match the packets from the prefix subflow.
Currently, the tag header modify action is added at the beginning in the prefix subflow even before decap action. The header modify action does not make sense to the later decap action, so the flow create will be validated as incorrect flow rule and failed.
Move the tag header modify action just before meter action in the prefix subflow to make the flow with decap action to do the decap first, then do the tag and meter to fix that issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
06387be8 |
| 09-Feb-2020 |
Matan Azrad <matan@mellanox.com> |
net/mlx5: fix encap/decap validation
The encapsulation and decapsulation actions are divided into 2 types: L2 and L3. In order to configure L3 xcapsulation actions the user should use both RAW_DECAP
net/mlx5: fix encap/decap validation
The encapsulation and decapsulation actions are divided into 2 types: L2 and L3. In order to configure L3 xcapsulation actions the user should use both RAW_DECAP and RAW_ENCAP and setting the appropriated data sizes in their action configuration structures.
The PMD flow validation wrongly didn't detect the RAW_DECAP and RAW_ENCAP combination to distinguish between L3_DECAP and L3_ENCAP. Thus, some xcapsulation related validation failed. For example, when configuring modify header action before L3_DECAP.
Simplify the xcapsulation defines and fix the L3 xcapsulation detection using the action configuration data sizes.
By the way, add the hairpin validation in this area.
Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows") Fixes: 8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs") Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
show more ...
|
#
8e46d4e1 |
| 30-Jan-2020 |
Alexander Kozyrev <akozyrev@mellanox.com> |
common/mlx5: improve assert control
Use the MLX5_ASSERT macros instead of the standard assert clause. Depends on the RTE_LIBRTE_MLX5_DEBUG configuration option to define it. If RTE_LIBRTE_MLX5_DEBUG
common/mlx5: improve assert control
Use the MLX5_ASSERT macros instead of the standard assert clause. Depends on the RTE_LIBRTE_MLX5_DEBUG configuration option to define it. If RTE_LIBRTE_MLX5_DEBUG is enabled MLX5_ASSERT is equal to RTE_VERIFY to bypass the global CONFIG_RTE_ENABLE_ASSERT option. If RTE_LIBRTE_MLX5_DEBUG is disabled, the global CONFIG_RTE_ENABLE_ASSERT can still make this assert active by calling RTE_VERIFY inside RTE_ASSERT.
Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
fbde4331 |
| 28-Jan-2020 |
Matan Azrad <matan@mellanox.com> |
net/mlx5: make FDB default rule optional
There are RDMA-CORE versions which are not supported multi-table for some Mellanox mlx5 devices.
Hence, the optimization added in commit [1] which forwards
net/mlx5: make FDB default rule optional
There are RDMA-CORE versions which are not supported multi-table for some Mellanox mlx5 devices.
Hence, the optimization added in commit [1] which forwards all the FDB traffic to table 1 cannot be configured.
Make the above optimization optional: Do not fail when either table 1 cannot be created or the jump rule (all =>jump to table 1) is not configured successfully. In this case, all the flows will be configured to table 0.
[1] commit b67b4ecbde22 ("net/mlx5: skip table zero to improve insertion rate")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
7b4f1e6b |
| 29-Jan-2020 |
Matan Azrad <matan@mellanox.com> |
common/mlx5: introduce common library
A new Mellanox vdpa PMD will be added to support vdpa operations by Mellanox adapters.
This vdpa PMD design includes mlx5_glue and mlx5_devx operations and lar
common/mlx5: introduce common library
A new Mellanox vdpa PMD will be added to support vdpa operations by Mellanox adapters.
This vdpa PMD design includes mlx5_glue and mlx5_devx operations and large parts of them are shared with the net/mlx5 PMD.
Create a new common library in drivers/common for mlx5 PMDs. Move mlx5_glue, mlx5_devx_cmds and their dependencies to the new mlx5 common library in drivers/common.
The files mlx5_devx_cmds.c, mlx5_devx_cmds.h, mlx5_glue.c, mlx5_glue.h and mlx5_prm.h are moved as is from drivers/net/mlx5 to drivers/common/mlx5.
Share the log mechanism macros. Separate also the log mechanism to allow different log level control to the common library.
Build files and version files are adjusted accordingly. Include lines are adjusted accordingly.
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
543e218f |
| 29-Jan-2020 |
Matan Azrad <matan@mellanox.com> |
net/mlx5: separate DevX commands interface
The DevX commands interface is included in the mlx5.h file with a lot of other PMD interfaces.
As an arrangement to make the DevX commands shared with dif
net/mlx5: separate DevX commands interface
The DevX commands interface is included in the mlx5.h file with a lot of other PMD interfaces.
As an arrangement to make the DevX commands shared with different PMDs, this patch moves the DevX interface to a new file called mlx5_devx_cmds.h.
Also remove shared device structure dependency on DevX commands.
Replace the DevX commands log mechanism from the mlx5 driver log mechanism to the EAL log mechanism.
Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
792e749e |
| 23-Jan-2020 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: fix register usage in meter
Flow with meter will split to three subflows, the prefix subflow with meter action do the color, the meter subflow filter the packets, the suffix subflow do al
net/mlx5: fix register usage in meter
Flow with meter will split to three subflows, the prefix subflow with meter action do the color, the meter subflow filter the packets, the suffix subflow do all the left actions for packets pass the filter. Both the color and the subflow match between prefix and suffix use the register to store the tag.
For some of the NICs with meter color register share capability, it only uses 8 LSB of the register for color, the left 24 MSB can be used for flow id match between meter prefix subflow and suffix subflow.
Currently, one entire register is allocated for flow matching which causes the NICs with limited registers don't have enough register for other matching.
Add the meter color share capability checking to fix lacking of registers issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
99d49f47 |
| 22-Jan-2020 |
Matan Azrad <matan@mellanox.com> |
net/mlx5: fix build with clang 3.4.2
Compilation massage example: "dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautolog
net/mlx5: fix build with clang 3.4.2
Compilation massage example: "dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] if (reg < 0) ~~~ ^ ~ "
enum modify_reg holds only non-negative integers and in some places in the code it was used to be compared with negative value, hence compilation was failed.
Change all thus places to use integer instead of enum modify_reg.
Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query") Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support") Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
70faf9ae |
| 22-Jan-2020 |
Dekel Peled <dekelp@mellanox.com> |
net/mlx5: unify validation of drop action
According to PRM: "Drop action is mutually-exclusive with any other action, except for Count action". In current code this limitation is checked separately
net/mlx5: unify validation of drop action
According to PRM: "Drop action is mutually-exclusive with any other action, except for Count action". In current code this limitation is checked separately in validation function of each action.
This patch removes the discrete checks, and adds a single check common for all actions.
Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
64927f72 |
| 08-Jan-2020 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: fix meter suffix flow
The meter suffix flow item pointer restore is not correct to decrease a fixed value. The incorrect operation will cause incorrect match to the meter suffix flow, the
net/mlx5: fix meter suffix flow
The meter suffix flow item pointer restore is not correct to decrease a fixed value. The incorrect operation will cause incorrect match to the meter suffix flow, the flow create will fail once the magic number in the wrong offset memory start with RTE_FLOW_ITEM_TYPE_END. The pointer should decrease the real offset it increases.
Set the decrease value to the real offset the pointer increases to fix the issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
f31d7a01 |
| 16-Jan-2020 |
Dekel Peled <dekelp@mellanox.com> |
net/mlx5: support GTP
This patch adds to MLX5 PMD support of matching on GTP item, fields msg_type and teid, according to RFC [1]. GTP item validation and translation functions are added and called.
net/mlx5: support GTP
This patch adds to MLX5 PMD support of matching on GTP item, fields msg_type and teid, according to RFC [1]. GTP item validation and translation functions are added and called. GTP tunnel type is added to supported tunnels.
[1] http://mails.dpdk.org/archives/dev/2019-December/152799.html
Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
show more ...
|
#
f6d72024 |
| 17-Jan-2020 |
Xiaoyu Min <jackmin@mellanox.com> |
net/mlx5: support flow dump API
Dump fdb/nic_rx/nic_tx raw flow data into specified file.
Signed-off-by: Xueming Li <xuemingl@mellanox.com> Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by
net/mlx5: support flow dump API
Dump fdb/nic_rx/nic_tx raw flow data into specified file.
Signed-off-by: Xueming Li <xuemingl@mellanox.com> Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
show more ...
|
#
b1d63d82 |
| 18-Dec-2019 |
Dekel Peled <dekelp@mellanox.com> |
net/mlx5: support RSS on src or dst fields only
This patch implements the feature described in RFC [1], adding support of RSS action on L3 and/or L4 source or destination only.
[1] http://mails.dpd
net/mlx5: support RSS on src or dst fields only
This patch implements the feature described in RFC [1], adding support of RSS action on L3 and/or L4 source or destination only.
[1] http://mails.dpdk.org/archives/dev/2019-December/152796.html
Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
a0865f6f |
| 27-Nov-2019 |
Viacheslav Ovsiienko <viacheslavo@mellanox.com> |
net/mlx5: fix default mark copy flow
In extensive metadata mode the MARK copy table is engaged, if the application creates the flow with zero MARK ID action:
flow create 1 ingress pattern eth / ...
net/mlx5: fix default mark copy flow
In extensive metadata mode the MARK copy table is engaged, if the application creates the flow with zero MARK ID action:
flow create 1 ingress pattern eth / ... / end actions mark id 0 / .. end
And then destroys that, the traffic to the port stops. This happens due to default flow for the copy table has the zero ID and is removed with the application rule. The patch extends internal ID variable to 64 bits and provide the UINT64_MAX ID for the copy table default rule.
Fixes: dd3c774f6ffb ("net/mlx5: add metadata register copy table")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
show more ...
|
#
4a73c86f |
| 26-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: fix crash on GRE flow rule parsing
When set the GRE item, GRE key should follow after GRE header, or the header gre_item pointer used by the key will be invalid.
Currently in the mlx5_flo
net/mlx5: fix crash on GRE flow rule parsing
When set the GRE item, GRE key should follow after GRE header, or the header gre_item pointer used by the key will be invalid.
Currently in the mlx5_flow_validate_item_gre_key() function, the header gre_item pointer is access before checking if the key is after the header or not. Once the key item is before the header, invalid gre_item pointer access happens.
Move the gre_item pointer access after the GRE header check to avoid the crash issue.
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits") Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
show more ...
|
#
8723061a |
| 21-Nov-2019 |
Viacheslav Ovsiienko <viacheslavo@mellanox.com> |
net/mlx5: fix getting metadata register for E-Switch domain
The metadata register used for META item/action within E-Switch steering domain should be altered depending on dv_xmeta_en devarg value.
net/mlx5: fix getting metadata register for E-Switch domain
The metadata register used for META item/action within E-Switch steering domain should be altered depending on dv_xmeta_en devarg value.
Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
2e715e53 |
| 19-Nov-2019 |
Ori Kam <orika@mellanox.com> |
net/mlx5: fix hairpin split detection
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
net/mlx5: fix hairpin split detection
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>
show more ...
|
#
cec19a34 |
| 13-Nov-2019 |
Viacheslav Ovsiienko <viacheslavo@mellanox.com> |
net/mlx5: fix suffix flow creation in metadata split
The variable cleanup was erroneously done before pointer usage. The cleanup is moved to appropriate place, comment is clarified.
Fixes: 8d72fa66
net/mlx5: fix suffix flow creation in metadata split
The variable cleanup was erroneously done before pointer usage. The cleanup is moved to appropriate place, comment is clarified.
Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata")
Reported-by: Eli Britstein <elibr@mellanox.com> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
97127d42 |
| 11-Nov-2019 |
Dekel Peled <dekelp@mellanox.com> |
net/mlx5: fix check of RSS queue index
RSS action validation function checks the queues included in RSS to make sure they are valid. A Queue is considered valid if the pointer to the queue (item at
net/mlx5: fix check of RSS queue index
RSS action validation function checks the queues included in RSS to make sure they are valid. A Queue is considered valid if the pointer to the queue (item at location queue-index of RxQ array) is not a null value. The queue indices are not checked. If a large value is entered as queue index, using it as an index in RxQ array will result in a pointer to memory out of array bounds. If this memory contains a value which is not null, this queue will be wrongly considered valid.
This patch updates function mlx5_flow_validate_action_rss() with check of the input queue indices, as done in function mlx5_flow_validate_action_queue().
Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
8d72fa66 |
| 08-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: share tag between meter and metadata
In the meter flow split, metadata flow will be as the sub flow of meter suffix flow. In meter suffix flow, there is already a unique id tag exist as fo
net/mlx5: share tag between meter and metadata
In the meter flow split, metadata flow will be as the sub flow of meter suffix flow. In meter suffix flow, there is already a unique id tag exist as for the meter prefix and suffix flow match.
Make metadata feature and meter both share the unique id tag for match.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
9ea9b049 |
| 08-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: split meter flow
The flow with meter action will be divided to three sub flows, the prefix flow, the meter flow and the suffix flow.
For these three sub flows, as the prefix flow and mete
net/mlx5: split meter flow
The flow with meter action will be divided to three sub flows, the prefix flow, the meter flow and the suffix flow.
For these three sub flows, as the prefix flow and meter flow have the meter color match. In order the make the packet from prefix flow to match with the suffix flow, an extra metadata register is allocated. The prefix flow will add a unique id to the register and the suffix flow matches on that unique id.
As RSS will also divided the flow to several sub flows, flow with meter will be divided as the sub flow of the RSS sub flows if have as below:
Original flow -> RSS sub flow 1 -> Meter sub flow 1 (Contain three sub flows.) RSS sub flow 2 -> Meter sub flow 2 (Contain three sub flows.) ...... RSS sub flow n -> Meter sub flow n (Contain three sub flows.)
The metadata feature flow will be split as the sub flow of the meter suffix flow.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
4dedc7c6 |
| 08-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: add count action to meter
Add count action to meter for metering packet statistics. All the packets be colored and dropped will be recorded.
Signed-off-by: Suanming Mou <suanmingm@mellano
net/mlx5: add count action to meter
Add count action to meter for metering packet statistics. All the packets be colored and dropped will be recorded.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
e189f55c |
| 08-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: expose flow counters management
Expose the flow counter management mechanism for other components to use.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan
net/mlx5: expose flow counters management
Expose the flow counter management mechanism for other components to use.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
3426add9 |
| 08-Nov-2019 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: add policer rules operations
This commit create the color rules on the meter table for the packets.
As the prefix flow with meter action colors the packets, the packets are transferred to
net/mlx5: add policer rules operations
This commit create the color rules on the meter table for the packets.
As the prefix flow with meter action colors the packets, the packets are transferred to the meter table with meter color match flows. Here we create the flow rules with green yellow red actions on the meter table. Packets match the color will be processed by the related color flow rule.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|