Skip to content

Commit

Permalink
Set linux interface in netlink environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Feb 8, 2024
1 parent c4c8bf7 commit c0c8718
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions env-ot19.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions env-ot41.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions env-ot42.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions netlink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c0c8718

Please sign in to comment.