Skip to contentSkip to conversation

Release of Packet Journey

DISCUSSION Nikita Kozlov 2 participants 2 messages Oct 29, 2015

lore
Share & tools
lore
#0 lore raw

Hello,

We have opensourced our dpdk-based project, Packet Journey
https://github.com/Gandi/packet-journey .

Packet Journey is a combinationof Linux RT_NETLINK and severalparts ofDPDK (rte_kni, rte_lpm, rte_acl, rte_cmdline) and is intended to serveas an edge router.

Our use case is:
- pktj starts several forwarding threads and a KNI thread per external port
- pktj launches a script which configures the KNI interface (MAC, IP, VLAN) and launches a BGP daemon
- the host receives routes from the BGP daemon
- the BGP daemon injects the routes in Linux
- pktj receives the routes from NETLINK and put them in LPM in our "control" threads
- pktj forwards packets to the KNI if the packets are
- for the KNI IP or
- if the neighbor is not known yet
- if ttl reaches 0
- pktj filters packets if they match an ACLor if they exceed the rate limit, kni output is also rate-limited
- pktj forwards packetsdirectly from the RXqueue to the TXqueue if the neighbor is known

Signature · 1 line
Nikita
#1 lore raw

Hi Nikita,

First of all thank you for published your project. Please apply this patch below

app/acl.h +17 -0
index fb2f73a..74a1dd5 100644
@@ -72,4 +72,21 @@ extern struct acl_parm acl_parm_config;
 extern struct rte_acl_ctx *ipv4_acx[NB_SOCKETS];
 extern struct rte_acl_ctx *ipv6_acx[NB_SOCKETS];
 
+/*
+ * That effectively defines order of IPV4VLAN classifications:
+ *  - PROTO
+ *  - VLAN (TAG and DOMAIN)
+ *  - SRC IP ADDRESS
+ *  - DST IP ADDRESS
+ *  - PORTS (SRC and DST)
+ */
+enum {
+        RTE_ACL_IPV4VLAN_PROTO,
+        RTE_ACL_IPV4VLAN_VLAN,
+        RTE_ACL_IPV4VLAN_SRC,
+        RTE_ACL_IPV4VLAN_DST,
+        RTE_ACL_IPV4VLAN_PORTS,
+        RTE_ACL_IPV4VLAN_NUM
+};
+
 #endif

without it your project is not compiled.

Further your app breaks with segment fault. I run it as follows root@war202:~/PKTJ/packet-journey# ./build/app/x86_64-native-linuxapp-gcc/app/pktj -l 0,1,2,3 -n 4 --socket-mem=4096 --log-level=4 -- --configfile /home/medved/PKTJ/packet-journey/tests/integration/lab00/pktj.conf
PKTJ_ACL: IPv6 ACL entries 0:
PKTJ_ACL: IPv4 ACL entries 1:
PKTJ_ACL: 1:PKTJ_ACL: 0.0.0.0/0 PKTJ_ACL: 1.2.6.0/24 PKTJ_ACL: 0 :
65535 0 : 65535 0x0/0x0 PKTJ_ACL: 0xffffffff-0x0-0xf0000000 PKTJ_ACL:
acl context <pktj-acl-ipv40-0>@0x7fd3bf41aa80
socket_id=0
alg=3
max_rules=100000
rule_size=96
num_rules=1
num_categories=1
num_tries=1
ACL: allocation of 9600904 bytes on socket 1 for ACL_pktj-acl-ipv41-0 failed
PKTJ_ACL: Failed to create ACL context
PKTJ_ACL: setup_acl failed for ipv4 with socketid 1, keeping previous rules for that socket
ACL: allocation of 9600904 bytes on socket 2 for ACL_pktj-acl-ipv42-0 failed
PKTJ_ACL: Failed to create ACL context
PKTJ_ACL: setup_acl failed for ipv4 with socketid 2, keeping previous rules for that socket
ACL: allocation of 9600904 bytes on socket 3 for ACL_pktj-acl-ipv43-0 failed
PKTJ_ACL: Failed to create ACL context
PKTJ_ACL: setup_acl failed for ipv4 with socketid 3, keeping previous rules for that socket
Address:90:E2:BA:39:2A:D8
port=0 tx_queueid=3 nb_txd=512 kni
launching control thread for socketid 0 on lcore 0
CMDLINE1: symlink() failed
Segmentation fault

Regards,
Vladimir

2015-10-29 22:53 GMT+03:00 Nikita Kozlov <[email protected]>:

Quoted 29 lines

Hello,

We have opensourced our dpdk-based project, Packet Journey
https://github.com/Gandi/packet-journey .

Packet Journey is a combinationof Linux RT_NETLINK and severalparts ofDPDK (rte_kni, rte_lpm, rte_acl, rte_cmdline) and is intended to serveas an edge router.

Our use case is:
- pktj starts several forwarding threads and a KNI thread per external port
- pktj launches a script which configures the KNI interface (MAC, IP, VLAN) and launches a BGP daemon
- the host receives routes from the BGP daemon
- the BGP daemon injects the routes in Linux
- pktj receives the routes from NETLINK and put them in LPM in our "control" threads
- pktj forwards packets to the KNI if the packets are
- for the KNI IP or
- if the neighbor is not known yet
- if ttl reaches 0
- pktj filters packets if they match an ACLor if they exceed the rate limit, kni output is also rate-limited
- pktj forwards packetsdirectly from the RXqueue to the TXqueue if the neighbor is known

--
Nikita