ClassBench工具集问题修复

 

用于测试报文分类算法性能,以及分类设备(如TCAM)性能的工具集ClassBench,包含三个部分:预先定义的参数文件parameter_files,分类规则集生成器程序db_generator,和报文生成器程序trace_generator。目前由于db_generator在Ubuntu 17.04编译不过,并且开发者已不再维护。在进行了修改之后,将代码提交到了github之上,地址如下:https://github.com/zhangkaiheb/classbench。

以下为使用编译后的db_generator工具,生成分类规则集文件MyFilters10k,其中的参数文件acl3_seed位于参数目录parameter_files。

$ ./db_generator -bc acl3_seed 10000 0 -0.5 0.1 MyFilters10k               
Initializing data structures...
        done
Creating application specifications...
        done
Creating source addresses...
        done
Creating destination addresses...
No prefix correlation specified for custom distribution.
        done
Removing redundant filters and ordering nested filters...
        done
Target number of filters = 10000
8696 filters generated in standard form
        Note that number of generated filters may be less than target number
        due to the removal of redundant filters during the generation process.
        Redundancy may be reduced by turning on address scaling (-b switch),
        increasing the smoothness adjustment,
        or appropriately modifying the input parameter file.
$ 


规则集文件的部分显示如下:

$ head -n 3 MyFilters10k 
@156.183.237.11/32      60.123.13.126/32        0 : 65535       514 : 514       0x06/0xFF       0x1000/0x1000
@134.71.127.211/32      45.104.113.139/32       0 : 65535       443 : 443       0x06/0xFF       0x0000/0x0200
@122.52.33.101/32       244.48.55.36/32 0 : 65535       5190 : 5190     0x06/0xFF       0x1000/0x1000
$ 


其格式定义如下,DPDK的示例程序l3fwd-acl,可使用以上的规则集文件MyFilters10k作为输入文件。

'@''/'  '/'  \
  ":"     ":"   '/'

 

END

 

你可能感兴趣的:(DPDK,网络应用)