亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 6433 | 回復(fù): 9
打印 上一主題 下一主題

[內(nèi)核模塊] libpcap添加過濾規(guī)則后,捕包性能反而下降,求解 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2012-10-15 15:46 |只看該作者 |倒序?yàn)g覽
我最經(jīng)在學(xué)習(xí)使用libpcap捕獲網(wǎng)絡(luò)數(shù)據(jù)包,在沒有設(shè)置bpf過濾規(guī)則時,捕獲的的流量可以在50M,而添加過濾規(guī)則后,捕獲的流量反而下降了,這是怎么回事啊,求解!。。

例如:

在不添加bpf規(guī)則的時候,使用儀器發(fā)送50M的HTTP流量,設(shè)備cpu到達(dá)98%

而添加bpf規(guī)則,tcp port 80 ,使用儀器發(fā)送30MHTTP流量的時候,設(shè)備的cpu就達(dá)到98%了

這是什么原因? 我覺得應(yīng)該是二種情況下,支持的流量一樣才對啊,求解求解!。!

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2012-10-15 18:34 |只看該作者
回復(fù) 1# whhitdragon
你添加了過濾就相當(dāng)于把數(shù)據(jù)包捕獲下來以后在對內(nèi)容進(jìn)行了一下比較,如果你在截獲數(shù)據(jù)包后沒有對數(shù)據(jù)包進(jìn)行處理,那么這樣性能下降也是可以理解的吧。


   

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2012-10-16 13:32 |只看該作者
如果是抓包性能瓶頸,可以試試PF_RING

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2012-10-16 14:33 |只看該作者
使用PF_RING后,捕包性能能夠提高多少? 您有沒有對應(yīng)的使用文檔? 有的話能否給小弟一些,謝謝了! 回復(fù) 3# shamofeiyu


   

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2012-10-16 16:30 |只看該作者
回復(fù) 4# whhitdragon


    http://www.ntop.org/products/pf_ring/ 上面介紹的很詳細(xì)了

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2012-10-16 17:07 |只看該作者
回復(fù) 5# shamofeiyu
在交叉編譯環(huán)境下怎么編譯? 需要重寫makefile 嗎?



   

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2012-10-16 17:22 |只看該作者
回復(fù) 6# whhitdragon

老版本有交叉編譯的腳本,但是新版本好像沒有了
  1. #!/bin/sh

  2. #
  3. # Simple file for cross-compiling PF_RING on ARM
  4. #
  5. make -C ../../kernel/linux-feroceon_5_0_3_KW SUBDIRS=/home/deri/ARM/PF_RING/kernel EXTRA_CFLAGS='-I/home/deri/ARM/PF_RING/kernel' ARCH=arm CROSS_COMPILE=arm-mv5sft-linux-gnueabi- modules
復(fù)制代碼

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2012-10-17 17:51 |只看該作者
回復(fù) 7# shamofeiyu

非常感謝 shamofeiyu

我按照你的方法編譯后,可以在arm下面安裝了。

現(xiàn)在按照pf_ring中的UsersGuide說明編譯libpfring 和 libpcap ,編譯命令如下:

cd ${PF_RING}/userland/lib
./configure
make CROSS_COMPILE=¥{SDK_DIR}/staging_dir/toolchain-arm_v5te_gcc-4.4.3_uClibc-0.9.30.1_eabi/usr/bin/arm-openwrt-linux-

出現(xiàn)下面錯誤提示:


ar x libs/libpfring_zero_i686.a
ar x libs/libpfring_dna_i686.a
ar x libs/libpfring_mod_virtual_i686.a
/home/xxx/xxx/staging_dir/toolchain-arm_v5te_gcc-4.4.3_uClibc-0.9.30.1_eabi/usr/bin/arm-openwrt-linux-gcc -Wall -fPIC -I../../kernel -I../../vPF_RING/guest/kernel -I../libpcap -D HAVE_ZERO -D HAVE_DNA -D HAVE_VIRTUAL  -D ENABLE_BPF   -O2  -c pfring.c -o pfring.o
In file included from pfring.c:21:
pfring.h:263: error: expected specifier-qualifier-list before 'pthread_rwlock_t'
pfring.c: In function 'pfring_open':
pfring.c:151: warning: implicit declaration of function 'pthread_rwlock_init'
pfring.c:151: error: 'pfring' has no member named 'rx_lock'
pfring.c:152: error: 'pfring' has no member named 'tx_lock'
pfring.c: In function 'pfring_close':
pfring.c:251: warning: implicit declaration of function 'pthread_rwlock_destroy'
pfring.c:251: error: 'pfring' has no member named 'rx_lock'
pfring.c:252: error: 'pfring' has no member named 'tx_lock'
pfring.c: In function 'pfring_set_reflector_device':
pfring.c:293: error: 'pfring' has no member named 'reflector_socket'
pfring.c:296: error: 'pfring' has no member named 'reflector_socket'
pfring.c:298: error: 'pfring' has no member named 'reflector_socket'
pfring.c:299: error: 'pfring' has no member named 'reflector_socket'
pfring.c:300: error: 'pfring' has no member named 'reflector_socket'
pfring.c: In function 'pfring_recv':
pfring.c:505: error: 'pfring' has no member named 'reflector_socket'
pfring.c:506: error: 'pfring' has no member named 'reflector_socket'
pfring.c: In function 'pfring_send':
pfring.c:623: warning: implicit declaration of function 'pthread_rwlock_wrlock'
pfring.c:623: error: 'pfring' has no member named 'tx_lock'
pfring.c:628: warning: implicit declaration of function 'pthread_rwlock_unlock'
pfring.c:628: error: 'pfring' has no member named 'tx_lock'
pfring.c: In function 'pfring_send_ifindex':
pfring.c:649: error: 'pfring' has no member named 'tx_lock'
pfring.c:654: error: 'pfring' has no member named 'tx_lock'
pfring.c: In function 'pfring_send_parsed':
pfring.c:672: error: 'pfring' has no member named 'tx_lock'
pfring.c:677: error: 'pfring' has no member named 'tx_lock'
pfring.c: In function 'pfring_send_get_time':
pfring.c:700: error: 'pfring' has no member named 'tx_lock'
pfring.c:705: error: 'pfring' has no member named 'tx_lock'


   

論壇徽章:
0
9 [報(bào)告]
發(fā)表于 2012-11-17 14:30 |只看該作者
回復(fù) 8# whhitdragon


    最近好忙,是不是包含了DNA模式的庫了

ar x libs/libpfring_zero_i686.a
ar x libs/libpfring_dna_i686.a
ar x libs/libpfring_mod_virtual_i686.a

這個是DNA模式的二進(jìn)制庫,可以吧他們?nèi)サ,因(yàn)樗麄兪莤86編譯的,DNA模式是PF_RING中性能更好的抓包方案,但是他們沒有開放源代碼

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2013-05-06 11:42 |只看該作者
回復(fù) 1# whhitdragon


    哥,過濾規(guī)則怎么設(shè)置。壳笾鷞:3_200:}
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP