ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
ANS(accelerated network stack) is DPDK native TCP/IP stack and also refer to FreeBSD implementation. ANS provides a userspace TCP/IP stack for use with the Intel DPDK.
ans: accelerated network stack process.
librte_ans: TCP/IP stack static library. ANS use dpdk mbuf, ring, memzone, mempool, timer, spinlock. so zero copy mbuf between dpdk and ANS.
librte_anssock: ANS socket lib for application, zero copy between ANS and application.
librte_anscli: ANS cli lib for route/ip/neigh/link configuration.
cli: Command for configure ANS tcp/ip stack.
example: ANS application example.
test: Example application with ANS for testing ANS tcp/ip stack
Support environment
Support feature:
# git clone https://github.com/ansyun/dpdk-ans.git
# export RTE_ANS=/home/mytest/dpdk-ans
# ./install_deps.sh
# cd ans
# make… |------------------------------|
| TCP Server CPS |
|------------------------------|
| ANS with epoll |
| (one core) |
|------------------------------|
| 100k connection/s |
|------------------------------| L3 forwarding with NIC performance testing
ENV: CPU- Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz, NIC- Intel 82599ES 10-Gigabit, Test tool:pktgen-DPDK
|--------------------------------------|
| L3 forwarding performance |
| (one lcore) |
|--------------------------------------|
| Packet size(byte)| Throughput(Mpps) |
|--------------------------------------|
| 64 | 11.78 |
|--------------------------------------|
| 128 | Line Rate |
|--------------------------------------|
L3 forwarding with vhost/virtio performance testing
ENV: Intel(R) Xeon(R) CPU E5-2618L v4 @ 2.20GHz, NIC- vhost/virtio, Test tool:pktgen-DPDK
|--------------------------------------|
| L3 forwarding performance |
| (one lcore) |
|--------------------------------------|
| Packet size(byte)| Throughput(Mpps) |
|--------------------------------------|
| 64 | 6.33 |
|--------------------------------------|
| 128 | 5.94 |
|--------------------------------------|
| 256 | Line Rate |
|--------------------------------------| ………You can get more information and instructions from wiki page.
EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the kernel.
EAL: This may cause issues with mapping memory into secondary processes
$ sudo sysctl -w kernel.randomize_va_space=0You shall modify the NIC configuration in ans_main.c based on your NIC type.
ANS didn't support loopback interface, so socket client and server can't be in the same ANS tcp/ip stack.
In order to improve ANS performance, you shall isolate ANS'lcore from kernel by isolcpus and isolcate interrupt from ANS's lcore by update /proc/irq/default_smp_affinity file.
ANS run as dpdk primary process, when startup ANS, shall stop other secondary processes(nginx/redis/http_server).
Don't run ANS on lcore0, it will effect ANS performance.
You shall include dpdk libs as below way because mempool lib has attribute((constructor, used)) in latest version, otherwise your application would coredump.
-$(RTE_ANS)/librte_anssock/librte_anssock.a \
-L$(RTE_SDK)/$(RTE_TARGET)/lib \
-Wl,--whole-archive -Wl,-lrte_mbuf -Wl,-lrte_mempool_ring -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal -Wl,--no-whole-archive -Wl,-export-dynamic -lnuma \
BSD LICENSE, you may use ANS freely.
For free support, please use ANS team mail list at [email protected], or QQ Group:86883521 (FULL), 519855957(Full), 719128726, or https://dpdk-ans.slack.com, or skype(bluenet13).
No open issues yet, or sync has not completed.