From 3e0ee6ec3ce1d3f32c1faca7514048e55412220e Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Fri, 18 May 2018 18:48:00 +0200 Subject: acl-plugin: refactor to introduce multiarch dataplane functions This commit splits the functions from fa_node.c into the pure dataplane node functions (which are multiarch-compiled), session management node functions (which are compiled only once), and session find/add/delete functions which are split out into the inlines. As part of the refactoring: - get rid of BV() macros in the affected chunk of code, rather use the explicit bihash function names. - add the magic trailer to the new files to ensure make checkstyle watches them. - move the bihash_template.c include for 40_8 bihash into acl.c Change-Id: I4d781e9ec4307ea84e92af93c09470ea2bd0c375 Signed-off-by: Andrew Yourtchenko --- src/plugins/acl.am | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'src/plugins/acl.am') diff --git a/src/plugins/acl.am b/src/plugins/acl.am index b67191ec938..7d723402615 100644 --- a/src/plugins/acl.am +++ b/src/plugins/acl.am @@ -14,17 +14,55 @@ vppapitestplugins_LTLIBRARIES += acl_test_plugin.la vppplugins_LTLIBRARIES += acl_plugin.la +acl_plugin_la_LDFLAGS = $(AM_LDFLAGS) +acl_plugin_la_LDFLAGS += -Wl,-lm,-ldl + + + +acl_plugin_la_LIBADD = + acl_plugin_la_SOURCES = \ acl/acl.c \ acl/hash_lookup.c \ acl/lookup_context.c \ - acl/fa_node.c \ + acl/sess_mgmt_node.c \ + acl/dataplane_node.c \ acl/l2sess.h \ acl/manual_fns.h \ acl/acl_plugin.api.h API_FILES += acl/acl.api +if CPU_X86_64 +acl_multiversioning_files = \ + acl/dataplane_node.c + + +if CC_SUPPORTS_AVX2 +############################################################### +# AVX2 +############################################################### +libacl_plugin_avx2_la_SOURCES = $(acl_multiversioning_files) +libacl_plugin_avx2_la_CFLAGS = \ + $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \ + -DCLIB_MULTIARCH_VARIANT=avx2 +noinst_LTLIBRARIES += libacl_plugin_avx2.la +acl_plugin_la_LIBADD += libacl_plugin_avx2.la +endif + +if CC_SUPPORTS_AVX512 +############################################################### +# AVX512 +############################################################### +libacl_plugin_avx512_la_SOURCES = $(acl_multiversioning_files) +libacl_plugin_avx512_la_CFLAGS = \ + $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \ + -DCLIB_MULTIARCH_VARIANT=avx512 +noinst_LTLIBRARIES += libacl_plugin_avx512.la +acl_plugin_la_LIBADD += libacl_plugin_avx512.la +endif +endif + nobase_apiinclude_HEADERS += \ acl/acl_all_api_h.h \ acl/acl_msg_enum.h \ -- cgit 1.2.3-korg