source: lib/Makefile.am @ ee6e802

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivelibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since ee6e802 was e63d80d, checked in by Shane Alcock <salcock@…>, 6 years ago

Add bucket data structure for keeping track of packet buffers

A bucket can contain anywhere from 1 to N packets and will point to a
buffer owned by libtrace. Libtrace can signal that it is finished with an
individual packet and when all packets associated with the buffer are
finished, the buffer will be freed automatically.

This should make buffer management easier for formats like bpf and RT where
multiple packets can be read at once and will allow us to retain zero-copy
behaviour (aside from the initial read) in a parallel libtrace program.

  • Property mode set to 100644
File size: 3.2 KB
RevLine 
[d8960164]1lib_LTLIBRARIES = libtrace.la
[0f6bc3f]2include_HEADERS = libtrace.h dagformat.h lt_inttypes.h daglegacy.h \
3        rt_protocol.h erftypes.h libtrace_parallel.h \
4        data-struct/ring_buffer.h data-struct/object_cache.h \
5        data-struct/vector.h data-struct/message_queue.h \
6        data-struct/deque.h data-struct/linked_list.h \
[e63d80d]7        data-struct/sliding_window.h hash_toeplitz.h \
8        data-struct/buckets.h
[df6ae1f]9
[e3a639a]10AM_CFLAGS=@LIBCFLAGS@ @CFLAG_VISIBILITY@ -pthread
11AM_CXXFLAGS=@LIBCXXFLAGS@ @CFLAG_VISIBILITY@ -pthread
[f1ab057]12
[3b8a5ef]13extra_DIST = format_template.c
[6cf3ca0]14NATIVEFORMATS=format_linux_common.c format_linux_ring.c format_linux_int.c format_linux_common.h
[755e794]15BPFFORMATS=format_bpf.c
16
[5e85c23]17if HAVE_DAG
18if DAG2_4
19DAGSOURCE=format_dag24.c
20else
21DAGSOURCE=format_dag25.c
22endif
23else
24DAGSOURCE=
25endif
[e5dedd5]26EXTRA_DIST=format_dag24.c format_dag25.c dpdk_libtrace.mk
[5e85c23]27
[d48008d]28if HAVE_LLVM
[3fc3267]29BPFJITSOURCE=bpf-jit/bpf-jit.cc
[d48008d]30else
31BPFJITSOURCE=
32endif
33
[c04929c]34if HAVE_DPDK
35NATIVEFORMATS+= format_dpdk.c
36# So we also make libtrace.mk in dpdk otherwise automake tries to expand
[771ab22]37# it too early which I cannot seem to stop unless we use a path that
[c04929c]38# doesn't exist currently
39export RTE_SDK=@RTE_SDK@
40export RTE_TARGET=@RTE_TARGET@
[354e54a]41export SAVED_CFLAGS:=$(CFLAGS)
42export SAVED_CXXFLAGS:=$(CXXFLAGS)
[c04929c]43include $(RTE_SDK)/mk/rte.vars.mk
44# We need to add -Wl before the linker otherwise this breaks our build
[2138553]45# And include any libraries that DPDK might depend upon
46export DPDK_LIBTRACE_MK=dpdk_libtrace.mk
47include $(DPDK_LIBTRACE_MK)
[354e54a]48export CFLAGS += $(SAVED_CFLAGS)
49export CXXFLAGS += $(SAVED_CXXFLAGS)
[c04929c]50endif
[d48008d]51
[29bbef0]52libtrace_la_SOURCES = trace.c trace_parallel.c common.h \
[a5908d2]53                format_erf.c format_pcap.c format_legacy.c \
[8bf0517]54                format_rt.c format_helper.c format_helper.h format_pcapfile.c \
[e01a738]55                format_duck.c format_tsh.c $(NATIVEFORMATS) $(BPFFORMATS) \
[e1fdc05]56                format_atmhdr.c \
[8b49230]57                libtrace_int.h lt_inttypes.h lt_bswap.h \
58                linktypes.c link_wireless.c byteswap.c \
[c909fad]59                checksum.c checksum.h \
[a81d2fc]60                protocols_pktmeta.c protocols_l2.c protocols_l3.c \
[8753bb8]61                protocols_transport.c protocols.h protocols_ospf.c \
[3fc3267]62                protocols_application.c \
[c66068d]63                $(DAGSOURCE) format_erf.h \
[d48008d]64                $(BPFJITSOURCE) \
[29bbef0]65                libtrace_arphrd.h \
[cb39d35]66                data-struct/ring_buffer.c data-struct/vector.c \
67                data-struct/message_queue.c data-struct/deque.c \
68                data-struct/sliding_window.c data-struct/object_cache.c \
69                data-struct/linked_list.c hash_toeplitz.c combiner_ordered.c \
[e63d80d]70                data-struct/buckets.c \
[c63bcdf]71                combiner_sorted.c combiner_unordered.c \
72                pthread_spinlock.c pthread_spinlock.h
[8bf0517]73
[df6ae1f]74if DAG2_4
[f6879f3]75nodist_libtrace_la_SOURCES = dagopts.c dagapi.c
[df6ae1f]76endif
77
[3a333e2]78AM_CPPFLAGS= @ADD_INCLS@
[2138553]79libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@ $(DPDKLIBS)
[e5f1431]80libtrace_la_LDFLAGS=-version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ @ADD_LDFLAGS@
[9daf398]81dagapi.c:
82        cp @DAG_TOOLS_DIR@/dagapi.c .
[df6ae1f]83
[9daf398]84dagopts.c:
85        cp @DAG_TOOLS_DIR@/dagopts.c .
[d48008d]86
87if HAVE_LLVM
88# Rules to build the llvm .cc file from a C description of each opcode.
89bpf-jit/bpf-opcodes.llvm.bc: bpf-jit/bpf-opcodes.c
[7b29593]90        $(LLVM_GCC) -std=c99 -c -O0 -emit-llvm $< -o $@
[d48008d]91
92bpf-jit/bpf-opcodes.llvm.cc: bpf-jit/bpf-opcodes.llvm.bc
[270fb67]93        `$(LLVM_CONFIG) --bindir`/llc -march=cpp -cppgen=module $< -o $@
[d48008d]94
95bpf-jit/bpf-jit.cc: bpf-jit/bpf-opcodes.llvm.cc
96
97EXTRA_DIST+=bpf-jit/bpf-opcodes.c
98BUILT_SOURCES=bpf-jit/bpf-opcodes.llvm.cc
99endif
100CLEANFILES=bpf-jit/bpf-opcodes.llvm.cc bpf-jit/bpf-opcodes.llvm.bc
Note: See TracBrowser for help on using the repository browser.