测试NFM

来源:互联网 发布:东方快车杀人事件知乎 编辑:程序博客网 时间:2024/04/30 09:08
启动之前,核对NFE卡的硬件信息。
root@ubuntu-PowerEdge-R720:/home/ubuntu# /opt/netronome/bin/nfp-hwinfo --nfp=0
assembly.model=serrano                    //组件型号=serrano
assembly.partno=AMDA0040-0001         //组件产品编号=AMDA0040-0001
assembly.revision=2.2                          //组件版本=2.2
assembly.serial=14110100                 //组件串号=14110100
assembly.vendor=FLX                       //组件供应商=飞利信
atag.command=at24.io_limit=1 console=ttyS0,115200n8 rootfstype=squashfs ro root=/dev/mtdblock7 init=/linuxrc
atag.id=3148
atag.mem.size=512
atag.serial=0x14110100
board.exec=linux.bin
board.setup=boardconfig.bin
board.setup.version=nfp-bsp-release-2012.09.5-rc4 (cfc7c203cf71)
board.state=15
chip.fuse=0x2f2
chip.model=NFP3240                  //芯片型号=NFP3240
chip.partno=NFP3240                 //芯片产品编号=NFP3240
chip.revision=0xa2
chip.serial=T
chip.speed=1400
config.timestamp=2015-04-07 17:46:38 GMT
crypto.type=none
ddr.mem.size=4096                 //内存大小4GB
ddr0.mem.size=2048               //内存条1大小2GB
ddr0.mem.speed=1066
ddr1.mem.size=2048               //内存条2大小2GB
ddr1.mem.speed=1066
enghw.revision=FLX2.2
eth0.mac=00:15:4d:02:64:bb              //网卡1mav地址=00:15:4d:02:64:bb
eth1.mac=00:15:4d:02:64:bc               //网卡2mac地址=00:15:4d:02:64:bc
ethm.mac=00:15:4d:02:64:ba
flash.model=nfp-bsp-release-2012.09.5-rc4
flash.version=0
gpio6.type=spi0
gpio7.type=pps
me.count=40                                       //microengine数量40
me.mask=0xffffffffff
me.mem.size=3584
me.speed=1000
miniloader.version=nfp-bsp-release-2012.09.5-rc4 (19068d55dcb5)
msf0.type=xaui
msf1.type=xaui
pcie.type=ep
phy.setup=phyconfig.bin
phy.setup.version=nfp-bsp-release-2012.09.5-rc4 (cfc7c203cf71)
qdr0.type=none
qdr1.type=none
spi1.type=none
spi2.type=none
uart.baud=115200
vpd.timestamp=2014-07-10 18:57:56 GMT

使用vi命令修改/etc/netronome.conf中参数为NFM_LOG=/dev/tty  NFM_START_HOST_DAEMONS=y
 NFM_ENABLE_JUMBO_FRAMES=y,运行命令/opt/netronome/bin/nfm-initd.sh start
root@ubuntu-PowerEdge-R720:/home/ubuntu# /opt/netronome/bin/nfm-initd.sh start
Starting Netronome Flow Manager:
**************  Start NFM on Tue Jul  7 06:05:46 HKT 2015  ****************
--- Disabling CPU frequency throttling         //降低cpu主频
--- Starting NFP host drivers                        //启动NFP驱动
nfe_net                13309  0
--- Starting NFE host drivers                       //启动NFE卡驱动
nfe_armctrl            18027  0
nfe_net                13309  0
nfe_tty                13659  0
nfp                    91096  0
nfp_pcie               18697  2 nfp
nfp_cppcore            41984  2 nfp,nfp_pcie
--- Polling for NFP ARM Linux                      //检测到ARM架构NFP,装有linux系统
        --- Establishing ssh communication on NFP 0             //建立远程连接
    Attempting SSH to nvn0
                --- NFP 0 is online
--- Detected SRAM-less NFE card          //检测到NFE卡
--- Detected TCAM-less card                   
****** Programming NFE 0 ******             //对NFE卡进行编程
--- Disabling traffic                               
Disabling traffic on NFE 0                         //停止NFE卡对流量操作
--- Enabling VQDR on SRAM channel 0
--- Setting up VQDR base addresses (no TCAM)
--- Clearing classifier mailbox                     //清空分类器
--- Disabling ECC on MSFs
--- ARM control channel status:
RX: prod=0x549000 con=0x549000 size=0x8000       //接收器状态
TX: prod=0x54c000 con=0x54c000 size=0x8000        //发送器状态
Clients: local=0x00000000000000 remote=0x00000000000000
--- Establishing SSH communication with the ARM             //建立远程连接到ARM的NFP
NFE 0 IP address is fe80::15:4dff:fe02:64ba%nvn0  
--- Setting date on the ARM               //为ARM的NFP配置数据
Mon Jul  6 22:05:00 UTC 2015
--- Starting daemons on the ARM          //启动后台运行的守护进程
Starting nfmmsgd: OK
Starting tcammsgd: OK
--- Starting microcode                         //启动指令集
Starting NFP 0 firmware /lib/firmware/nfm_app_nfp_no_tcam_jumbo.fw              //固件(Firmware)就是写入EROM(可擦写只读存储器)或EEPROM(电可擦     //可编程只读存储器)中的程序。固件担任着一个系统最基础最底层工作的软件。
****** Configuring NFD and NFM ******             //配置NFD和NFM
--- Configuring NFM defaults                            //NFM的默认配置
+++ Jumbo frames are enabled                         //改变帧尺寸功能已启用
+++ NFE TCAM is disabled                               //NFE中TCAM功能已禁用
+++ Repeated SYNs are respected (and reset flow entries)
+++ Errored packets are delivered
--- Starting the NFD driver                            //启动NFD驱动
--- Enabling host to NPU load posting
--- Starting the NFM driver                //启动NFM驱动
--- Starting services for NFM on NFE 0          //启动NFM所需服务
+++ Fragment tracking is ENABLED              //IP分片追踪拂去已启动
--- Running nfmtest to verify base NFM started        //启动nfmtest确认NFM已启动

Netronome Flow Manager 2.7.2 build 58 revision 7832.7a6468b6352d
Copyright (C) 2006-2011 Netronome Systems, Inc.


Checking status of host kernel modules:      //检测主机内核模块状态
* NFE messaging driver     loaded

Checking status of host daemons:              //检测守护进程状态
  Daemons for device 0
* Rules daemon             running
* IP fragment daemon       running

NFD version 2.7.0-2410             //NFD版本:2.7.0-2410

Testing NFE device 0
------------------------------------------------------------------------

Checking status of NFE ports:                  //检测NFE端口状态
  Link State: A value of U is link up, D is down.   //U表示link up ,D表示down
  Force State: an F is link forced, A is autonegotiate.        //F表示forced,A表示autonegotiate
  NFE port link status:
    port          0 1
    state         D D
    forced        A A
* NFE port status          not operational          //检测NFE端口状态:未运行

Checking status of NFD message and buffer pools:                     //检测NFD缓冲池的状态信息
NFE 0 buffer pool 0 is 46% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 1 is 39% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 2 is 42% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 3 is 42% consumed by NPU, 0% consumed by userspace.

Checking status of microengines:                //检测ME的状态
* Microengines             running

Checking status of Network Processor daemons:         //检测守护进程状态
* NFM message daemon       running
* TCAM message daemon      running
Device 0 is fully operational.                               //NFE卡已经完全运行起来了
nfe.present          = 1
ports.min            = 1
ports.max            = 2
nfe 0 ports.hw_min   = 0
nfe 0 ports.hw_max   = 1
ports.switch_tag     = 0 (off)
nfm.reuse_syn        = 1 (RESET)
nfm.lb_tuple         = TWO_TUPLE
nfm.lb_hash          = 0 (FLETCHER)
nfm.errored_packet   = 1 (DELIVER)
nfm.default_rule     = 1 (PASS)
nfm.valhalla_action  = 0x0000000000000000
nfm.mpls_depth       = 6
me version word      = 0x02070003
me revision word     = 0x00001e98
Microcode supports jumbo frames.
****** Configuring NFE card(s) ******
Enabling traffic on NFE 0                                      //启动NFE卡的流量处理功能
**************  NFM started successfully on Tue Jul  7 06:06:06 HKT 2015  ****************
success.
结论:可以看出NFM_LOG=/dev/tty参数是要求向控制台输出过程信息。

运行测试脚本,正常。
ubuntu@ubuntu-PowerEdge-R720:~$ su
Password:
root@ubuntu-PowerEdge-R720:/home/ubuntu# /opt/netronome/bin/nfmtest

Netronome Flow Manager 2.7.2 build 58 revision 7832.7a6468b6352d
Copyright (C) 2006-2011 Netronome Systems, Inc.


Checking status of host kernel modules:
* NFE messaging driver     loaded

Checking status of host daemons:
  Daemons for device 0
* Rules daemon             running
* IP fragment daemon       running

NFD version 2.7.0-2410

Testing NFE device 0
------------------------------------------------------------------------

Checking status of NFE ports:
  Link State: A value of U is link up, D is down.
  Force State: an F is link forced, A is autonegotiate.
  NFE port link status:
    port          0 1
    state         D D
    forced        A A
* NFE port status          not operational

Checking status of NFD message and buffer pools:
NFE 0 buffer pool 0 is 46% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 1 is 39% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 2 is 42% consumed by NPU, 0% consumed by userspace.
NFE 0 buffer pool 3 is 42% consumed by NPU, 0% consumed by userspace.

Checking status of microengines:
* Microengines             running

Checking status of Network Processor daemons:
* NFM message daemon       running
* TCAM message daemon      running
Device 0 is fully operational.
0 0
原创粉丝点击