[PATCH v4 1/4] net/mlx5: reorganize main structures
Maayan Kashani
mkashani at nvidia.com
Thu Jun 6 12:06:12 CEST 2024
Reorganize rte_flow_hw and rte_flow_nt2hws
structures for better performance, and removed packed.
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 7e0f005741..5a3f047968 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1328,12 +1328,12 @@ struct rte_flow_nt2hws {
struct rte_flow_hw_aux *flow_aux;
/** Modify header pointer. */
struct mlx5_flow_dv_modify_hdr_resource *modify_hdr;
+ /** Chain NTA flows. */
+ SLIST_ENTRY(rte_flow_hw) next;
/** Encap/decap index. */
uint32_t rix_encap_decap;
uint8_t chaned_flow;
- /** Chain NTA flows. */
- SLIST_ENTRY(rte_flow_hw) next;
-} __rte_packed;
+};
/** HWS flow struct. */
struct rte_flow_hw {
@@ -1345,6 +1345,12 @@ struct rte_flow_hw {
};
/** Application's private data passed to enqueued flow operation. */
void *user_data;
+ union {
+ /** Jump action. */
+ struct mlx5_hw_jump_action *jump;
+ /** TIR action. */
+ struct mlx5_hrxq *hrxq;
+ };
/** Flow index from indexed pool. */
uint32_t idx;
/** Resource index from indexed pool. */
@@ -1353,20 +1359,12 @@ struct rte_flow_hw {
uint32_t rule_idx;
/** Which flow fields (inline or in auxiliary struct) are used. */
uint32_t flags;
+ /** COUNT action index. */
+ cnt_id_t cnt_id;
/** Ongoing flow operation type. */
uint8_t operation_type;
/** Index of pattern template this flow is based on. */
uint8_t mt_idx;
-
- /** COUNT action index. */
- cnt_id_t cnt_id;
- union {
- /** Jump action. */
- struct mlx5_hw_jump_action *jump;
- /** TIR action. */
- struct mlx5_hrxq *hrxq;
- };
-
/** Equals true if it is non template rule. */
bool nt_rule;
/**
@@ -1377,7 +1375,7 @@ struct rte_flow_hw {
uint8_t padding[9];
/** HWS layer data struct. */
uint8_t rule[];
-} __rte_packed;
+};
/** Auxiliary data fields that are updatable. */
struct rte_flow_hw_aux_fields {
--
2.21.0
More information about the dev
mailing list