Skip to content

Commit 8939e15

Browse files
committed
Merge branch 'develop'
2 parents a3e5ae8 + 4b2f8bc commit 8939e15

File tree

35 files changed

+269
-172
lines changed

35 files changed

+269
-172
lines changed

.github/workflows/dpdk.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: [ubuntu-22.04, ubuntu-20.04]
37-
dpdk_version: [dpdk-21.11, dpdk-20.11, dpdk-20.02, dpdk-19.11.5, dpdk-18.11.10, dpdk-17.11.10, dpdk-16.11.11]
37+
dpdk_version: [dpdk-22.07, dpdk-21.11.2, dpdk-20.11.6, dpdk-19.11.13, dpdk-18.11.11, dpdk-17.11.10, dpdk-16.11.11]
3838
exclude:
3939
- os: ubuntu-16.04
4040
dpdk_version: dpdk-20.11
@@ -54,7 +54,7 @@ jobs:
5454
sudo mount
5555
- name: Install dependencies
5656
run: |
57-
sudo apt-get -y install build-essential python3-pyelftools flex bison python3-pip python3-setuptools
57+
sudo apt-get -y install build-essential python3-pyelftools flex bison python3-pip python3-setuptools libfl-dev
5858
sudo apt-get -y install libpcap0.8-dev libtool pkgconf wget m4 autoconf automake gcc libnuma-dev
5959
sudo apt-get -y install meson ninja-build
6060
sudo pip3 install meson ninja || true

.github/workflows/libtrace.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ jobs:
4949
- name: Install Dependencies
5050
run: |
5151
sudo apt update
52-
sudo apt-get -y install flex bison libpcap0.8-dev libtool pkgconf autoconf automake m4 gcc clang llvm gcc-multilib
52+
sudo apt install -y wget software-properties-common gnupg lsb-release
53+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
54+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
55+
sudo apt update
56+
sudo apt-get -y install flex bison libpcap0.8-dev libtool pkgconf autoconf automake m4 gcc gcc-multilib
5357
sudo apt-get -y install build-essential dpdk-dev libelf-dev git libyaml-dev libssl-dev
5458
sudo apt-get -y install uthash-dev
5559
- name: Install PF_RING
@@ -61,6 +65,38 @@ jobs:
6165
sudo apt-get update
6266
sudo apt-get -y install pfring
6367
sudo ldconfig
68+
- name: Checkout libxdp
69+
uses: actions/checkout@v2
70+
with:
71+
path: xdp-tools
72+
repository: xdp-project/xdp-tools
73+
- name: Build/Install libxdp
74+
run: |
75+
cat << "EOF" > /tmp/ln.sh
76+
#!/bin/bash
77+
function do_lns {
78+
LASTVERSION=0
79+
for exe in `find /usr/bin/ -name ${1}-* | sort -nr | grep '\-[0-9]*$'`; do
80+
newexe=`basename $exe | rev | cut -d '-' -f 1 --complement | rev`
81+
version=`basename $exe | rev | cut -d '-' -f 1 | rev`
82+
83+
if [ ! -f /usr/local/bin/$newexe ]; then
84+
ln -s -v $exe /usr/local/bin/$newexe
85+
LASTVERSION=$version
86+
elif [ "$version" -ge "$LASTVERSION" ]; then
87+
ln -f -s -v $exe /usr/local/bin/$newexe
88+
LASTVERSION=$version
89+
fi
90+
done
91+
}
92+
do_lns clang
93+
do_lns llc
94+
EOF
95+
/bin/bash /tmp/ln.sh
96+
cd xdp-tools
97+
./configure
98+
sudo make -j 3 libxdp_install
99+
sudo ldconfig
64100
- name: Checkout Libbpf
65101
uses: actions/checkout@v2
66102
with:

.github/workflows/pkg-build.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
arch:
1717
- amd64
1818
target:
19-
- "debian:stretch"
2019
- "debian:buster"
2120
- "debian:bullseye"
2221
- "ubuntu:bionic"
@@ -36,7 +35,7 @@ jobs:
3635
mkdir -p packages/${DIRNAME}
3736
cp ../*.deb packages/${DIRNAME}/
3837
- name: Publish packages to cloudsmith
39-
uses: wanduow/action-cloudsmith-upload-packages@v1
38+
uses: wandnz/action-cloudsmith-upload-packages@v1.6
4039
with:
4140
path: packages/
4241
repo: ${{ secrets.CLOUDSMITH_OWNER }}/libtrace

.github/workflows/rpm-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- "centos:7"
2020
- "fedora:35"
2121
- "fedora:36"
22-
- "rockylinux:8.5"
23-
- "almalinux:8.5"
22+
- "rockylinux:8.6"
23+
- "rockylinux:9.0"
2424

2525

2626
steps:
@@ -36,7 +36,7 @@ jobs:
3636
mkdir -p packages/${DIRNAME}
3737
cp ~/rpmbuild/RPMS/x86_64/*.rpm packages/${DIRNAME}/
3838
- name: Publish packages to cloudsmith
39-
uses: salcock/action-cloudsmith-upload-packages@1.6
39+
uses: salcock/action-cloudsmith-upload-packages@v1.7
4040
with:
4141
path: packages/
4242
repo: ${{ secrets.CLOUDSMITH_OWNER }}/libtrace

Intel DPDK Patches/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ turn on some features for the Intel 82580 Controller. These can then be enabled
33
by setting the related define to 1 in the libtrace dpdk.c source file.
44

55
For more information on the DPDK format check out the notes on the libtrace
6-
wiki https://secure.wand.net.nz/trac/libtrace/wiki/UserDocumentation.
6+
wiki https://github.com/LibtraceTeam/libtrace/wiki.
77

88
These can be applied from the directory a level above /DPDK using this command:
99
~patch -p0 < name.patch

README

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
libtrace 4.0.19
1+
libtrace 4.0.20
22

33
---------------------------------------------------------------------------
44
Copyright (c) 2007-2022 The University of Waikato, Hamilton, New Zealand.
55
All rights reserved.
66

7-
This code has been developed by the University of Waikato WAND
7+
This code was originally developed by the University of Waikato WAND
88
research group. For further information please see http://www.wand.net.nz/.
99
---------------------------------------------------------------------------
1010

@@ -22,14 +22,11 @@ In version 4.0, we have introduced an API for processing packets in parallel
2222
using multiple threads. See libtrace_parallel.h for a detailed description
2323
of the API.
2424

25-
Further information about libtrace, see
26-
http://research.wand.net.nz/software/libtrace.php
25+
For further information about libtrace or to report bugs in libtrace,
26+
please go to https://github.com/LibtraceTeam/libtrace
2727

28-
Bugs should be reported by either emailing contact@wand.net.nz or filing
29-
an issue at https://github.com/LibtraceTeam/libtrace
30-
31-
It is licensed under the GNU Lesser General Public License (GPL) version 3.
32-
Please see the included files COPYING and COPYING.LESSER for details of this
28+
Libtrace is licensed under the GNU Lesser General Public License (GPL) version
29+
3. Please see the included files COPYING and COPYING.LESSER for details of this
3330
license.
3431

3532
A detailed ChangeLog can be found on the libtrace wiki:
@@ -38,5 +35,3 @@ https://github.com/LibtraceTeam/libtrace/wiki/ChangeLog
3835
Documentation, usage instructions and a detailed tutorial can also found
3936
on the libtrace wiki.
4037

41-
For further information, please contact the WAND group. See
42-
http://www.wand.net.nz/ for details.

configure.in

Lines changed: 64 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Now you only need to update the version number in two places - below,
44
# and in the README
55

6-
AC_INIT([libtrace],[4.0.19],[contact@wand.net.nz],[libtrace])
6+
AC_INIT([libtrace],[4.0.20],[shane@alcock.co.nz],[libtrace])
77

88
LIBTRACE_MAJOR=4
99
LIBTRACE_MID=0
10-
LIBTRACE_MINOR=19
10+
LIBTRACE_MINOR=20
1111

1212
# OpenSolaris hides libraries like libncurses in /usr/gnu/lib, which is not
1313
# searched by default - add it to LDFLAGS so we at least have a chance of
@@ -61,7 +61,7 @@ AC_CACHE_CHECK([whether the C++ compiler works],
6161
])
6262

6363
# Put all our automake definitions in config.h
64-
AM_CONFIG_HEADER([config.h])
64+
AC_CONFIG_HEADERS([config.h])
6565

6666
# Checks for C and C++ compilers
6767
AC_PROG_CC
@@ -73,11 +73,11 @@ if test "$rw_cv_prog_cxx_works" = "no"; then
7373
fi
7474

7575
# Checking for 'install'
76-
AC_PROG_INSTALL
76+
LT_INIT
7777

7878
# Checking for bison and flex
7979
AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
80-
AM_PROG_LEX
80+
AC_PROG_LEX(yywrap)
8181

8282
PKG_PROG_PKG_CONFIG
8383

@@ -93,7 +93,8 @@ AC_C_CONST
9393
AC_C_INLINE
9494
AC_C_BIGENDIAN
9595
AC_TYPE_SIZE_T
96-
AC_HEADER_TIME
96+
AC_CHECK_HEADERS_ONCE([sys/time.h])
97+
9798
AC_SYS_LARGEFILE
9899

99100
LIBPKTDUMP_LIBS="-ltrace "
@@ -147,7 +148,7 @@ gcc_FORMAT
147148
gcc_TLS
148149

149150
# Check for libtool
150-
AC_PROG_LIBTOOL
151+
LT_INIT
151152

152153
# Checks for library functions.
153154
AC_PROG_GCC_TRADITIONAL
@@ -160,7 +161,6 @@ AC_CHECK_SIZEOF([long int])
160161

161162

162163
# Checks for header files.
163-
AC_HEADER_STDC
164164
AC_CHECK_HEADERS(pcap.h pcap-bpf.h net/bpf.h sys/limits.h stddef.h inttypes.h limits.h net/ethernet.h sys/prctl.h)
165165

166166

@@ -238,7 +238,7 @@ AC_CHECK_HEADER(gdc.h,AC_DEFINE(HAVE_LIBGDC,1,[has gdc.h]))
238238
# Check for libwandio (no longer bundled with libtrace)
239239
AC_CHECK_LIB(wandio,wandio_wflush,wandiofound=1,wandiofound=0)
240240
if test "$wandiofound" = 0; then
241-
AC_MSG_ERROR(libwandio 4.0.0 or better is required to compile this version of libtrace. If you have installed libwandio in a non-standard location please use LDFLAGS to specify the location of the library. WANDIO can be obtained from http://research.wand.net.nz/software/libwandio.php)
241+
AC_MSG_ERROR(libwandio 4.0.0 or better is required to compile this version of libtrace. If you have installed libwandio in a non-standard location please use LDFLAGS to specify the location of the library. WANDIO can be obtained from https://github.com/LibtraceTeam/wandio)
242242
else
243243
LIBTRACE_LIBS="$LIBTRACE_LIBS -lwandio"
244244
TOOLS_LIBS="$TOOLS_LIBS -lwandio"
@@ -307,32 +307,58 @@ AC_ARG_WITH(xdp, AS_HELP_STRING(--with-xdp, include XDP capture support),
307307

308308
if test "$want_xdp" != no; then
309309
AC_CHECK_LIB(elf, elf_begin, elffound=1, elffound=0)
310+
310311
if test "$elffound" = 1; then
311-
# check for libbpf
312-
AC_CHECK_LIB(bpf, xsk_socket__create, bpffound=1, bpffound=0, -lelf)
313-
314-
if test "$bpffound" = 1; then
315-
AC_DEFINE(HAVE_LIBBPF, 1, [Set to 1 if libbpf is available])
316-
ADD_LDFLAGS="$ADD_LDFLAGS -lbpf -lelf"
317-
libtrace_xdp=true
318-
319-
# check for requirements to build XDP eBPF kernel
320-
AC_CHECK_PROG(CLANG, [clang], [clang], [no])
321-
if test "$CLANG" != "no"; then
322-
323-
AC_SUBST(CLANG)
324-
llc_candidates=$($CLANG --version | \
325-
awk '/^clang version/ {
326-
split($3, v, ".");
327-
printf("llc-%s.%s llc-%s llc", v[[1]], v[[2]], v[[1]])
328-
}')
329-
AC_CHECK_PROGS([LLC], [$llc_candidates], [no])
330-
if test "$LLC" != "no"; then
331-
AC_SUBST(LLC)
332-
build_ebpf=true
312+
AC_CHECK_LIB(xdp, xsk_socket__create, xdpfound=1, xdpfound=0, -lelf)
313+
314+
if test "$xdpfound" = 1; then
315+
# check for libbpf
316+
AC_CHECK_LIB(bpf, bpf_map_update_elem, bpffound=1, bpffound=0,
317+
-lelf -lxdp)
318+
319+
if test "$bpffound" = 1; then
320+
AC_DEFINE(HAVE_LIBBPF, 1, [Set to 1 if libbpf is available])
321+
ADD_LDFLAGS="$ADD_LDFLAGS -lbpf -lelf -lxdp"
322+
libtrace_xdp=true
323+
324+
AC_CHECK_LIB(bpf, bpf_xdp_query_id, bpfnewer=1, bpfnewer=0,
325+
-lelf -lxdp)
326+
if test "$bpffound" = 1; then
327+
AC_DEFINE(HAVE_LIBBPF_XDP_QUERYID, 1, [Set to 1 if libbpf supports bpf_xdp_query_id])
333328
fi
334329

335-
fi
330+
# check for requirements to build XDP eBPF kernel
331+
AC_CHECK_PROG(CLANG, [clang], [clang], [no])
332+
if test "$CLANG" != "no"; then
333+
334+
AC_SUBST(CLANG)
335+
llc_candidates=$($CLANG --version | \
336+
awk '/^clang version/ {
337+
split($3, v, ".");
338+
printf("llc-%s.%s llc-%s llc", v[[1]], v[[2]], v[[1]])
339+
}')
340+
AC_CHECK_PROGS([LLC], [$llc_candidates], [no])
341+
if test "$LLC" != "no"; then
342+
AC_SUBST(LLC)
343+
build_ebpf=true
344+
else
345+
llc_candidates=$($CLANG --version | \
346+
awk '/ clang version/ {
347+
split($4, v, ".");
348+
printf("llc-%s.%s llc-%s llc", v[[1]], v[[2]], v[[1]])
349+
}')
350+
LLC=""
351+
AC_CHECK_PROGS([LLC], [$llc_candidates], [no])
352+
if test "$LLC" != "no"; then
353+
AC_SUBST(LLC)
354+
build_ebpf=true
355+
fi
356+
fi
357+
358+
fi
359+
else
360+
libtrace_xdp=false
361+
fi
336362
else
337363
libtrace_xdp=false
338364
fi
@@ -341,7 +367,7 @@ fi
341367

342368
# was xdp build explicitly specified and failed
343369
if test "$want_xdp" = yes -a "$libtrace_xdp" = false; then
344-
AC_MSG_ERROR([libelf and libbpf are required for XDP support])
370+
AC_MSG_ERROR([libelf, libxdp and libbpf are required for XDP support])
345371
fi
346372

347373
# was ebpf build explicitly specified and failed
@@ -413,7 +439,7 @@ fi
413439
# Configure options for use of DAG cards
414440
# Originally borrowed from libpcap, but extended quite a bit :)
415441
# More details on how this check works:
416-
# http://wand.net.nz/trac/libtrace/wiki/DAGNotes
442+
# https://github.com/LibtraceTeam/libtrace/wiki
417443

418444
AC_ARG_WITH(dag,
419445
AS_HELP_STRING(--with-dag[=DIR],include DAG live capture support (located in directory DIR, if supplied)),
@@ -539,7 +565,7 @@ if test "$want_numa" != no; then
539565
fi
540566

541567
# Need libwandder for ETSI live decoding
542-
AC_CHECK_LIB(wandder, init_wandder_decoder, have_wandder=1, have_wandder=0)
568+
AC_CHECK_LIB(wandder, wandder_etsili_get_cc_format, have_wandder=1, have_wandder=0)
543569

544570
# Checks for various "optional" libraries
545571
AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0)
@@ -878,8 +904,7 @@ LIBS=
878904
# For now, the user has to explicitly ask for the LLVM stuff, as it's a bit
879905
# rough around the edges :(
880906
AC_ARG_WITH([llvm],
881-
[AC_HELP_STRING([--with-llvm],
882-
[support Just In Time compiler])],
907+
[AS_HELP_STRING([--with-llvm],[support Just In Time compiler])],
883908
use_llvm="yes",
884909
use_llvm="no")
885910
JIT=no
@@ -921,7 +946,7 @@ fi
921946
PKG_CHECK_MODULES(ncurses,ncurses,have_ncurses=yes,have_ncurses=no)
922947

923948
AC_ARG_WITH([ncurses],
924-
AC_HELP_STRING([--with-ncurses], [build tracetop (requires ncurses)]))
949+
AS_HELP_STRING([--with-ncurses],[build tracetop (requires ncurses)]))
925950

926951
AS_IF([test "x$with_ncurses" != "xno"],
927952
[AC_SEARCH_LIBS(mvprintw, ncurses, have_ncurses=yes, have_ncurses=no)
@@ -1075,7 +1100,7 @@ else
10751100
fi
10761101

10771102
reportopt "Compiled with LLVM BPF JIT support" $JIT
1078-
reportopt "Compiled with live ETSI LI support (requires libwandder)" $wandder_avail
1103+
reportopt "Compiled with live ETSI LI support (requires libwandder >= 2.0.6)" $wandder_avail
10791104
reportopt "Building man pages/documentation" $libtrace_doxygen
10801105
reportopt "Building tracetop (requires libncurses)" $with_ncurses
10811106
reportopt "Building traceanon (requires libyaml)" $have_yaml

debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
libtrace4 (4.0.20-1) unstable; urgency=medium
2+
3+
* Updated XDP module to be able to build against recent libxdp
4+
* Updated libpacketdump to be able to decode ETSI LI email CCs and IRIs
5+
6+
-- Shane Alcock <shane@alcock.co.nz> Mon, 07 Nov 2022 11:09:47 +1300
7+
18
libtrace4 (4.0.19-1) unstable; urgency=medium
29

310
* Fixed issues with compiling against DPDK 21.11

0 commit comments

Comments
 (0)