aboutsummaryrefslogtreecommitdiffstats
path: root/build-root/emacs-lisp/plugin-node-skel.el
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-02-10 11:57:46 -0500
committerDave Barach <dave@barachs.net>2017-02-10 15:05:19 -0500
commitfed79e83910459ed700615d2a5a24024f835a66c (patch)
tree6244c857d9858a73d41a66779a9ed0070c053305 /build-root/emacs-lisp/plugin-node-skel.el
parentb91017a30b3a2034c47008e7bcfe7bda49fe7c57 (diff)
Update plugin templates
Disguise the string "fd.io coding-style blah blah blah" to avoid spurious checkstyle failures on the emacs lisp code. DGMS. Change-Id: I6b88d9588dff7d67c6e509052ae4f32529684de7 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'build-root/emacs-lisp/plugin-node-skel.el')
-rw-r--r--build-root/emacs-lisp/plugin-node-skel.el24
1 files changed, 17 insertions, 7 deletions
diff --git a/build-root/emacs-lisp/plugin-node-skel.el b/build-root/emacs-lisp/plugin-node-skel.el
index ee745c35326..167519aa266 100644
--- a/build-root/emacs-lisp/plugin-node-skel.el
+++ b/build-root/emacs-lisp/plugin-node-skel.el
@@ -21,8 +21,8 @@ nil
'(if (not (boundp 'plugin-name))
(setq plugin-name (read-string "Plugin name: ")))
'(setq PLUGIN-NAME (upcase plugin-name))
-"
-/*
+'(setq capital-oh-en "ON")
+"/*
* node.c - skeleton vpp engine plug-in dual-loop node skeleton
*
* Copyright (c) <current-year> <your-organization>
@@ -44,7 +44,8 @@ nil
#include <vppinfra/error.h>
#include <" plugin-name "/" plugin-name ".h>
-typedef struct {
+typedef struct
+{
u32 next_index;
u32 sw_if_index;
u8 new_src_mac[6];
@@ -92,7 +93,8 @@ static char * " plugin-name "_error_strings[] = {
#undef _
};
-typedef enum {
+typedef enum
+{
" PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT,
" PLUGIN-NAME "_N_NEXT,
} " plugin-name "_next_t;
@@ -187,8 +189,6 @@ static uword
foreach_mac_address_offset;
#undef _
-
-
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
sw_if_index1 = vnet_buffer(b1)->sw_if_index[VLIB_RX];
@@ -300,7 +300,9 @@ static uword
return frame->n_vectors;
}
-VLIB_REGISTER_NODE (" plugin-name "_node) = {
+/* *INDENT-OFF* */
+VLIB_REGISTER_NODE (" plugin-name "_node) =
+{
.function = " plugin-name "_node_fn,
.name = \"" plugin-name "\",
.vector_size = sizeof (u32),
@@ -317,4 +319,12 @@ VLIB_REGISTER_NODE (" plugin-name "_node) = {
[" PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT] = \"interface-output\",
},
};
+/* *INDENT-ON* */
+/*
+ * fd.io coding-style-patch-verification: " capital-oh-en "
+ *
+ * Local Variables:
+ * eval: (c-set-style \"gnu\")
+ * End:
+ */
")