Bing Zhao 3ac3d8234b net/mlx5: fix index when creating flow
When creating a flow, usually the creating routine is called in
serial. No parallel execution is supported right now. The same
function will be called only once for a single flow creation.

But there is a special case that the creating routine will be called
nested. If the xmeta feature is enabled and there is FLAG / MARK in
the actions list, some metadata reg copy flow needs to be created
before the original flow is applied to the hardware.
In the flow non-cached mode, resources only for flow creation will
not be saved anymore. The memory space is pre-allocated and reused
for each flow. A global index for each device is used to indicate
the memory address of the resources. If the function is called in a
nested mode, then the index will be reset and make everything get
corrupted.

To solve this, a nested index is introduced to save the position for
the original flow creation. Currently, only one level nested call
of the flow creating routine is supported.

Fixes: e7bfa3596a0a ("net/mlx5: separate the flow handle resource")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-04-21 13:57:07 +02:00
..
2020-02-14 12:42:12 +01:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-21 13:57:05 +02:00
2020-04-16 18:30:58 +02:00
2020-04-21 13:57:05 +02:00
2020-04-16 18:30:58 +02:00
2020-04-16 18:30:58 +02:00
2020-04-16 18:30:58 +02:00
2020-04-16 18:30:58 +02:00
2020-04-21 13:57:07 +02:00
2020-04-21 13:57:07 +02:00
2020-04-21 13:57:07 +02:00
2020-04-16 18:30:58 +02:00
2020-04-21 13:57:05 +02:00
2020-04-21 13:57:06 +02:00
2020-04-21 13:57:07 +02:00
2020-04-21 13:57:07 +02:00
2020-04-16 18:30:58 +02:00
2020-04-21 13:57:06 +02:00
2020-04-16 18:16:46 +02:00
2020-04-21 13:57:06 +02:00
2020-04-21 13:57:07 +02:00
2020-04-21 13:57:06 +02:00
2020-01-20 18:02:17 +01:00