diff options
| author | root <root@atca1.(none)> | 2015-05-11 13:09:58 +0800 |
|---|---|---|
| committer | root <root@atca1.(none)> | 2015-05-11 13:09:58 +0800 |
| commit | adfca6b1badce7a735d1eee5b20e5aa66e96efa1 (patch) | |
| tree | accb450d35f78f39255474c7c9df9e2d144f9cb4 | |
| parent | 1cf04e1dd91d196a0fed20d903297fa92331fe69 (diff) | |
更新说明文档20150511
| -rw-r--r-- | README | 115 |
1 files changed, 53 insertions, 62 deletions
@@ -1,75 +1,66 @@ -Serial-Multiprocess README VERSION 0.2.0
+DPDK Network Packet I/O Middleware for START/PAPP/SAPP README
===============================================================
-Changlog
- 2014-03-18 Done.
- 2014-05-09 Version 0.1.0
- + Read the configure file instead of reading
- the paras from command line.
- + Reorganize the source structure for the MESA
- standard.
- + New Makefile to replace the buildso.sh
- + Other improvement.
- 2014-05-13 Version 0.1.1
- + Add the test application source and header file
- to path ./test
- 2014-05-13 Version 0.1.2
- + Fix some bugs in Makefile, and we don't need to
- link a lot of libs while complete with our .so
- file.
- 2014-07-03 Version 0.2.0
- + Add the module APT,which to adapt the run envoriment by itself,
- now can support the EAL paras.
- 2014-12-11 Version 1.1.0
- + Support Multiprocess Mode and Complete Load-Balance Model.
+** Multiprocess Version **
Author
- Lu Qiuwen <[email protected]>
-
-Interface and Paras.
-=====================
-
-We provide two kinds of interface. One of them provide the stream id for users,and the other provide the
-port number in physical.
-
-**Note** What is a stream id?
- As you know, the pkts from Port A to Port B which in physical can consist of a stream, we call it
- a stream, and it have an stream id, which maybe 0.
-
-At <nl2fwd.h>
- <1> int dpdk_send_packet_dst(unsigned char *data, int datalen, int dst);
- Send packets made by yourself to the tx port in stream <dst>
- <2> int dpdk_send_packet_port(const unsigned char *data, int datalen, int port);\
- Send packets made by yourself to port <port>
- <3> int dpdk_init(int argc, char **argv);
- Init the Intel DPDK envoriment.
- <4> int dpdk_run();
- Start and run the worker and I/O thread created by Intel DPDK.
- <5> int dpdk_register_callfunc(int (*func)(const unsigned char *data,int datalen,int port_in,int lcore));
- Register the function handle which provided by user, and the function will be called by packet process
- function in worker thread.
- * You can recieve the physical port number.
- <6> int dpdk_register_callfunc_dst(int (*func)(const unsigned char *data,int datalen,int dst,int lcore));
- Register the function handle which provided by user, and the function will be called by packet process
- function in worker thread.
- * You can recieve the stream(destration) number.
-
- Note: You cannot use dpdk_register_callfunc() and dpdk_register_callfunc_dst together.
-
+ Lu Qiuwen <[email protected]>
+ +86 152-1087-3834
Complete and Install
==============================
- # make
- # make install
-
- It is so easy.
+<STEP 0>
+ you should install these library and their header files.
+ (1) libpcap
+ (2) libnet
+<STEP 1>
+ To Complete the library, you should define the enviourment varaibles as follows:
+ # export RTE_SDK=<your dpdk path>
+ # export RTE_TARGET=<your dpdk compile archtiture>
-Rebuild DPDK
-==============================
- If need to rebuild DPDK libs, type:
+ examples:
+ # export RTE_SDK=/root/DPDK
+ # export RTE_TARGET=x86_64-default-linuxapp-gcc (use in DPDK 1.5.2 and DPDK 1.6.0)
+ or
+ # export RTE_TARGET=x86_64-native-linuxapp-gcc (use in DPDK 1.7 and later)
+
+ and then:
# make dpdk
- It will use -fPIC and -g symbol to rebuild DPDK libs.
+ Compile the DPDK, you may run this if you didn't compile dpdk in fPIC.
+<STEP 2>
+ # make
+ Compile the middleware
+ # make install
+ Install the middleware in /usr/lib, it will copy the target and create soft symbol link.
+<STEP 3>
+ # make clean
+ clean the objective files.
+ # make distclean
+ clean the target.
Link to your Application
==============================
$gcc -o test test.c -lnl2fwd
+
+Run the driver and application
+==============================
+<STEP 1>
+ Edit the configuration file nl2fwd.conf and copy it to /etc/nl2fwd.conf
+<STEP 2>
+ Run the driver program located in test/driver to start packet input and output.
+<STEP 3>
+ Run you program which has linked with libnl2fwd.so
+
+Tools
+==============================
+ There are some tools which may be useful for the users in test/ and tools/.
+
+ dlogreader ---- Read the driver stats information,such as RX/TX PPS,BPS,Total drops.
+ ethreader ---- Read the NICs stats.
+ r2_driver ---- Script Program, run the driver in background.
+ drv_monitor ---- Script Program, bind your application with driver. When your program
+ is crashed, the driver process will be killed.
+ dpdk_mlx4 ---- Script Program, Configure the DPDK automatically, only use with MLX4
+ NICs.
+ mlx4.conf ---- Configuration File, used by dpdk_mlx4.
+
|
