gandi / packet-journey Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED - Packet-journey, userland router which uses DPDK for its fastpath switching.
License: Other
DEPRECATED - Packet-journey, userland router which uses DPDK for its fastpath switching.
License: Other
We need to explain how to use our Qemu lab for testing easily pktj.
Would it be possible to have LACP integrated in? This would be quite significant to have added in.
I am testing packet-journey and after initial satisfaction I found out that forwarding is actually happening in Linux through out KNI interfaces. (Communication with Linux through KNI works flawlessly) I was pretty bummed so I tried to debug it.
In logs only one entry about SIGCHLD handler caught my eye but I was unable to figure what is calling it.
During gdb session I had pretty weird results. I set up breakpoints on functions implementing processing steps, but got hits on them non consistently. Also variables that I inspected weren't looking suspicious. I am puzzled what to do next.
Any suggestions?
Requesting to share the pktgen side of configuration as well so we know how things are configured on the traffic generator side. Thanks.
We have plenty of Intel SSE intrinsics functions in the code.
It would be interesting to make their usage optional with a macro so we would be able to support a memcpy() like version for not Intel platform and to implement other kind of SIMD (ARM Neon for example).
We need to rewrite this function.
What is maximal and minimal DPDK version for packetjourney to compile?
Right now we need to increase the netlink socket buffer size for receiving a BGP full view.
We may try to improve our netlink receiver for buffering netlink messages so we won't be impacted by slower ipv6 routes being inserted in our lpm6.
Packet-Journey as well as dpdk both compile without problems. Packet-Journey initializes correctly but as soon as dpdk0 is brought up i see the following:
KNI: ---- kni_config_network_interface
KNI: Configure network interface of 0 up
PMD: ixgbe_set_rx_function(): Vector rx enabled, please make sure RX burst size no less than 4 (port=0).
PMD: ixgbe_alloc_rx_queue_mbufs(): RX mbuf alloc failed queue_id=0
PMD: ixgbe_dev_rx_queue_start(): Could not alloc mbuf for queue:0
PMD: ixgbe_dev_start(): Unable to start rxtx queues
PMD: ixgbe_dev_start(): failure in ixgbe_dev_start(): -1
KNI: Failed to start port 0
KNI: finished kni_config_network_interface
Same issue with pretty much ANY kernel version, i've tried several starting with 3.10. on CentOS7. Digging around, i found this: most importantly:
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed:
Invalid argumentThis error occurs as a result of the rte mempool ops table having 0 entries. This table is populated from a call to rte_mempool_register_ops().
This function gets called in rte_mempool_ring.c via the static initialization MACRO MEMPOOL_REGISTER_OPS and exists in librte_mempool_ring.so. However this library is not loaded when the rte_eal_init() gets called so the static initializers are not yet loaded.
This change was done recently to move ring handler into its separate drivers/mempool/ring directory. That also means it no longer is compiled into the librte_mempool.
Any advise on how to get packet-journey to work with a recent dpdk version?
Thanks!
There is no any internal locking in DPDK library inside the rte_eth_tx_burst() call. Two or more threads going to send packets using the same queue of the given port can lead to race condition.
There are (at least) two posible solutions:
Hello,
Is there any reason to dedicate one core for rdtsc read operation?
We need to rewrite it or use something else.
It is really too slow when you have 50k+ routes.
I will post more perf details when I will have the lab back.
I am trying to bind two ports into pktj, but I am failing miserably with portmask.
I call pktj with following parameters:
./build/app/build/pktj -l 0,1,2,3 -n 4 -- --portmask 3 --config '(0,0,1),(1,1,2)' --kniconfig '(0,0,1)' --rule_ipv4 /dev/null --rule_ipv6 /dev/null
Only to receive following bizzare output:
EAL: Detected 4 lcore(s) EAL: Multi-process socket /var/run/.rte_unix EAL: Probing VFIO support... EAL: PCI device 0000:04:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:10fb net_ixgbe EAL: Error - exiting with code: 1 Cause: portmask is not consistent to port ids specified in --config
Is it bug or only my misconfiguration?
CC cmdline_helpers.o
/root/packet-journey/app/cmdline_helpers.c: In function ‘nic_stats_display’:
/root/packet-journey/app/cmdline_helpers.c:327:7: error: ‘ibadcrc’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:203) [-Werror=deprecated-declarations]
stats.ibadcrc, stats.ibadlen, stats.rx_nombuf,
^
/root/packet-journey/app/cmdline_helpers.c:327:7: error: ‘ibadlen’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:205) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:328:7: error: ‘rx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:218) [-Werror=deprecated-declarations]
stats.rx_pause_xon, stats.rx_pause_xoff, stats.opackets,
^
/root/packet-journey/app/cmdline_helpers.c:328:7: error: ‘rx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:222) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:329:7: error: ‘tx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:216) [-Werror=deprecated-declarations]
stats.oerrors, stats.obytes, stats.tx_pause_xon,
^
/root/packet-journey/app/cmdline_helpers.c:330:7: error: ‘tx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:220) [-Werror=deprecated-declarations]
stats.tx_pause_xoff);
^
/root/packet-journey/app/cmdline_helpers.c:363:11: error: ‘ibadcrc’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:203) [-Werror=deprecated-declarations]
stats.ibadcrc, stats.ibadlen, stats.ierrors);
^
/root/packet-journey/app/cmdline_helpers.c:363:11: error: ‘ibadlen’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:205) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:391:3: error: ‘tx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:216) [-Werror=deprecated-declarations]
if ((stats.tx_pause_xon | stats.rx_pause_xon |
^
/root/packet-journey/app/cmdline_helpers.c:391:3: error: ‘rx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:218) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:392:8: error: ‘tx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:220) [-Werror=deprecated-declarations]
stats.tx_pause_xoff | stats.rx_pause_xoff) > 0) {
^
/root/packet-journey/app/cmdline_helpers.c:392:8: error: ‘rx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:222) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:395:12: error: ‘rx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:222) [-Werror=deprecated-declarations]
stats.rx_pause_xoff, stats.rx_pause_xon);
^
/root/packet-journey/app/cmdline_helpers.c:395:12: error: ‘rx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:218) [-Werror=deprecated-declarations]
/root/packet-journey/app/cmdline_helpers.c:398:12: error: ‘tx_pause_xoff’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:220) [-Werror=deprecated-declarations]
stats.tx_pause_xoff, stats.tx_pause_xon);
^
/root/packet-journey/app/cmdline_helpers.c:398:12: error: ‘tx_pause_xon’ is deprecated (declared at /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:216) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
make[2]: *** [cmdline_helpers.o] Error 1
make[1]: *** [all] Error 2
make: *** [app] Error 2
Right now we are only accepting unicast routes https://github.com/Gandi/packet-journey/blob/master/lib/libnetlink/netlink.c#L249 but we should also, at least, accept blackhole (RTN_BLACKHOLE) routes.
We need to make more configurable the decision of which packet will be send to the kni and how much it will be rate limited.
Using https://github.com/rlane/ubpf may be an option so it would be changeable at run time without perf impact
Hello,
I have following error messages during compilation of packet-journey:
CC main.o
/usr/src/packet-journey/app/main.c: In function 'kni_rate_limit_step':
/usr/src/packet-journey/app/main.c:544:3: error: implicit declaration of function '_mm_testz_si128' [-Werror=implicit-function-declaration]
if (_mm_testz_si128(data, data)) {
^
/usr/src/packet-journey/app/main.c:544:3: error: nested extern declaration of '_mm_testz_si128' [-Werror=nested-externs]
/usr/src/packet-journey/app/main.c: In function 'process_step3':
/usr/src/packet-journey/app/main.c:874:2: error: implicit declaration of function '_mm_blend_epi16' [-Werror=implicit-function-declaration]
te = _mm_blend_epi16(te, ve, MASK_ETH);
^
/usr/src/packet-journey/app/main.c:874:2: error: nested extern declaration of '_mm_blend_epi16' [-Werror=nested-externs]
/usr/src/packet-journey/app/main.c:874:5: error: incompatible types when assigning to type '__m128i' from type 'int'
te = _mm_blend_epi16(te, ve, MASK_ETH);
^
/usr/src/packet-journey/app/main.c: In function 'processx4_step3':
/usr/src/packet-journey/app/main.c:942:8: error: incompatible types when assigning to type '__m128i' from type 'int'
te[0] = _mm_blend_epi16(te[0], ve[0], MASK_ETH);
^
/usr/src/packet-journey/app/main.c:943:8: error: incompatible types when assigning to type '__m128i' from type 'int'
te[1] = _mm_blend_epi16(te[1], ve[1], MASK_ETH);
^
/usr/src/packet-journey/app/main.c:944:8: error: incompatible types when assigning to type '__m128i' from type 'int'
te[2] = _mm_blend_epi16(te[2], ve[2], MASK_ETH);
^
/usr/src/packet-journey/app/main.c:945:8: error: incompatible types when assigning to type '__m128i' from type 'int'
te[3] = _mm_blend_epi16(te[3], ve[3], MASK_ETH);
^
cc1: all warnings being treated as errors
make[2]: *** [main.o] Error 1
make[1]: *** [all] Error 2
make: *** [app] Error 2
Can You help ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.