dpdk-ipsec-nodes multiarch: nodes are formatted in VLIB_NODE_FN style 35/16235/4
authorKingwel Xie <kingwel.xie@ericsson.com>
Wed, 28 Nov 2018 07:10:35 +0000 (02:10 -0500)
committerDamjan Marion <dmarion@me.com>
Thu, 29 Nov 2018 08:20:40 +0000 (08:20 +0000)
crypto-input,esp encrypt/decrypt are indicated in CMakefiles

Change-Id: I18ba851c1d4e5633d07c5de61cdaeae938e94982
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
src/plugins/dpdk/CMakeLists.txt
src/plugins/dpdk/ipsec/crypto_node.c
src/plugins/dpdk/ipsec/esp_decrypt.c
src/plugins/dpdk/ipsec/esp_encrypt.c

index f6ccb03..45605ba 100644 (file)
@@ -137,6 +137,9 @@ if(DPDK_INCLUDE_DIR AND DPDK_LIB)
     buffer.c
     device/device.c
     device/node.c
+    ipsec/crypto_node.c
+    ipsec/esp_decrypt.c
+    ipsec/esp_encrypt.c
 
     API_FILES
     api/dpdk.api
index 6c92e8f..5fbaaf3 100644 (file)
@@ -44,7 +44,7 @@ static char *dpdk_crypto_input_error_strings[] = {
 #undef _
 };
 
-vlib_node_registration_t dpdk_crypto_input_node;
+extern vlib_node_registration_t dpdk_crypto_input_node;
 
 typedef struct
 {
@@ -174,9 +174,9 @@ dpdk_crypto_dequeue (vlib_main_t * vm, vlib_node_runtime_t * node,
   return total_n_deq;
 }
 
-static uword
-dpdk_crypto_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
-                     vlib_frame_t * frame)
+static_always_inline uword
+dpdk_crypto_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
+                         vlib_frame_t * frame)
 {
   u32 thread_index = vlib_get_thread_index ();
   dpdk_crypto_main_t *dcm = &dpdk_crypto_main;
@@ -228,10 +228,16 @@ dpdk_crypto_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
   return n_deq;
 }
 
+VLIB_NODE_FN (dpdk_crypto_input_node) (vlib_main_t * vm,
+                                      vlib_node_runtime_t * node,
+                                      vlib_frame_t * from_frame)
+{
+  return dpdk_crypto_input_inline (vm, node, from_frame);
+}
+
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (dpdk_crypto_input_node) =
 {
-  .function = dpdk_crypto_input_fn,
   .name = "dpdk-crypto-input",
   .format_trace = format_dpdk_crypto_input_trace,
   .type = VLIB_NODE_TYPE_INPUT,
@@ -248,7 +254,6 @@ VLIB_REGISTER_NODE (dpdk_crypto_input_node) =
 };
 /* *INDENT-ON* */
 
-VLIB_NODE_FUNCTION_MULTIARCH (dpdk_crypto_input_node, dpdk_crypto_input_fn)
 /*
  * fd.io coding-style-patch-verification: ON
  *
index f0fa506..1ed3518 100644 (file)
@@ -62,8 +62,8 @@ static char * esp_decrypt_error_strings[] = {
 #undef _
 };
 
-vlib_node_registration_t dpdk_esp4_decrypt_node;
-vlib_node_registration_t dpdk_esp6_decrypt_node;
+extern vlib_node_registration_t dpdk_esp4_decrypt_node;
+extern vlib_node_registration_t dpdk_esp6_decrypt_node;
 
 typedef struct {
   ipsec_crypto_alg_t crypto_alg;
@@ -451,8 +451,8 @@ static char * esp_decrypt_post_error_strings[] = {
 #undef _
 };
 
-vlib_node_registration_t dpdk_esp4_decrypt_post_node;
-vlib_node_registration_t dpdk_esp6_decrypt_post_node;
+extern vlib_node_registration_t dpdk_esp4_decrypt_post_node;
+extern vlib_node_registration_t dpdk_esp6_decrypt_post_node;
 
 static u8 * format_esp_decrypt_post_trace (u8 * s, va_list * args)
 {
@@ -695,7 +695,9 @@ VLIB_REGISTER_NODE (dpdk_esp4_decrypt_post_node) = {
 VLIB_NODE_FN(dpdk_esp6_decrypt_post_node) (vlib_main_t * vm,
             vlib_node_runtime_t * node,
             vlib_frame_t * from_frame)
-{return dpdk_esp_decrypt_post_inline(vm, node, from_frame, 0/*is_ip6*/);}
+{
+  return dpdk_esp_decrypt_post_inline(vm, node, from_frame, 0/*is_ip6*/);
+}
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (dpdk_esp6_decrypt_post_node) = {
@@ -715,3 +717,4 @@ VLIB_REGISTER_NODE (dpdk_esp6_decrypt_post_node) = {
   },
 };
 /* *INDENT-ON* */
+
index 2259b1b..2a8d610 100644 (file)
@@ -63,8 +63,8 @@ static char *esp_encrypt_error_strings[] = {
 #undef _
 };
 
-vlib_node_registration_t dpdk_esp4_encrypt_node;
-vlib_node_registration_t dpdk_esp6_encrypt_node;
+extern vlib_node_registration_t dpdk_esp4_encrypt_node;
+extern vlib_node_registration_t dpdk_esp6_encrypt_node;
 
 typedef struct
 {