summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-09-30 18:26:20 +0200
committerDamjan Marion <dmarion@me.com>2018-10-23 14:21:10 +0000
commit68b4da67deb2e8ca224bb5abaeb9dbc7ae8e378c (patch)
treecd1ee2c463aefdb31c73665eafb876568054f49e /src/plugins/dpdk/buffer.c
parentfc3b8b8ad08d2d4cc375149ecdc10c37d4a80940 (diff)
Numa-aware, growable physical memory allocator (pmalloc)
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/buffer.c')
-rw-r--r--src/plugins/dpdk/buffer.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index f7ed932e35f..770e76d398e 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -393,12 +393,12 @@ dpdk_packet_template_init (vlib_main_t * vm,
clib_error_t *
dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size,
u32 num_elts, u32 pool_priv_size, u16 cache_size, u8 numa,
- struct rte_mempool **_mp, vlib_physmem_region_index_t * pri)
+ struct rte_mempool **_mp, u32 * map_index)
{
struct rte_mempool *mp;
enum rte_iova_mode iova_mode;
- vlib_physmem_region_t *pr;
dpdk_mempool_private_t priv;
+ vlib_physmem_map_t *pm;
clib_error_t *error = 0;
size_t min_chunk_size, align;
int map_dma = 1;
@@ -406,7 +406,6 @@ dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size,
i32 ret;
uword i;
-
mp = rte_mempool_create_empty ((char *) pool_name, num_elts, elt_size,
512, pool_priv_size, numa, 0);
if (!mp)
@@ -417,16 +416,13 @@ dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size,
size = rte_mempool_op_calc_mem_size_default (mp, num_elts, 21,
&min_chunk_size, &align);
- error = vlib_physmem_region_alloc (vm, (char *) pool_name, size, numa,
- VLIB_PHYSMEM_F_HUGETLB |
- VLIB_PHYSMEM_F_SHARED, pri);
- if (error)
+ if ((error = vlib_physmem_shared_map_create (vm, (char *) pool_name, size,
+ numa, map_index)))
{
rte_mempool_free (mp);
return error;
}
-
- pr = vlib_physmem_get_region (vm, pri[0]);
+ pm = vlib_physmem_get_map (vm, *map_index);
/* Call the mempool priv initializer */
priv.mbp_priv.mbuf_data_room_size = VLIB_BUFFER_PRE_DATA_SIZE +
@@ -438,12 +434,12 @@ dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size,
map_dma = 0;
iova_mode = rte_eal_iova_mode ();
- for (i = 0; i < pr->n_pages; i++)
+ for (i = 0; i < pm->n_pages; i++)
{
- size_t page_sz = 1ull << pr->log2_page_size;
- char *va = ((char *) pr->mem) + i * page_sz;
+ size_t page_sz = 1ULL << pm->log2_page_size;
+ char *va = ((char *) pm->base) + i * page_sz;
uword pa = iova_mode == RTE_IOVA_VA ?
- pointer_to_uword (va) : pr->page_table[i];
+ pointer_to_uword (va) : pm->page_table[i];
ret = rte_mempool_populate_iova (mp, va, pa, page_sz, 0, 0);
if (ret < 0)
{
@@ -467,10 +463,10 @@ dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
{
dpdk_main_t *dm = &dpdk_main;
struct rte_mempool *rmp;
- vlib_physmem_region_index_t pri;
clib_error_t *error = 0;
u8 *pool_name;
u32 elt_size, i;
+ u32 map_index;
vec_validate_aligned (dm->pktmbuf_pools, socket_id, CLIB_CACHE_LINE_BYTES);
@@ -484,10 +480,9 @@ dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
VLIB_BUFFER_HDR_SIZE /* priv size */ +
VLIB_BUFFER_PRE_DATA_SIZE + VLIB_BUFFER_DATA_SIZE; /*data room size */
- error =
- dpdk_pool_create (vm, pool_name, elt_size, num_mbufs,
- sizeof (dpdk_mempool_private_t), 512, socket_id,
- &rmp, &pri);
+ error = dpdk_pool_create (vm, pool_name, elt_size, num_mbufs,
+ sizeof (dpdk_mempool_private_t), 512, socket_id,
+ &rmp, &map_index);
vec_free (pool_name);
@@ -497,7 +492,8 @@ dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
rte_mempool_obj_iter (rmp, rte_pktmbuf_init, 0);
dpdk_mempool_private_t *privp = rte_mempool_get_priv (rmp);
- privp->buffer_pool_index = vlib_buffer_pool_create (vm, pri, 0);
+ privp->buffer_pool_index =
+ vlib_buffer_register_physmem_map (vm, map_index);
dm->pktmbuf_pools[socket_id] = rmp;
} /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects

AM_CPPFLAGS = -Wall @VEC64@ # -Werror

if WITH_UNIX
  lib_LTLIBRARIES = libvppinfra.la
endif

lib_LIBRARIES =

TESTS	=  test_bihash_template \
	   test_elog \
	   test_elf \
	   test_fifo \
	   test_format \
	   test_hash \
	   test_heap \
	   test_longjmp \
	   test_macros \
	   test_md5 \
	   test_mheap \
	   test_pfhash \
	   test_phash \
	   test_pool_iterate \
	   test_qhash \
	   test_random \
	   test_random_isaac \
	   test_serialize \
	   test_slist \
	   test_socket \
	   test_time \
	   test_timing_wheel \
	   test_vec \
	   test_zvec 

noinst_PROGRAMS = $(TESTS)
check_PROGRAMS	= $(TESTS)

test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
test_elog_SOURCES = vppinfra/test_elog.c
test_elf_SOURCES = vppinfra/test_elf.c
test_fifo_SOURCES = vppinfra/test_fifo.c
test_format_SOURCES = vppinfra/test_format.c
test_hash_SOURCES = vppinfra/test_hash.c
test_heap_SOURCES = vppinfra/test_heap.c
test_longjmp_SOURCES = vppinfra/test_longjmp.c
test_macros_SOURCES = vppinfra/test_macros.c
test_md5_SOURCES = vppinfra/test_md5.c
test_mheap_SOURCES = vppinfra/test_mheap.c
test_pfhash_SOURCES = vppinfra/test_pfhash.c
test_phash_SOURCES = vppinfra/test_phash.c
test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
test_qhash_SOURCES = vppinfra/test_qhash.c
test_random_SOURCES = vppinfra/test_random.c
test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
test_serialize_SOURCES = vppinfra/test_serialize.c
test_slist_SOURCES = vppinfra/test_slist.c
test_socket_SOURCES = vppinfra/test_socket.c
test_time_SOURCES = vppinfra/test_time.c
test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
test_vec_SOURCES = vppinfra/test_vec.c
test_zvec_SOURCES = vppinfra/test_zvec.c

# All unit tests use ASSERT for failure
# So we'll need -DDEBUG to enable ASSERTs
test_bihash_template_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_elog_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_elf_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_fifo_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_format_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_hash_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_heap_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_longjmp_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_macros_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_md5_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_mheap_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_pfhash_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_phash_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_pool_iterate_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_qhash_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_socket_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_time_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_vec_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG
test_zvec_CPPFLAGS =	$(AM_CPPFLAGS) -DCLIB_DEBUG

test_bihash_template_LDADD =	libvppinfra.la
test_elog_LDADD =	libvppinfra.la
test_elf_LDADD =	libvppinfra.la
test_fifo_LDADD =	libvppinfra.la
test_format_LDADD =	libvppinfra.la
test_hash_LDADD =	libvppinfra.la
test_heap_LDADD =	libvppinfra.la
test_longjmp_LDADD =	libvppinfra.la
test_macros_LDADD =	libvppinfra.la
test_md5_LDADD =	libvppinfra.la
test_mheap_LDADD =	libvppinfra.la
test_pfhash_LDADD =	libvppinfra.la
test_phash_LDADD =	libvppinfra.la
test_pool_iterate_LDADD =	libvppinfra.la
test_qhash_LDADD =	libvppinfra.la
test_random_LDADD =	libvppinfra.la
test_random_isaac_LDADD =	libvppinfra.la
test_serialize_LDADD =	libvppinfra.la
test_slist_LDADD =	libvppinfra.la
test_socket_LDADD =	libvppinfra.la
test_time_LDADD =	libvppinfra.la -lm
test_timing_wheel_LDADD =	libvppinfra.la -lm
test_vec_LDADD =	libvppinfra.la
test_zvec_LDADD =	libvppinfra.la

test_bihash_template_LDFLAGS = -static
test_elog_LDFLAGS = -static
test_elf_LDFLAGS = -static
test_fifo_LDFLAGS = -static
test_format_LDFLAGS = -static
test_hash_LDFLAGS = -static
test_heap_LDFLAGS = -static
test_longjmp_LDFLAGS = -static
test_macros_LDFLAGS = -static
test_md5_LDFLAGS = -static
test_mheap_LDFLAGS = -static
test_pfhash_LDFLAGS = -static
test_phash_LDFLAGS = -static
test_pool_iterate_LDFLAGS = -static
test_qhash_LDFLAGS = -static
test_random_LDFLAGS = -static
test_random_isaac_LDFLAGS = -static
test_serialize_LDFLAGS = -static
test_slist_LDFLAGS = -static
test_socket_LDFLAGS = -static
test_time_LDFLAGS = -static
test_timing_wheel_LDFLAGS = -static
test_vec_LDFLAGS = -static
test_zvec_LDFLAGS = -static

# noinst_PROGRAMS += test_vhash
# test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
# test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
# test_vhash_LDADD = libvppinfra.la
# test_vhash_LDFLAGS = -static

nobase_include_HEADERS = \
  vppinfra/asm_mips.h \
  vppinfra/asm_x86.h \
  vppinfra/bihash_8_8.h \
  vppinfra/bihash_24_8.h \
  vppinfra/bihash_template.h \
  vppinfra/bihash_template.c \
  vppinfra/bitmap.h \
  vppinfra/bitops.h \
  vppinfra/byte_order.h \
  vppinfra/cache.h \
  vppinfra/clib.h \
  vppinfra/elf.h \
  vppinfra/elf_clib.h \
  vppinfra/elog.h \
  vppinfra/fheap.h \
  vppinfra/error.h \
  vppinfra/error_bootstrap.h \
  vppinfra/fifo.h \
  vppinfra/format.h \
  vppinfra/graph.h \
  vppinfra/hash.h \
  vppinfra/heap.h \
  vppinfra/longjmp.h \
  vppinfra/macros.h \
  vppinfra/math.h \
  vppinfra/md5.h \
  vppinfra/mem.h \
  vppinfra/mhash.h \
  vppinfra/mheap.h \
  vppinfra/mheap_bootstrap.h \
  vppinfra/os.h \
  vppinfra/pfhash.h \
  vppinfra/phash.h \
  vppinfra/pipeline.h \
  vppinfra/pool.h \
  vppinfra/qhash.h \
  vppinfra/random.h \
  vppinfra/random_buffer.h \
  vppinfra/random_isaac.h \
  vppinfra/serialize.h \
  vppinfra/slist.h \
  vppinfra/smp.h \
  vppinfra/smp_fifo.h \
  vppinfra/socket.h \
  vppinfra/sparse_vec.h \
  vppinfra/string.h \
  vppinfra/time.h \
  vppinfra/timing_wheel.h \
  vppinfra/timer.h \
  vppinfra/types.h \
  vppinfra/unix.h \
  vppinfra/vec.h \
  vppinfra/vec_bootstrap.h \
  vppinfra/vector.h \
  vppinfra/vector_altivec.h \
  vppinfra/vector_funcs.h \
  vppinfra/vector_iwmmxt.h \
  vppinfra/vector_sse2.h \
  vppinfra/valgrind.h \
  vppinfra/vm_unix.h \
  vppinfra/xxhash.h \
  vppinfra/xy.h \
  vppinfra/zvec.h

CLIB_CORE = \
  vppinfra/asm_x86.c \
  vppinfra/backtrace.c \
  vppinfra/elf.c \
  vppinfra/elog.c \
  vppinfra/error.c \
  vppinfra/fifo.c \
  vppinfra/fheap.c \
  vppinfra/format.c \
  vppinfra/graph.c \
  vppinfra/hash.c \
  vppinfra/heap.c \
  vppinfra/longjmp.S \
  vppinfra/macros.c \
  vppinfra/mhash.c \
  vppinfra/mheap.c \
  vppinfra/md5.c \
  vppinfra/mem_mheap.c \
  vppinfra/pfhash.c \
  vppinfra/phash.c \
  vppinfra/qhash.c \
  vppinfra/random.c \
  vppinfra/random_buffer.c \
  vppinfra/random_isaac.c \
  vppinfra/serialize.c \
  vppinfra/slist.c \
  vppinfra/smp.c \
  vppinfra/smp_fifo.c \
  vppinfra/std-formats.c \
  vppinfra/string.c \
  vppinfra/time.c \
  vppinfra/timing_wheel.c \
  vppinfra/unformat.c \
  vppinfra/vec.c \
  vppinfra/vector.c \
  vppinfra/zvec.c

# Core plus Unix additions
libvppinfra_la_SOURCES =			\
  $(CLIB_CORE)					\
  vppinfra/elf_clib.c				\
  vppinfra/socket.c				\
  vppinfra/timer.c				\
  vppinfra/unix-formats.c			\
  vppinfra/unix-misc.c

bin_PROGRAMS = elftool

elftool_SOURCES = tools/elftool.c
elftool_CPPFLAGS = -Wall
elftool_LDADD = libvppinfra.la -lpthread -lrt -lm