diff options
author | Jonathan Ribas <jonathan.ribas@fraudbuster.mobi> | 2018-11-05 17:36:10 +0100 |
---|---|---|
committer | Jonathan Ribas <jonathan.ribas@fraudbuster.mobi> | 2018-11-05 17:36:10 +0100 |
commit | 2f0a3498069b15e44ba7a64c9f155ff94b5b0726 (patch) | |
tree | 0ff6193b1ea810e0596602134e8817cd00702bcf | |
parent | 9c3b26a2fd9a18dd32050cf1ea5174b7ce80f6e3 (diff) | |
download | dpdk-burst-replay-2f0a3498069b15e44ba7a64c9f155ff94b5b0726.zip dpdk-burst-replay-2f0a3498069b15e44ba7a64c9f155ff94b5b0726.tar.gz dpdk-burst-replay-2f0a3498069b15e44ba7a64c9f155ff94b5b0726.tar.xz |
Add a static DPDK Makefile, to use RTE_SDK/RTE_TARGET vars to compile exactly what you want (to be improved for installation part..).
-rw-r--r-- | DPDK_Makefile | 50 | ||||
-rw-r--r-- | README.md | 8 |
2 files changed, 54 insertions, 4 deletions
diff --git a/DPDK_Makefile b/DPDK_Makefile new file mode 100644 index 0000000..8cd9709 --- /dev/null +++ b/DPDK_Makefile @@ -0,0 +1,50 @@ +# Copyright 2018 Jonathan Ribas, FraudBuster. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation and/or +# other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors +# may be used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ifeq ($(RTE_SDK),) +$(error "Please define RTE_SDK environment variable") +endif + +# Default target, can be overriden by command line or environment +RTE_TARGET ?= x86_64-native-linuxapp-gcc + +include $(RTE_SDK)/mk/rte.vars.mk + +# binary name +APP = dpdk-replay + +CFLAGS += -O3 -I$(RTE_SRCDIR) + +SRCS-y := src/main.c \ + src/cpus.c \ + src/dpdk.c \ + src/pcap.c \ + src/utils.c + +LDFLAGS += -lpcap -lm -lnuma + +include $(RTE_SDK)/mk/rte.extapp.mk @@ -17,13 +17,13 @@ To do so, the pcap files will be cached on hugepages before being sent through D NB: libpcap is not required, as dpdk-replay process pcap files manually. -### Compiling it +### Compiling and installing it -> autoreconf -i && ./configure [--enable-debug] && make +> autoreconf -i && ./configure [--enable-debug] && make && sudo make install -### Installing it +OR: -> sudo make install +> RTE_SDK=<RTE_SDK_PATH> make -f DPDK_Makefile && sudo cp build/dpdk-replay /usr/bin ### Launching it |