你好:
我正在使用 LS1046A Board 使用 Flex-builder(flexbuild_lsdk2108) 开发基于网络的应用程序。
网络拓扑如下:
LS1046A_1(fm1-mac5) <----------------------------> LS1046A_2(fm1-mac5)
(1) 没有caam的ipsec
root@localhost:~# ipsec status
Security Associa
tions (1 up, 0 connecting):
h2h[1]: ESTABLISHED 14 秒前, 192.168.20.114[6010.strongswan.org]...192.168.20.139[6002.strongswan.org ]
h2h_child{1}:已安装,隧道,reqid 1,ESP SPI:c9fcc798_i c88b471d_o
h2h_child{1}:192.168.20.114/32 === 192.168.20.139/32
我使用 iperf 工具测试吞吐量,如下所示:
root@localhost:~#
root@localhost:~# iperf -s
---------------------------------- ----------------------
服务器侦听 TCP 端口 5001
TCP 窗口大小:128 KByte(默认)
-------- ----------------------------------------------
[ 4] local 192.168.20.114 port 5001 connected with 192.168.20.139 port 50844
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 494 MBytes 414 Mbits/sec
[ 4] local 192.168.20.114 port 5001 connected with 192.168.2 port 50858
[ 4] 0.0-10.0 秒 497 兆字节 417 兆比特/秒
(2) ipsec 与 caam
root@localhost:~#
root@localhost:~# modprobe caam
root@localhost:~# modprobe cryptodev
root@localhost:~#
root@localhost:~# cat /proc/中断 | grep jr
85:3 0 0 0 GICv2 103 级别 1710000.jr
86:0 0 0 0 GICv2 104 级别 1720000.jr
87:0 0 0 0 GICv2 105 级别 1730000.jr
现在我再次使用 iperf 工具测试吞吐量,如下所示:
root@localhost:~#
root@localhost:~# iperf -s
---------------------------------- ----------------------
服务器侦听 TCP 端口 5001
TCP 窗口大小:128 KByte(默认)
-------- ----------------------------------------------
[ 4] local 192.168.20.114 port 5001 connected with 192.168.20.139 port 50894
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 486 MBytes 408 Mbits/sec
[ 4] local 192.168.20.114 port 5001 connected with 192.168.2 port 50902
[ 4] 0.0-10.0 秒 480 兆字节 402 兆比特/秒
我没有看到吞吐量有任何增加。
查看caam,发现已经生效了。
root@localhost:~#
root@localhost:~# cat /proc/中断 | grep jr
85:61803 0 0 0 GICv2 103 级别 1710000.jr
86:152783 0 0 0 GICv2 104 级别 1720000.jr
87:91331 0 0 0 GICv2 105 级别 1730000.jr
对了,ipsec相关的linux配置如下:
CONFIG_XFRM_OFFLOAD=y
CONFIG_XFRM_AH=y
CONFIG_XFRM_IPCOMP=y
CONFIG_XFRM_ESPINTCP=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_INET_AH=y
CONFIG_INET_ESP_OFFLOAD=y
CONFIG_INET_ESPINTCP=y
CONFIG_INET_IPCOMP=y
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
我不知道是什么问题。
请给我一些建议
多谢!