Code Monkey home page Code Monkey logo

sanyo0714 / dpdk-openresty Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ansyun/dpdk-openresty

0.0 2.0 0.0 4.71 MB

Fork from official openresty-1.13.6.2, and run on the dpdk user space TCP/IP stack(ANS"accelerated network stack").

Home Page: https://ansyun.github.io/

License: Other

Makefile 0.36% CSS 0.06% HTML 1.89% C 84.34% Lua 7.05% Roff 0.06% C++ 0.53% Batchfile 0.13% Shell 0.32% Perl 3.84% CMake 0.02% Perl 6 0.02% Ragel 0.20% Vim Script 0.91% XSLT 0.04% DTrace 0.03% XS 0.16% PLpgSQL 0.03% Erlang 0.01%

dpdk-openresty's Introduction

dpdk-openresty


dpdk-openresty fork from official openresty-1.13.6.2, and run on the dpdk user space TCP/IP stack(ANS). For detail function, please refer to openresty official website(http://http://openresty.org/).

Build and install


$ make config T=x86_64-native-linuxapp-gcc
$ make install T=x86_64-native-linuxapp-gcc
$ export RTE_SDK=/home/mytest/dpdk
$ export RTE_TARGET=x86_64-native-linuxapp-gcc
  • Build dpdk and ANS following the ANS wiki
$ git clone https://github.com/ansyun/dpdk-ans.git
$ export RTE_ANS=/home/mytest/dpdk-ans
$ ./install_deps.sh
$ cd ans
$ make
$ sudo ./build/ans -c 0x2 -n 1  -- -p 0x1 --config="(0,0,1)"
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 2 lcore(s)
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0x400000 bytes
EAL: Virtual area found at 0x7fdf90c00000 (size = 0x400000)
EAL: Ask a virtual area of 0x15400000 bytes
  • Download dpdk-openresty, build dpdk-openresty
$ git clone https://github.com/ansyun/dpdk-openresty.git
$ ./configure  --with-http_dav_module
$ make
$ make install   # default install dir is /usr/local/openresty

Testing


  • Setup DPDK Environment

Refer to Getting Started Guide for Linux

  • Startup ANS TCP/IP stack
$ sudo ./build/ans -c 0x2 -n 1  -- -p 0x1 --config="(0,0,1)"
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 2 lcore(s)
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
...

Notes

  • Shall use the same gcc version to compile your application.
  • ANS tcp stack support reuseport, so can enable openresty reuseport feature, multi openresty can listen on same port.
  • proxy_pass is supported.
  • 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.
  • You shall include dpdk libs as below way because mempool lib has attribute((constructor, used)) in dpdk-16.07 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 -Wl,-lrte_ring -Wl,-lrte_eal -Wl,--no-whole-archive -Wl,-export-dynamic -lnuma \

Support


For free support, please use ANS team mail list at [email protected], or QQ Group:86883521, or https://dpdk-ans.slack.com.

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.