Skip to content

Commit b5f367e

Browse files
committed
CLOUDSTACK-1643: Check and enable Intel AES NI if available for VR
This is an encryption optimization for VPN/SSL, with upto 10x advertised speed. The patch check for the aesni_intel module if aes is available on the cpu, this will be true for HVMs. Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 162de5b commit b5f367e

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

patches/systemvm/debian/config/etc/init.d/cloud-early-config

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,20 @@ setup_redundant_router() {
593593
fi
594594
}
595595

596+
setup_aesni() {
597+
if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ]
598+
then
599+
modprobe aesni_intel
600+
if [ `lsmod | grep aesni_intel | wc -l` -gt 0 ]
601+
then
602+
echo aesni_intel >> /etc/modules
603+
fi
604+
fi
605+
}
606+
596607
setup_router() {
597608
log_it "Setting up virtual router system vm"
598-
609+
599610
oldmd5=
600611
[ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}')
601612

@@ -643,10 +654,8 @@ setup_router() {
643654
fi
644655
fi
645656

646-
647-
657+
setup_aesni
648658
setup_dnsmasq
649-
650659
setup_apache2 $ETH0_IP
651660

652661
sed -i /gateway/d /etc/hosts

0 commit comments

Comments
 (0)