diff mbox series

[v4,6/6] net/ark: localize internal packet generator code

Message ID 20210309160818.3553-6-ed.czeck@atomicrules.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers show
Series [v4,1/6] net/ark: update pkt director initial state | expand

Checks

Context Check Description
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ed Czeck March 9, 2021, 4:08 p.m. UTC
remove unnecessary includes
no functional changes

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c  | 17 ++---------------
 drivers/net/ark/ark_pktchkr.c |  4 ----
 drivers/net/ark/ark_pktgen.c  | 20 ++++++++++++++------
 drivers/net/ark/ark_pktgen.h  |  1 +
 4 files changed, 17 insertions(+), 25 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index bdebfdba4..9a5835d70 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -535,20 +535,6 @@  eth_ark_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }
 
-static void *
-delay_pg_start(void *arg)
-{
-	struct ark_adapter *ark = (struct ark_adapter *)arg;
-
-	/* This function is used exclusively for regression testing, We
-	 * perform a blind sleep here to ensure that the external test
-	 * application has time to setup the test before we generate packets
-	 */
-	usleep(100000);
-	ark_pktgen_run(ark->pg);
-	return NULL;
-}
-
 static int
 eth_ark_dev_start(struct rte_eth_dev *dev)
 {
@@ -583,7 +569,8 @@  eth_ark_dev_start(struct rte_eth_dev *dev)
 		/* Delay packet generatpr start allow the hardware to be ready
 		 * This is only used for sanity checking with internal generator
 		 */
-		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
+		if (pthread_create(&thread, NULL,
+				   ark_pktgen_delay_start, ark->pg)) {
 			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index 0f2d31e5b..84bb567a4 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -2,13 +2,9 @@ 
  * Copyright (c) 2015-2018 Atomic Rules LLC
  */
 
-#include <getopt.h>
-#include <sys/time.h>
-#include <locale.h>
 #include <unistd.h>
 
 #include <rte_string_fns.h>
-#include <ethdev_driver.h>
 #include <rte_malloc.h>
 
 #include "ark_pktchkr.h"
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index ac4322a35..28a44f754 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -2,15 +2,9 @@ 
  * Copyright (c) 2015-2018 Atomic Rules LLC
  */
 
-#include <getopt.h>
-#include <sys/time.h>
-#include <locale.h>
 #include <unistd.h>
 
 #include <rte_string_fns.h>
-#include <rte_eal.h>
-
-#include <ethdev_driver.h>
 #include <rte_malloc.h>
 
 #include "ark_pktgen.h"
@@ -470,3 +464,17 @@  ark_pktgen_setup(ark_pkt_gen_t handle)
 		ark_pktgen_run(handle);
 	}
 }
+
+void *
+ark_pktgen_delay_start(void *arg)
+{
+	struct ark_pkt_gen_inst *inst = (struct ark_pkt_gen_inst *)arg;
+
+	/* This function is used exclusively for regression testing, We
+	 * perform a blind sleep here to ensure that the external test
+	 * application has time to setup the test before we generate packets
+	 */
+	usleep(100000);
+	ark_pktgen_run(inst);
+	return NULL;
+}
diff --git a/drivers/net/ark/ark_pktgen.h b/drivers/net/ark/ark_pktgen.h
index c61dfee6d..7147fe1bd 100644
--- a/drivers/net/ark/ark_pktgen.h
+++ b/drivers/net/ark/ark_pktgen.h
@@ -75,5 +75,6 @@  void ark_pktgen_set_hdr_dW(ark_pkt_gen_t handle, uint32_t *hdr);
 void ark_pktgen_set_start_offset(ark_pkt_gen_t handle, uint32_t x);
 void ark_pktgen_parse(char *argv);
 void ark_pktgen_setup(ark_pkt_gen_t handle);
+void *ark_pktgen_delay_start(void *arg);
 
 #endif