All Projects → Gandi → Packet Journey

Gandi / Packet Journey

Licence: other
DEPRECATED - Packet-journey, userland router which uses DPDK for its fastpath switching.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Packet Journey

Lagopus
Yet another SDN / OpenFlow software switch
Stars: ✭ 281 (+40.5%)
Mutual labels:  router, dpdk
The router
TheRouter is a software packet router based on DPDK an NPF libraries.
Stars: ✭ 123 (-38.5%)
Mutual labels:  router, dpdk
Npf
NPF: packet filter with stateful inspection, NAT, IP sets, etc.
Stars: ✭ 160 (-20%)
Mutual labels:  router, dpdk
Httprouter
A high performance HTTP request router that scales well
Stars: ✭ 13,500 (+6650%)
Mutual labels:  router
Easyrouter
A component routing framework simple, stable and high-performance, which supports UI, Method Calls, Interceptors, Callbacks and More than these.
Stars: ✭ 172 (-14%)
Mutual labels:  router
Vue Routisan
Elegant, fluent route definitions for Vue Router, inspired by Laravel. v3 is currently in beta. [email protected]
Stars: ✭ 193 (-3.5%)
Mutual labels:  router
Navigo
A simple vanilla JavaScript router.
Stars: ✭ 2,435 (+1117.5%)
Mutual labels:  router
Flow builder
Flutter Flows made easy! A Flutter package which simplifies flows with a flexible, declarative API.
Stars: ✭ 169 (-15.5%)
Mutual labels:  router
Brouter
Stars: ✭ 198 (-1%)
Mutual labels:  router
Arouter
💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)
Stars: ✭ 13,587 (+6693.5%)
Mutual labels:  router
Mithril.js
A JavaScript Framework for Building Brilliant Applications
Stars: ✭ 13,062 (+6431%)
Mutual labels:  router
Routerify
A lightweight, idiomatic, composable and modular router implementation with middleware support for the Rust HTTP library hyper.rs
Stars: ✭ 173 (-13.5%)
Mutual labels:  router
Component
🔥🔥🔥A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持 Kotlin并且灵活的组件化框架
Stars: ✭ 2,434 (+1117%)
Mutual labels:  router
React Router Native Stack
A stack navigation component for react-router-native
Stars: ✭ 171 (-14.5%)
Mutual labels:  router
Route
Simple isomorphic router
Stars: ✭ 199 (-0.5%)
Mutual labels:  router
Uwebsockets
Simple, secure & standards compliant web server for the most demanding of applications
Stars: ✭ 13,412 (+6606%)
Mutual labels:  router
Bilihp App
BiliBili助手-哔哩哔哩助手苹果/安卓/IOS/PC/C2C/Mac/路由器/单用户/多用户/手机版全平台支持挂机软件库(2020-BiliHP)
Stars: ✭ 196 (-2%)
Mutual labels:  router
Andromeda
Andromeda simplifies local/remote communication for Android modularization
Stars: ✭ 2,203 (+1001.5%)
Mutual labels:  router
Localize Router
An implementation of routes localisation for Angular
Stars: ✭ 177 (-11.5%)
Mutual labels:  router
Router Store
Bindings to connect the Angular Router to @ngrx/store
Stars: ✭ 187 (-6.5%)
Mutual labels:  router

Packet-journey, linux router based on DPDK

The purpose of this project is to provide a free application capable of:

  • Switching many packets using the LPM algorithm
  • Making this switching scalable with the possibility of adding more packet queues/CPUs
  • Learning routes from the Linux kernel using Netlink
  • Learning neighbors from Netlink, the kernel is refreshing them automatically
  • Being able to forward some packets to the kernel which will handle them (ARP, ICMP, BGP)
  • Rate limiting ICMP packets that are sent to the kernel
  • Supporting L3/L4 ACLs
  • Gathering statistics and managing ACLs through a cli based on a unixsock
  • Being configurable through a configfile

Most of these features are based on various DPDK libs.

Internals

Threads

Packet-journey (pktj) is composed of multiple kind of threads:

  • pktj, the main thread which is doing all the initialization and are handling signals.
  • forward-LCOREID, those threads are doing the forwarding part. They are reading packets from the PMD, doing the processing of those packets and sending them back to the PMD.
  • kni-LCOREID, those threads are reading packets from the KNI and sending them to the configured port.
  • lcore-slave-LCOREID, those threads are doing nothing, they are just waiting.
  • control-SOCKETID, those threads are in charge of receiving NETLINK messages from the IFADDR, ROUTE, NEIGH and LINK groups and handling them.
  • cmdline-SOCKETID, those threads are presenting a CLI through the unixsocks.
  • rdtsc-SOCKETID, those threads are reading the TSC value and exposing it to the lcore-slave threads.

For optimal performances, the forwarding threads must be alone on their cores. All other threads can be scheduled on the same lcore.

Processing steps

The forwarding threads are running the main_loop() function. It basically follows these steps:

  1. Read up to 32 packet descriptors
  2. If none, read again
  3. Prepare the ACL processing for the new packets and filter them
  4. Find the correct neighbor for the remaining packets by looking into the IPv4 or IPv6 LPM
  5. If a packet has no possible next_hop in the LPM or if a packet has the router IP, send it to the KNI and remove it from the rest of the processing loop
  6. For each of the remaining packets, set the correct destination MAC address according to the selected next_hop
  7. Reorder packets by destination port
  8. Send the packets in batch grouped by destination port

Configuration examples

pktj -l 0,1,2,3 -n 4 --socket-mem=4096 --log-level=4 -- \
--configfile /root/devel/router-dpdk/tests/integration/lab00/pktj.conf

with pktj.conf containing:

; pktj
[pktj]
callback-setup  = /root/devel/router-dpdk/tests/integration/lab00/up.sh
rule_ipv4       = /root/devel/router-dpdk/tests/integration/lab00/acl.txt
rule_ipv6       = /root/devel/router-dpdk/tests/integration/lab00/acl6.txt
promiscuous     = 1
kni_rate_limit  = 1000
aclavx2         = 1

; Port configuration
[port 0]
eal queues      = 0,1 1,2 ; queue,lcore
kni             = 3,0 ; lcore_tx,kthread

These settings will launch the following:

  • pktj with 2 forwarding threads, on core 1 and 2,
  • a KNI tx thread on core 3, and
  • the script up.sh after setting up the KNI.

The script up.sh configures the KNI IPv4, IPv6 and MAC addresses. It also starts some processes (bgpd and zebra in our case).

#!/bin/sh

link1=$1
mac1=$2

ip link set $link1 up
ip link add link $link1 name $link1.2000 type vlan id 2000
ip link set $link1.2000 address $mac1
ip link set $link1.2000 up

ip addr add 1.2.3.5/24 dev $link1.2000
ip route add 1.2.4.0/24 via 1.2.3.4
ip addr add 2001:3::5/48 dev $link1.2000
ip route add 2001:4::/48 via 2001:3::4

# delay start because of quagga racy start
sleep 15s

/usr/lib/quagga/zebra &
/usr/lib/quagga/bgpd &

You can try this out using our QEMU test lab.

Performances

The test scenario is done between 2 physical machines having both a XL710 NIC and a E5-2630L CPU. The first host is running Packet-Journey; it receives traffic from the second host and sends it back.

For simulating real life conditions, the tests are done with 500k routes (something similar to a BGP full view) and 50 ACL (we use scalar implementation for ACL since the CPU don't have AVX2 instructions). We have also a percentage of the packets which are forwarded to the KNI instead of going through the fastpath.

The packets are generated using DPDK-PktGen which is configured for sending 64 Bytes UDP packets with a random source and destination IP. When Configured with 4 RX queues, Packet-Journey is able to forward 21773.47 mbits.

The graphs of the test scenario are in the doc. The easiest graphs to read are the ones from pktgen since it shows you the TX RX rates: PktGen report.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].