1#!/bin/sh 2# Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. 3# 4# This program is free software; you can redistribute it and/or 5# modify it under the terms of the GNU General Public License as 6# published by the Free Software Foundation; either version 2 of 7# the License, or (at your option) any later version. 8# 9# This program is distributed in the hope that it would be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program. If not, see <http://www.gnu.org/licenses/>. 16# 17# Test-case: setup two MACsec drivers and run TCP traffic over them 18# with enabled frame encryption and replay protection, compare 19# performance with similar IPsec configuration on master interface. 20 21TCID=macsec02 22TST_TOTAL=16 23TST_NEEDS_TMPDIR=1 24 25virt_type="macsec" 26VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} 27 28. ipsec_lib.sh 29. virt_lib.sh 30 31cleanup() 32{ 33 virt_cleanup 34 tst_ipsec_cleanup 35} 36TST_CLEANUP="cleanup" 37 38IPSEC_MODE=transport 39IPSEC_PROTO=esp_aead 40EALGO=aes 41tst_resm TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" 42tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) 43tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) 44 45virt_macsec_setup "replay on window 300 encrypt on protect on" 46virt_netperf_msg_sizes 47 48tst_exit 49