summaryrefslogtreecommitdiff
path: root/drivers/net/mvpp2
diff options
context:
space:
mode:
authorTomasz Duszynski <tdu@semihalf.com>2018-09-25 09:04:58 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-09-28 01:41:03 +0200
commitfad0cfe030c573d482e57cbc099816826c8e9bec (patch)
treed27862955ec60d477079a54be7b09fa775016bca /drivers/net/mvpp2
parent5997b0a827619b085852a00cb78af31ba4edac7c (diff)
downloaddpdk-next-eventdev-fad0cfe030c573d482e57cbc099816826c8e9bec.zip
dpdk-next-eventdev-fad0cfe030c573d482e57cbc099816826c8e9bec.tar.gz
dpdk-next-eventdev-fad0cfe030c573d482e57cbc099816826c8e9bec.tar.xz
net/mvpp2: move common code
Cleanup sources by moving common code to the pmd header file. Signed-off-by: Tomasz Duszynski <tdu@semihalf.com> Signed-off-by: Natalie Samsonov <nsamsono@marvell.com> Reviewed-by: Liron Himi <lironh@marvell.com>
Diffstat (limited to 'drivers/net/mvpp2')
-rw-r--r--drivers/net/mvpp2/mrvl_ethdev.c9
-rw-r--r--drivers/net/mvpp2/mrvl_ethdev.h11
-rw-r--r--drivers/net/mvpp2/mrvl_flow.c5
-rw-r--r--drivers/net/mvpp2/mrvl_qos.c9
4 files changed, 11 insertions, 23 deletions
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index dca3ccc..c8c8548 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -10,15 +10,6 @@
#include <rte_malloc.h>
#include <rte_bus_vdev.h>
-/* Unluckily, container_of is defined by both DPDK and MUSDK,
- * we'll declare only one version.
- *
- * Note that it is not used in this PMD anyway.
- */
-#ifdef container_of
-#undef container_of
-#endif
-
#include <fcntl.h>
#include <linux/ethtool.h>
#include <linux/sockios.h>
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index 3726f78..2204be2 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -10,12 +10,23 @@
#include <rte_spinlock.h>
#include <rte_flow_driver.h>
+/*
+ * container_of is defined by both DPDK and MUSDK,
+ * we'll declare only one version.
+ *
+ * Note that it is not used in this PMD anyway.
+ */
+#ifdef container_of
+#undef container_of
+#endif
+
#include <env/mv_autogen_comp_flags.h>
#include <drivers/mv_pp2.h>
#include <drivers/mv_pp2_bpool.h>
#include <drivers/mv_pp2_cls.h>
#include <drivers/mv_pp2_hif.h>
#include <drivers/mv_pp2_ppio.h>
+#include "env/mv_common.h" /* for BIT() */
/** Maximum number of rx queues per port */
#define MRVL_PP2_RXQ_MAX 32
diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c
index 13295e6..db750f4 100644
--- a/drivers/net/mvpp2/mrvl_flow.c
+++ b/drivers/net/mvpp2/mrvl_flow.c
@@ -11,13 +11,8 @@
#include <arpa/inet.h>
-#ifdef container_of
-#undef container_of
-#endif
-
#include "mrvl_ethdev.h"
#include "mrvl_qos.h"
-#include "env/mv_common.h" /* for BIT() */
/** Number of rules in the classifier table. */
#define MRVL_CLS_MAX_NUM_RULES 20
diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c
index 71856c1..eeb46f8 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -15,15 +15,6 @@
#include <rte_malloc.h>
#include <rte_string_fns.h>
-/* Unluckily, container_of is defined by both DPDK and MUSDK,
- * we'll declare only one version.
- *
- * Note that it is not used in this PMD anyway.
- */
-#ifdef container_of
-#undef container_of
-#endif
-
#include "mrvl_qos.h"
/* Parsing tokens. Defined conveniently, so that any correction is easy. */