[1/5] net/mlx5: update query fields in async job structure
Checks
Commit Message
Query fields defined in `mlx5_hw_q_job` target CT type only.
The patch updates `mlx5_hw_q_job` for other query types as well.
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
drivers/net/mlx5/mlx5.h | 10 +++++-----
drivers/net/mlx5/mlx5_flow_aso.c | 2 +-
drivers/net/mlx5/mlx5_flow_hw.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
@@ -366,11 +366,11 @@ struct mlx5_hw_q_job {
struct rte_flow_item *items;
union {
struct {
- /* Pointer to ct query user memory. */
- struct rte_flow_action_conntrack *profile;
- /* Pointer to ct ASO query out memory. */
- void *out_data;
- } __rte_packed;
+ /* User memory for query output */
+ void *user;
+ /* Data extracted from hardware */
+ void *hw;
+ } __rte_packed query;
struct rte_flow_item_ethdev port_spec;
struct rte_flow_item_tag tag_spec;
} __rte_packed;
@@ -1389,7 +1389,7 @@ mlx5_aso_ct_sq_query_single(struct mlx5_dev_ctx_shared *sh,
struct mlx5_hw_q_job *job = (struct mlx5_hw_q_job *)user_data;
sq->elts[wqe_idx].ct = user_data;
- job->out_data = (char *)((uintptr_t)sq->mr.addr + wqe_idx * 64);
+ job->query.hw = (char *)((uintptr_t)sq->mr.addr + wqe_idx * 64);
} else {
sq->elts[wqe_idx].query_data = data;
sq->elts[wqe_idx].ct = ct;
@@ -2730,8 +2730,8 @@ __flow_hw_pull_indir_action_comp(struct rte_eth_dev *dev,
idx = MLX5_ACTION_CTX_CT_GET_IDX
((uint32_t)(uintptr_t)job->action);
aso_ct = mlx5_ipool_get(priv->hws_ctpool->cts, idx);
- mlx5_aso_ct_obj_analyze(job->profile,
- job->out_data);
+ mlx5_aso_ct_obj_analyze(job->query.user,
+ job->query.hw);
aso_ct->state = ASO_CONNTRACK_READY;
}
}
@@ -8179,7 +8179,7 @@ flow_hw_action_handle_query(struct rte_eth_dev *dev, uint32_t queue,
case MLX5_INDIRECT_ACTION_TYPE_CT:
aso = true;
if (job)
- job->profile = (struct rte_flow_action_conntrack *)data;
+ job->query.user = data;
ret = flow_hw_conntrack_query(dev, queue, act_idx, data,
job, push, error);
break;