程序员达达

编程环境

NetFPGA Regression Test: nf_test.py

如果你是Fedora 14,恭喜你,regression test会异常容易。 1. 连线 官网上的regression test说的连接是: eth1 — nf2c0 eth2 — nf2c1 不过,nf2c2和nf2c3也是不能空着的,两个之间拿线连接一下就好。 nf2c2 — nf2c3 2. 如果你只有两个网口,其默认名为eth0和eth1: 你需要做的是根据连线重命名一下,参考:Change eth1 nomenclature to eth0以及Change network device name from eth1 back to eth0 需要修改的文件有: A. “/etc/udev/rules.d/70-persistent-net.rules”: # PCI device 0x15ad:0x07b0 (vmxnet3) SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:b2:23:e0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″ 修改相应的eth*(非必须) B. “/etc/sysconfig/network-scripts/ifcfg-*”以及“/etc/sysconfig/networking/ifcfg-*”(如果存在的话) (注:对于只有两个网口的同学,推荐的办法是将eth0直接该为eth2.这样再改回来比较省事) 3. 运行 ~/netfpga/bin/nf_test.py hw…

NetFPGA 1G on Fedora 14(官方推荐安装)

NetFPGA 1G的官方推荐OS是Fedora14,但是网站上的教程没有具体的步骤。找了半天才发现具体安装步骤被奇葩地放到了10G下面:“Installing Fedora 14”。 需要注意的有: 1.确认在安装的时候选上Software Development选项 2.如果你联网了,可以把光盘外的repo装上。如果你碰到了“Unable to read packege metadata from repository. This may be due to a missing repodata directory. Please ensure that your repository has been correctly generated”,点击“Edit Repository”按钮,将https修改为http即可。 安装完成之后,由于Fedora的安全策略,无法用root登录。需要做如下修改: 找到下面三个文件,注释掉 auth required pam_succeed_if.so user != root quiet # vim /etc/pam.d/gdm # vim /etc/pam.d/gdm-password # vim /etc/pam.d/gdm-fingerprint 之后直接用root登录安装NetFPGA 关掉selinux: 编辑/etc/sysconfig/selinux,将SELINUX设置为“disabled” 关掉不需要的系统服务(否则做regression…

NetFPGA Regression Test: gui_scone

netfpga_java_gui

运行gui_scone的regression test可以使用下面命令: ~/netfpga/bin/nf_regress_test.pl –project gui_scone 但是基本上第一次的话都是会报错的: NetFPGA environment: Root dir: /home/dnrl/netfpga Project name: gui_scone Project dir: /home/dnrl/netfpga/projects/gui_scone Work dir: /tmp/dnrl   Root directory is /home/dnrl/netfpga Running tests on project ‘gui_scone’… Running global setup… PASS Running test ‘test_main_frame’… FAIL Output was: Exception in thread "main" java.lang.NoClassDefFoundError: MainFrameTest   test_main_frame/run exited with value 1   Running test…

NetFPGA GUI on CentOS 5.9

netfpga_java_gui

想运行一下Java的GUI,于是按照官方wiki上的说法,跑到 netfpga/lib/java/gui下面make clean; make。结果报了一大堆错误。 Building java… ———- 1. ERROR in src/org/netfpga/backend/NFDeviceTest.java (at line 14) HashMap<Long, Integer> table; ^^^^^^^ The type HashMap is not generic; it cannot be parameterized with arguments <Long, Integer> ———- 2. ERROR in src/org/netfpga/backend/NFDeviceTest.java (at line 14) HashMap<Long, Integer> table; ^^^^^^^^^^^^^ Syntax error, parameterized types are only available if source level is…

How to set up environment for NetFPGA-1G on Fedora 18

NetFPGA-1g

Assuming the “netfpga” folder is under your home. # cd ~/netfpga # make Error: “~/netfpga/lib/C/kernel/nf2_ethtool.c:99:2: error: unknown field ‘phys_id’ specified in initializer” Solution: ethtool_ops does not include phys_id anymore, just comment the statement below: // phys_id = nf2_phys_id, Error: Can’t locate XML/Simple.pm in @INC Solution: need to install the XML::Simple Perl module # sudo cpan…