diff mbox series

[v2,25/37] net/mvpp2: rearrange functions order

Message ID 20210122191925.24308-26-lironh@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series net/mvpp2: misc updates | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Jan. 22, 2021, 7:19 p.m. UTC
From: Liron Himi <lironh@marvell.com>

Rearrange functions order

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 98 ++++++++++++++++-----------------
 1 file changed, 49 insertions(+), 49 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 47f9e9443..12403666b 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -191,6 +191,39 @@  static struct {
 
 #define MRVL_NUM_XSTATS RTE_DIM(mrvl_xstats_tbl)
 
+/**
+ * Initialize packet processor.
+ *
+ * @return
+ *   0 on success, negative error value otherwise.
+ */
+static int
+mrvl_init_pp2(void)
+{
+	struct pp2_init_params init_params;
+
+	memset(&init_params, 0, sizeof(init_params));
+	init_params.hif_reserved_map = MRVL_MUSDK_HIFS_RESERVED;
+	init_params.bm_pool_reserved_map = MRVL_MUSDK_BPOOLS_RESERVED;
+	init_params.rss_tbl_reserved_map = MRVL_MUSDK_RSS_RESERVED;
+	if (mrvl_cfg && mrvl_cfg->pp2_cfg.prs_udfs.num_udfs)
+		memcpy(&init_params.prs_udfs, &mrvl_cfg->pp2_cfg.prs_udfs,
+		       sizeof(struct pp2_parse_udfs));
+	return pp2_init(&init_params);
+}
+
+/**
+ * Deinitialize packet processor.
+ *
+ * @return
+ *   0 on success, negative error value otherwise.
+ */
+static void
+mrvl_deinit_pp2(void)
+{
+	pp2_deinit();
+}
+
 static inline void
 mrvl_fill_shadowq(struct mrvl_shadow_txq *sq, struct rte_mbuf *buf)
 {
@@ -294,6 +327,22 @@  mrvl_get_hif(struct mrvl_priv *priv, int core_id)
 	return hifs[core_id];
 }
 
+/**
+ * Deinitialize per-lcore MUSDK hardware interfaces (hifs).
+ */
+static void
+mrvl_deinit_hifs(void)
+{
+	int i;
+
+	for (i = mrvl_lcore_first; i <= mrvl_lcore_last; i++) {
+		if (hifs[i])
+			pp2_hif_deinit(hifs[i]);
+	}
+	used_hifs = MRVL_MUSDK_HIFS_RESERVED;
+	memset(hifs, 0, sizeof(hifs));
+}
+
 /**
  * Set tx burst function according to offload flag
  *
@@ -2985,39 +3034,6 @@  mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
 	return nb_pkts;
 }
 
-/**
- * Initialize packet processor.
- *
- * @return
- *   0 on success, negative error value otherwise.
- */
-static int
-mrvl_init_pp2(void)
-{
-	struct pp2_init_params init_params;
-
-	memset(&init_params, 0, sizeof(init_params));
-	init_params.hif_reserved_map = MRVL_MUSDK_HIFS_RESERVED;
-	init_params.bm_pool_reserved_map = MRVL_MUSDK_BPOOLS_RESERVED;
-	init_params.rss_tbl_reserved_map = MRVL_MUSDK_RSS_RESERVED;
-	if (mrvl_cfg && mrvl_cfg->pp2_cfg.prs_udfs.num_udfs)
-		memcpy(&init_params.prs_udfs, &mrvl_cfg->pp2_cfg.prs_udfs,
-		       sizeof(struct pp2_parse_udfs));
-	return pp2_init(&init_params);
-}
-
-/**
- * Deinitialize packet processor.
- *
- * @return
- *   0 on success, negative error value otherwise.
- */
-static void
-mrvl_deinit_pp2(void)
-{
-	pp2_deinit();
-}
-
 /**
  * Create private device structure.
  *
@@ -3157,22 +3173,6 @@  mrvl_get_ifnames(const char *key __rte_unused, const char *value,
 	return 0;
 }
 
-/**
- * Deinitialize per-lcore MUSDK hardware interfaces (hifs).
- */
-static void
-mrvl_deinit_hifs(void)
-{
-	int i;
-
-	for (i = mrvl_lcore_first; i <= mrvl_lcore_last; i++) {
-		if (hifs[i])
-			pp2_hif_deinit(hifs[i]);
-	}
-	used_hifs = MRVL_MUSDK_HIFS_RESERVED;
-	memset(hifs, 0, sizeof(hifs));
-}
-
 /**
  * DPDK callback to register the virtual device.
  *