-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled Diagram.drawio
25 lines (25 loc) · 40.9 KB
/
Untitled Diagram.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<mxfile host="app.diagrams.net" modified="2021-05-30T13:56:37.509Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 OPR/76.0.4017.154" etag="ApmDDSJYhqkaaDM5AFlX" version="14.7.3" type="github">
<diagram id="tiC5_lr3c7eBxx_vU2C-" name="Page-1">
<mxGraphModel dx="850" dy="712" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="bjBxFB213XxqrcSqxuYE-1" value="<b><font style="font-size: 14px">DPDK环境准备过程</font></b><br>1、准备Linux虚拟机环境,例如Centos 7.2.1511<div style="resize: none ; outline: 0px ; font-size: inherit">2、在DPDK官网下载对应的源码,例如:wget http://fast.dpdk.org/rel/dpdk-19.11.8.tar.xz</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;然后使用tar -xvf dpdk-19.11.8.tar.xz进行解压文件</div><div style="resize: none ; outline: 0px ; font-size: inherit">3、编译环境确认:</div><div style="resize: none ; outline: 0px ; font-size: inherit">3.1 GCC version &gt;= 4.9 可以直接下载源码进行安装</div><div style="resize: none ; outline: 0px ; font-size: inherit">3.2 Python &gt;= 3.5 直接下载源码安装</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; yum update openssl 或者 yum install openssl</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 源码安装的时候需要带上: --with-ssl</div><div style="resize: none ; outline: 0px ; font-size: inherit">3.3 Meson &gt;= 0.49.2 和ninja</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;pip3 install meson</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;pip3 install ninja</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 源码安装 re2c</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 如果提示`GLIBCXX_3.4.20' not found:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 导出环境变量:export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH&nbsp;</div><div style="resize: none ; outline: 0px ; font-size: inherit">3.4 pyelftools &gt;= 0.22</div><div style="resize: none ; outline: 0px ; font-size: inherit">3.5 Library for handling NUMA(Non Uniform Memory Access)</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; numactl-devel</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; libnuma-dev</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; numactl-dev</div><div style="resize: none ; outline: 0px ; font-size: inherit">4、运行DPDK应用的环境要求:</div><div style="resize: none ; outline: 0px ; font-size: inherit">4.1 Kernel ersion &gt;= 4.4&nbsp; (我好想直接忽略了)</div><div style="resize: none ; outline: 0px ; font-size: inherit">4.2 glibc &gt;= 2.7 (这个需要修改)</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 使用命令:ldd --version进行确认版本</div><div style="resize: none ; outline: 0px ; font-size: inherit">4.3 开启HPET和HPET_MMAP</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 使用命令:grep hpet /proc/timer_list 如果有输出则表示已经开启,反之没有。</div><div style="resize: none ; outline: 0px ; font-size: inherit">5、保留大页表给DPDK使用</div><div style="resize: none ; outline: 0px ; font-size: inherit">5.1 单点(单核[1个CPU1个核])系统,<span style="font-size: inherit">其配置命令为</span></div><div style="resize: none ; outline: 0px ; font-size: inherit"><span style="font-size: inherit">&nbsp; &nbsp;echo 1024 &gt; /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages</span></div><div style="resize: none ; outline: 0px ; font-size: inherit">5.2 多点(1个CPU多个核)系统,其配置命令为:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; &nbsp;echo 1024 &gt; /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages</div><div style="resize: none ; outline: 0px ; font-size: inherit"></div>&nbsp; &nbsp;echo 1024 &gt; /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages<div style="resize: none ; outline: 0px ; font-size: inherit">6、在DPDK中使用大页表的方式:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; mkdir /mnt/huge</div><div style="resize: none ; outline: 0px ; font-size: inherit"></div>&nbsp; mount -t hugetlbfs pagesize=1GB /mnt/huge<div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 如果要保证重启后自动挂载,则需要修改文件:/etc/fstab文件加入以下语句:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; nodev /mnt/huge hugetlbfs pagesize=1GB 0 0</div><div style="resize: none ; outline: 0px ; font-size: inherit"><br></div><div style="resize: none ; outline: 0px ; font-size: inherit">7、对DPDK进行源码编译</div><div style="resize: none ; outline: 0px ; font-size: inherit">7.1 对源码进行解压</div><div style="resize: none ; outline: 0px ; font-size: inherit">7.2 进入到源码的目录,执行如下命令:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; meson build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; cd build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; ninja</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; ninja install ### 作用是安装DPDK相关的lib库、相关头文件和相关可用的DPDK命令到系统中</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; ldconfig</div><div style="resize: none ; outline: 0px ; font-size: inherit">7.3 如果执行ninja install的安装目录是/usr/local目录时,需要在/etc/ld.so.conf.d目录下新建一个XXX.conf</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 然后在文件中加入两行:/usr/local/lib 和 /usr/local/lib64</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 最后执行:ldconfig</div><div style="resize: none ; outline: 0px ; font-size: inherit">7.4 编译example目录下的例程:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;meson -Dexamples=l2fwd,l3fwd build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;meson configure&nbsp;-Dexamples=l2fwd,l3fwd build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 编译example目录下所有例程:</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;meson -Dexamples=all build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp;&nbsp;meson configure&nbsp;-Dexamples=all build</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; 然后进入到build目录执行:ninja命令</div><div style="resize: none ; outline: 0px ; font-size: inherit">8、运行example下的程序:</div><div style="resize: none ; outline: 0px ; font-size: inherit">8.1 检测&nbsp;modprobe uio_pci_generic</div><div style="resize: none ; outline: 0px ; font-size: inherit">&nbsp; &nbsp; &nbsp; &nbsp; insmod build/kernel/linux/igb_uio.ko</div>" style="text;html=1;strokeColor=#d6b656;fillColor=#fff2cc;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=Lucida Console;" parent="1" vertex="1">
<mxGeometry x="40" y="40" width="640" height="880" as="geometry" />
</mxCell>
<mxCell id="bjBxFB213XxqrcSqxuYE-2" value="<div><div class="document"><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"><b>understand软件搜索字符串使用方法:</b></span><span style="font-size: 11pt ; font-family: &#34;sf pro&#34; , &#34;pingfang sc&#34; , &#34;microsoft yahei&#34; , , &#34;noto sans cjk sc&#34; , sans-serif , &#34;roboto&#34; , &#34;droid sans&#34; , &#34;helvetica&#34; , &#34;tahoma&#34; , &#34;arial&#34; , &#34;hiragino sans gb&#34; , &#34;heiti sc&#34; ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline">string: test&nbsp; &nbsp; - searches for “test” only in “strings”</span><span style="font-size: 11pt ; font-family: &#34;sf pro&#34; , &#34;pingfang sc&#34; , &#34;microsoft yahei&#34; , , &#34;noto sans cjk sc&#34; , sans-serif , &#34;roboto&#34; , &#34;droid sans&#34; , &#34;helvetica&#34; , &#34;tahoma&#34; , &#34;arial&#34; , &#34;hiragino sans gb&#34; , &#34;heiti sc&#34; ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline">identifier:test - searches for identifiers named test</span><span style="font-size: 11pt ; font-family: &#34;sf pro&#34; , &#34;pingfang sc&#34; , &#34;microsoft yahei&#34; , , &#34;noto sans cjk sc&#34; , sans-serif , &#34;roboto&#34; , &#34;droid sans&#34; , &#34;helvetica&#34; , &#34;tahoma&#34; , &#34;arial&#34; , &#34;hiragino sans gb&#34; , &#34;heiti sc&#34; ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline">comment: test&nbsp; &nbsp;- searches for comments with “test” in them</span><span style="font-size: 11pt ; font-family: &#34;sf pro&#34; , &#34;pingfang sc&#34; , &#34;microsoft yahei&#34; , , &#34;noto sans cjk sc&#34; , sans-serif , &#34;roboto&#34; , &#34;droid sans&#34; , &#34;helvetica&#34; , &#34;tahoma&#34; , &#34;arial&#34; , &#34;hiragino sans gb&#34; , &#34;heiti sc&#34; ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline">test this&nbsp; &nbsp; &nbsp; &nbsp;- matches anything test OR this</span><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></p></div></div>" style="text;html=1;strokeColor=#d6b656;fillColor=#fff2cc;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=Lucida Console;" parent="1" vertex="1">
<mxGeometry x="721" y="40" width="639" height="200" as="geometry" />
</mxCell>
<mxCell id="bjBxFB213XxqrcSqxuYE-3" value="<div class="document"><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font><span style="font-size: 10pt ; font-family: &#34;simsun&#34; , &#34;songti sc&#34; , , sans-serif ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"><b>报错的原因:</b></span><span style="font-size: 11pt ; font-family: &#34;sf pro&#34; , &#34;pingfang sc&#34; , &#34;microsoft yahei&#34; , , &#34;noto sans cjk sc&#34; , sans-serif , &#34;roboto&#34; , &#34;droid sans&#34; , &#34;helvetica&#34; , &#34;tahoma&#34; , &#34;arial&#34; , &#34;hiragino sans gb&#34; , &#34;heiti sc&#34; ; color: rgb(17 , 17 , 17) ; background: transparent ; letter-spacing: 0pt ; vertical-align: baseline"></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>1、运行时直接报如下错误</b></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">EAL: Detected 4 lcore(s)</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">EAL: Detected 1 NUMA nodes</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">EAL: RTE_RING tailq is already registered</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">PANIC in tailqinitfn_rte_ring_tailq():</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">Cannot initialize tailq: RTE_RING</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">1.1 这个貌似是由于家在了pmds插件引发的错误,具体原因还不是很清楚,当前直接做屏蔽处理。</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><div><font><br></font></div><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p></div>" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=Lucida Console;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="721" y="320" width="639" height="240" as="geometry" />
</mxCell>
<mxCell id="QvP58mdF4u6E48YRdZP_-1" value="<div class="document"><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>DPDK运行环境:</b></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>1、巨页表</b></span></font></p><div style="font-size: inherit ; resize: none ; outline: 0px">mkdir /mnt/huge_2M</div><div style="font-size: inherit ; resize: none ; outline: 0px"></div><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px">mount -t hugetlbfs pagesize=2M /mnt/huge_2M</p><div style="font-size: inherit ; resize: none ; outline: 0px">如果要保证重启后自动挂载,则需要修改文件:/etc/fstab文件加入以下语句:</div><div style="font-size: inherit ; resize: none ; outline: 0px">nodev /mnt/huge_2M hugetlbfs pagesize=2M 0 0</div><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px">echo 256 &gt; /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages<font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><div style="font-size: inherit ; resize: none ; outline: 0px">echo 1024 &gt; /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages</div><div style="font-size: inherit ; resize: none ; outline: 0px"></div><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px">echo 1024 &gt; /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages<font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px">注:</p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px">1.1 查看大页表的命令:cat /proc/meminfo | grep Huge</p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>2、UIO驱动的支持</b></span></font></p><div style="font-size: inherit ; resize: none ; outline: 0px">modprobe <font color="#ff0000"><b>uio</b></font></div><div style="font-size: inherit ; resize: none ; outline: 0px">insmod build/kernel/linux/<b><font color="#ff0000">igb_uio.ko</font></b></div><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><br></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>3、绑定网口到DPDK的内核模块</b></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">dpdk-devbind --status&nbsp; #查看网口与内核模块的绑定状态 {</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">[root@localhost ld.so.conf.d]# dpdk-devbind --status</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">Network devices using kernel driver</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">===================================</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=eno16777736 drv=e1000 unused= *Active*</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="font-size: 13.3333px"><font color="#111111">0000:</font><b><font color="#ff0000">02:05.0</font></b><font color="#111111">&nbsp;'82545EM Gigabit Ethernet Controller (Copper) 100f' if=eno33554984 drv=e1000 unused=</font></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">0000:02:06.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=eno50332208 drv=e1000 unused=</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">No 'Crypto' devices detected</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">============================</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">}</span><br></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 21.6px ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px">dpdk-devbind&nbsp;</span></font><span style="font-size: 13.3333px"><font color="#111111">--bind=</font></span><font><font color="#ff0000"><b>igb_uio</b></font><font color="#111111"><span style="font-size: 13.3333px">&nbsp;</span></font></font><span style="font-size: 13.3333px"><b><font color="#ff0000">02:05.0</font></b></span></p></div>" style="text;html=1;strokeColor=#d6b656;fillColor=#fff2cc;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=Lucida Console;" vertex="1" parent="1">
<mxGeometry x="40" y="960" width="640" height="760" as="geometry" />
</mxCell>
<mxCell id="QvP58mdF4u6E48YRdZP_-2" value="<div class="document"><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><b>DPDK L2FWD程序初始化步骤以及作用:</b></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>1、命令行参数的解析:</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>&nbsp; &nbsp;DPDK环境抽象层的参数解析</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>&nbsp; &nbsp;L2FWD程序的参数解析</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>2、Mbuf Pool的初始化</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111"><span style="font-size: 13.3333px"><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font style="font-size: 12px"><font color="#111111">3、驱动初始化(</font><font color="#ff0000">需要阅读</font></font><font color="#ff0000">the Poll Mode and Event mode Driver in the&nbsp;<em style="box-sizing: border-box">DPDK Programmer’s Guide</em>&nbsp;- Rel 1.4 EAR and the&nbsp;<em style="box-sizing: border-box">DPDK API Reference</em>.</font><span style="color: rgb(17 , 17 , 17)">)</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>&nbsp; &nbsp;</span></font><span class="VIiyi" lang="zh-CN" style="display: inline"><span class="JLqJ4b ChMk0b" style="cursor: pointer"><span>下一步是配置RX和TX队列。</span></span> <span class="JLqJ4b ChMk0b" style="cursor: pointer"><span>对于每个端口,只有一个 RX 队列(只有一个 lcore 能够轮询给定端口)。</span></span> <span class="JLqJ4b ChMk0b" style="cursor: pointer"><span>TX 队列的数量取决于可用 lcore 的数量。</span></span> <span class="JLqJ4b ChMk0b" style="cursor: pointer">rte_eth_dev_configure() 函数用于配置端口的队列数。</span></span><span style="background-color: rgb(245 , 245 , 245)"></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span class="VIiyi" lang="zh-CN" style="display: inline"><span class="JLqJ4b ChMk0b" style="cursor: pointer">&nbsp; &nbsp;对应的API:</span></span><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">rte_eth_dev_configure</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace"><br></span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>4、RX和TX队列的初始化</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span><font color="#111111">&nbsp; &nbsp;</font></span><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">rte_eth_rx_queue_setup</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">&nbsp; &nbsp;rte_eth_tx_queue_setup</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span><br></span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>5、报文处理逻辑:接收、处理和转发报文</span></font></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><font color="#111111" style="font-size: 12px"><span>&nbsp; &nbsp;</span></font><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">rte_eth_rx_burst</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">&nbsp; &nbsp;</span><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">rte_eth_tx_buffer</span></p><p class="paragraph text-align-type-left pap-line-1.8 pap-line-rule-auto pap-spacing-before-2pt pap-spacing-after-2pt" style="line-height: 180% ; margin-top: 2.66667px ; margin-bottom: 2.66667px"><span style="color: rgb(64 , 64 , 64) ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">&nbsp; &nbsp;注:</span><span style="color: rgb(64 , 128 , 128) ; font-style: italic ; font-family: , &#34;menlo&#34; , &#34;monaco&#34; , &#34;consolas&#34; , &#34;liberation mono&#34; , &#34;courier new&#34; , &#34;courier&#34; , monospace">TX burst queue drain这个怎么理解?还是不太懂。</span></p></div>" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontFamily=Lucida Console;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="721" y="600" width="639" height="520" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>