DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maayan Kashani <mkashani@nvidia.com>
To: <dev@dpdk.org>
Cc: <mkashani@nvidia.com>, <dsosnowski@nvidia.com>,
	<rasland@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Subject: [PATCH v3 1/4] net/mlx5: reorganize main structures
Date: Mon, 3 Jun 2024 13:54:27 +0300	[thread overview]
Message-ID: <20240603105430.10818-1-mkashani@nvidia.com> (raw)
In-Reply-To: <20240602102908.197054-1-mkashani@nvidia.com>

Reorganize rte_flow_hw and rte_flow_nt2hws
structures for better performance, and removed packed.

Signed-off-by: Maayan Kashani <mkashani@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.25.1


  parent reply	other threads:[~2024-06-03 10:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 10:29 [PATCH " Maayan Kashani
2024-06-03  8:16 ` [PATCH v2 22/34] " Maayan Kashani
2024-06-03  8:16   ` [PATCH v2 23/34] net/mlx5: set modify header as shared action Maayan Kashani
2024-06-03  8:16   ` [PATCH v2 24/34] net/mlx5: set encap " Maayan Kashani
2024-06-03  8:16   ` [PATCH v2 25/34] net/mlx5: clean up TODO comments Maayan Kashani
2024-06-03 10:54 ` Maayan Kashani [this message]
2024-06-03 10:54   ` [PATCH v3 2/4] net/mlx5: set modify header as shared action Maayan Kashani
2024-06-03 10:54   ` [PATCH v3 3/4] net/mlx5: set encap " Maayan Kashani
2024-06-03 10:54   ` [PATCH v3 4/4] net/mlx5: clean up TODO comments Maayan Kashani
2024-06-06 10:06   ` [PATCH v4 0/4] non template pmd code changes Maayan Kashani
2024-06-06 10:06     ` [PATCH v4 1/4] net/mlx5: reorganize main structures Maayan Kashani
2024-06-06 10:06     ` [PATCH v4 2/4] net/mlx5: set modify header as shared action Maayan Kashani
2024-06-06 10:06     ` [PATCH v4 3/4] net/mlx5: set encap " Maayan Kashani
2024-06-06 10:06     ` [PATCH v4 4/4] net/mlx5: clean up TODO comments Maayan Kashani
2024-06-11 11:16     ` [PATCH v4 0/4] non template pmd code changes Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240603105430.10818-1-mkashani@nvidia.com \
    --to=mkashani@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).