diff options
author | Dave Barach <dave@barachs.net> | 2018-08-10 16:22:48 -0400 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-08-11 00:07:10 +0000 |
commit | d7a37a75625dd5f09cdb99e0de6e40b49dd9a0d0 (patch) | |
tree | e2a4c5cd4aa7b90b90cb5bd28099731bbca11017 /extras/emacs/plugin-node-skel.el | |
parent | 7eb9d9608b5b47b95f4860b2c470411658f7cdac (diff) |
emacs skeletons: add quad/single, avx2/avx512 support
Change-Id: Ib8095ad69620308d6199ab030a754ee45f92e59b
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'extras/emacs/plugin-node-skel.el')
-rw-r--r-- | extras/emacs/plugin-node-skel.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/extras/emacs/plugin-node-skel.el b/extras/emacs/plugin-node-skel.el index 167519aa266..1c4b0a072b1 100644 --- a/extras/emacs/plugin-node-skel.el +++ b/extras/emacs/plugin-node-skel.el @@ -52,6 +52,7 @@ typedef struct u8 new_dst_mac[6]; } " plugin-name "_trace_t; +#ifndef CLIB_MARCH_VARIANT static u8 * format_mac_address (u8 * s, va_list * args) { @@ -74,6 +75,7 @@ static u8 * format_" plugin-name "_trace (u8 * s, va_list * args) format_mac_address, t->new_dst_mac); return s; } +#endif /* CLIB_MARCH_VARIANT */ vlib_node_registration_t " plugin-name "_node; @@ -87,11 +89,14 @@ typedef enum { " PLUGIN-NAME "_N_ERROR, } " plugin-name "_error_t; -static char * " plugin-name "_error_strings[] = { +#ifndef CLIB_MARCH_VARIANT +static char * " plugin-name "_error_strings[] = +{ #define _(sym,string) string, foreach_" plugin-name "_error #undef _ }; +#endif /* CLIB_MARCH_VARIANT */ typedef enum { @@ -107,8 +112,8 @@ _(3) \\ _(4) \\ _(5) -static uword -" plugin-name "_node_fn (vlib_main_t * vm, + +VLIB_NODE_FN (" plugin-name "_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -301,9 +306,9 @@ static uword } /* *INDENT-OFF* */ +#ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (" plugin-name "_node) = { - .function = " plugin-name "_node_fn, .name = \"" plugin-name "\", .vector_size = sizeof (u32), .format_trace = format_" plugin-name "_trace, @@ -319,6 +324,7 @@ VLIB_REGISTER_NODE (" plugin-name "_node) = [" PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT] = \"interface-output\", }, }; +#endif /* CLIB_MARCH_VARIANT */ /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: " capital-oh-en " |