GithubHelp home page GithubHelp logo

marty90 / dpdk-replay Goto Github PK

View Code? Open in Web Editor NEW
67.0 67.0 34.0 41 KB

This tool can replay a pcap capture at wire speed on several 10Gbps links.

License: GNU General Public License v2.0

C 98.89% Makefile 1.11%

dpdk-replay's People

Contributors

marty90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dpdk-replay's Issues

install dpdk-replay w/ error.

hi,

i'm trying to install dpdk-replay in ubuntu 14.0.4 (3.16.0-49-generic), i following steps, but got error when enter "make" command.

can you please kindly tell?
log below.

BR,

Mark

mark@Dell-T110:~/DPDK-Replay$ more complie.sh

!/bin/sh

export RTE_SDK=${HOME}/handson/dpdk-2.0.0
export RTE_TARGET=x86_64-native-linuxapp-gcc
make

mark@Dell-T110:/DPDK-Replay$ vim complie.sh
mark@Dell-T110:
/DPDK-Replay$ ./complie.sh
CC src/main_replay_copy_2_cores.o
In file included from /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:17:0:
/home/mark/DPDK-Replay/src/main.h:113:15: error: ‘ETH_RSS_IPV4_TCP’ undeclared here (not in a function)
.rss_hf = (ETH_RSS_IPV4_TCP | ETH_RSS_UDP) , /* Set the mask of protocols RSS will be applied to _/
^
In file included from /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:17:0:
/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c: In function ‘main’:
/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:93:225: error: ‘E_RTE_NO_TAILQ’ undeclared (first use in this function)
if (pktmbuf_pool == NULL) FATAL_ERROR("Cannot create cluster_mem_pool. Errno: %d [ENOMEM: %d, ENOSPC: %d, E_RTE_NO_TAILQ: %d, E_RTE_NO_CONFIG: %d, E_RTE_SECONDARY: %d, EINVAL: %d, EEXIST: %d]\n", rte_errno, ENOMEM, ENOSPC, E_RTE_NO_TAILQ, E_RTE_NO_CONFIG, E_RTE_SECONDARY, EINVAL, EEXIST );
^
/home/mark/DPDK-Replay/src/main.h:64:76: note: in definition of macro ‘FATAL_ERROR’
#define FATAL_ERROR(fmt, args...) rte_exit(EXIT_FAILURE, fmt "\n", ##args)
^
/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:93:225: note: each undeclared identifier is reported only once for each function it appears in
if (pktmbuf_pool == NULL) FATAL_ERROR("Cannot create cluster_mem_pool. Errno: %d [ENOMEM: %d, ENOSPC: %d, E_RTE_NO_TAILQ: %d, E_RTE_NO_CONFIG: %d, E_RTE_SECONDARY: %d, EINVAL: %d, EEXIST: %d]\n", rte_errno, ENOMEM, ENOSPC, E_RTE_NO_TAILQ, E_RTE_NO_CONFIG, E_RTE_SECONDARY, EINVAL, EEXIST );
^
/home/mark/DPDK-Replay/src/main.h:64:76: note: in definition of macro ‘FATAL_ERROR’
#define FATAL_ERROR(fmt, args...) rte_exit(EXIT_FAILURE, fmt "\n", ##args)
^
/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c: In function ‘print_stats’:
/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:315:2: warning: too many arguments for format [-Wformat-extra-args]
printf("Packets read speed: %8.3fus\n", (double)avg/nb/rte_get_timer_hz()_1000000, max);
^
make[1]: *** [src/main_replay_copy_2_cores.o] Error 1
make: *** [all] Error 2

Future features

Quit after having sent a certain number of packets or a timeout elapsed

typo in the README

Hi,
I think there's a typo in the README because at some point the " ./build/dpdk-dump" utility is mentioned in place of dpdk-replay...

dpdk-18.07 does not compile with kernel version 4.4.6

I tried to install with current kernel

export RTE_KERNELDIR=/tmp/linux-4.4.6
...
make install V=1 T=$RTE_TARGET

Got compilation errors

gcc -Wp,-MD,/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/.igb_param.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include -I/tmp/linux-4.4.6/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/tmp/linux-4.4.6/include -Iinclude -I/tmp/linux-4.4.6/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/tmp/linux-4.4.6/include/uapi -Iinclude/generated/uapi -include /tmp/linux-4.4.6/include/linux/kconfig.h   -I/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO   -I/tmp/dpdk-1.8.0/lib/librte_eal/linuxapp/kni --param max-inline-insns-single=50   -I/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/include   -I/tmp/dpdk-1.8.0/lib/librte_eal/linuxapp/kni/ethtool/ixgbe   -I/tmp/dpdk-1.8.0/lib/librte_eal/linuxapp/kni/ethtool/igb -include /tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/include/rte_config.h -Wall -Werror  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(igb_param)"  -D"KBUILD_MODNAME=KBUILD_STR(rte_kni)" -c -o /tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/.tmp_igb_param.o /tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_param.c

/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function 'igb_ndo_bridge_getlink':
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2262:9: error: too few arguments to function 'ndo_dflt_bridge_getlink'
  return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
         ^
In file included from /tmp/linux-4.4.6/include/net/gen_stats.h:6:0,
                 from /tmp/linux-4.4.6/include/net/sch_generic.h:11,
                 from /tmp/linux-4.4.6/include/linux/filter.h:16,
                 from /tmp/linux-4.4.6/include/net/sock.h:62,
                 from /tmp/linux-4.4.6/include/linux/tcp.h:22,
                 from /tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:34:
/tmp/linux-4.4.6/include/linux/rtnetlink.h:115:12: note: declared here
 extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
            ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: At top level:
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2307:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_fdb_add  = igb_ndo_fdb_add,
                  ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2307:18: note: (near initialization for 'igb_netdev_ops.ndo_fdb_add')
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2314:24: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_bridge_setlink = igb_ndo_bridge_setlink,
                        ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2314:24: note: (near initialization for 'igb_netdev_ops.ndo_bridge_setlink')
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2315:24: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_bridge_getlink = igb_ndo_bridge_getlink,
                        ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2315:24: note: (near initialization for 'igb_netdev_ops.ndo_bridge_getlink')
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function 'igb_xmit_frame_ring':
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:5475:6: error: implicit declaration of function 'vlan_tx_tag_present' [-Werror=implicit-function-declaration]
  if (vlan_tx_tag_present(skb)) {
      ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:5477:16: error: implicit declaration of function 'vlan_tx_tag_get' [-Werror=implicit-function-declaration]
   tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
                ^
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function 'igb_ndo_bridge_getlink':
/tmp/dpdk-1.8.0/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2263:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors

IMHO the errors are due to an interface change in kernel source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.