[spp] [PATCH 15/23] spp_vf: add include header files

x-fn-spp at sl.ntt-tx.co.jp x-fn-spp at sl.ntt-tx.co.jp
Wed Nov 21 02:35:50 CET 2018


From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>

Add include paths for common files and 'spp_vf.c' for previous changes.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki at lab.ntt.co.jp>
---
 src/vf/common/command_conn.h     | 2 ++
 src/vf/common/command_dec.h      | 2 ++
 src/vf/common/command_proc.c     | 2 ++
 src/vf/common/command_proc.h     | 2 ++
 src/vf/common/ringlatencystats.c | 1 +
 src/vf/common/spp_port.h         | 2 ++
 src/vf/common/spp_proc.c         | 9 ++-------
 src/vf/spp_vf.c                  | 2 ++
 8 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/vf/common/command_conn.h b/src/vf/common/command_conn.h
index 3e56570..517c0e9 100644
--- a/src/vf/common/command_conn.h
+++ b/src/vf/common/command_conn.h
@@ -12,6 +12,8 @@
  * Command connection management.
  */
 
+#include "spp_proc.h"
+
 /** result code - temporary error. please retry */
 #define SPP_CONNERR_TEMPORARY -1
 /** result code - fatal error occurred. should terminate process. */
diff --git a/src/vf/common/command_dec.h b/src/vf/common/command_dec.h
index 84644f2..93b4ebe 100644
--- a/src/vf/common/command_dec.h
+++ b/src/vf/common/command_dec.h
@@ -12,6 +12,8 @@
  * Decode and validate the command message string.
  */
 
+#include "spp_proc.h"
+
 /** max number of command per request */
 #define SPP_CMD_MAX_COMMANDS 32
 
diff --git a/src/vf/common/command_proc.c b/src/vf/common/command_proc.c
index d1c04db..1331400 100644
--- a/src/vf/common/command_proc.c
+++ b/src/vf/common/command_proc.c
@@ -10,6 +10,8 @@
 
 #include "spp_port.h"
 #include "string_buffer.h"
+#include "../classifier_mac.h"
+#include "../spp_forward.h"
 #include "command_conn.h"
 #include "command_dec.h"
 #include "command_proc.h"
diff --git a/src/vf/common/command_proc.h b/src/vf/common/command_proc.h
index 9e261f3..5e846a3 100644
--- a/src/vf/common/command_proc.h
+++ b/src/vf/common/command_proc.h
@@ -13,6 +13,8 @@
  * result JSON formatted data.
  */
 
+#include "spp_proc.h"
+
 /**
  * initialize command processor.
  *
diff --git a/src/vf/common/ringlatencystats.c b/src/vf/common/ringlatencystats.c
index 1483a7e..6ea5a7e 100644
--- a/src/vf/common/ringlatencystats.c
+++ b/src/vf/common/ringlatencystats.c
@@ -15,6 +15,7 @@
 #include <rte_memcpy.h>
 
 #include "ringlatencystats.h"
+#include "spp_proc.h"
 
 #define NS_PER_SEC 1E9
 
diff --git a/src/vf/common/spp_port.h b/src/vf/common/spp_port.h
index a59feca..10409ab 100644
--- a/src/vf/common/spp_port.h
+++ b/src/vf/common/spp_port.h
@@ -12,6 +12,8 @@
  * Provide about the ability per port.
  */
 
+#include "spp_proc.h"
+
 /** Calculate TCI of VLAN tag. */
 #define SPP_VLANTAG_CALC_TCI(id, pcp) (((pcp & 0x07) << 13) | (id & 0x0fff))
 
diff --git a/src/vf/common/spp_proc.c b/src/vf/common/spp_proc.c
index a6ddeb6..87fb9d3 100644
--- a/src/vf/common/spp_proc.c
+++ b/src/vf/common/spp_proc.c
@@ -14,8 +14,8 @@
 #include "spp_proc.h"
 #include "spp_port.h"
 
-#include "../vf/spp_forward.h"
-#include "../vf/classifier_mac.h"
+#include "../spp_forward.h"
+#include "../classifier_mac.h"
 
 /* Manage data to addoress */
 struct manage_data_addr_info {
@@ -880,15 +880,10 @@ flush_component(void)
 		component_info = (p_component_info + cnt);
 		spp_port_ability_update(component_info);
 
-#ifdef SPP_VF_MODULE
 		if (component_info->type == SPP_COMPONENT_CLASSIFIER_MAC)
 			ret = spp_classifier_mac_update(component_info);
 		else
 			ret = spp_forward_update(component_info);
-#endif /* SPP_VF_MODULE */
-#ifdef SPP_MIRROR_MODULE
-		ret = spp_mirror_update(component_info);
-#endif /* SPP_MIRROR_MODULE */
 		if (unlikely(ret < 0)) {
 			RTE_LOG(ERR, APP, "Flush error. "
 					"( component = %s, type = %d)\n",
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 63ad71a..7ceb88f 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -6,10 +6,12 @@
 #include <arpa/inet.h>
 #include <getopt.h>
 
+#include "spp_proc.h"
 #include "spp_vf.h"
 #include "classifier_mac.h"
 #include "spp_forward.h"
 #include "command_proc.h"
+#include "command_dec.h"
 #include "spp_port.h"
 
 /* Declare global variables */
-- 
2.18.0



More information about the spp mailing list