From c0c8718917a45ce4f71c0197943ec316f40e0146 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 8 Feb 2024 17:01:06 +0100 Subject: [PATCH] Set linux interface in netlink environment. --- env-ot19.sh | 2 ++ env-ot41.sh | 1 + env-ot42.sh | 1 + netlink.pl | 6 +++--- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/env-ot19.sh b/env-ot19.sh index 42a04c0..5ce2b5b 100644 --- a/env-ot19.sh +++ b/env-ot19.sh @@ -4,6 +4,8 @@ export MANAGEMENT_IF=em18 export SKIP_IF=em18 export NETLINK_LINE=3 +# currently there is no distinct linux interface for link 4, share with 3 +export LINUX_IF=enp6s0 # allow to manually run perform tests frag and splice on netlink hosts diff --git a/env-ot41.sh b/env-ot41.sh index de7cda5..d69ee42 100644 --- a/env-ot41.sh +++ b/env-ot41.sh @@ -2,6 +2,7 @@ export MANAGEMENT_IF=em4 export SKIP_IF=em4,em2,em3 export NETLINK_LINE=1 +export LINUX_IF=ens2f1 # allow to manually run perform tests frag and splice on netlink hosts diff --git a/env-ot42.sh b/env-ot42.sh index b12dc51..167a4a2 100644 --- a/env-ot42.sh +++ b/env-ot42.sh @@ -2,6 +2,7 @@ export MANAGEMENT_IF=igc2 export SKIP_IF=igc2,igc3 export NETLINK_LINE=2 +export LINUX_IF=ens2f0 # allow to manually run perform tests frag and splice on netlink hosts diff --git a/netlink.pl b/netlink.pl index 278981d..243d372 100755 --- a/netlink.pl +++ b/netlink.pl @@ -58,6 +58,8 @@ or die "NETLINK_LINE is not in env"; my $management_if = $ENV{MANAGEMENT_IF} or die "MANAGEMENT_IF is not in env"; +my $linux_if = $ENV{LINUX_IF} + or die "LINUX_IF is not in env"; my ($iftype, $ifnum) = $iface =~ /^([a-z]+)([0-9]+)?$/; grep { $_ eq $iftype } @allifaces @@ -141,9 +143,7 @@ my $obsd_r_tunnel_addr = "$ip4prefix.${line}4.3"; my $obsd_r_tunnel_net = "$ip4prefix.${line}4.0/24"; -# currently there is no distinct linux interface for link 4, share with 3 -my %lnx_ifs = ( 1 => "ens2f1", 2 => "ens2f0", 3 => "enp6s0", 4 => "enp6s0" ); -my $lnx_if = $lnx_ifs{$line}; +my $lnx_if = $linux_if; my $lnx_pdev = "$lnx_if.$line"; my $lnx_ipdev = $lnx_if;