Skip to content

Commit

Permalink
LRO is default now, switch to nolro modifier in netlink and perform.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Sep 23, 2023
1 parent 5abb3b7 commit 6d24e4d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion net.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
my $scriptname = "$0 @ARGV";

my @allifaces = qw(em igc ix ixl);
my @allmodifymodes = qw(lro none nopf notso);
my @allmodifymodes = qw(nolro none nopf notso);
my @allpseudos = qw(bridge none veb vlan);
my @allsetupmodes = (qw(build install upgrade sysupgrade keep kernel reboot
tools), "cvs,build", "cvs,kernel");
Expand Down
24 changes: 12 additions & 12 deletions netlink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Netstat;

my @allifaces = qw(em igc ix ixl);
my @allmodifymodes = qw(lro nopf notso);
my @allmodifymodes = qw(nolro nopf notso);
my @allpseudos = qw(bridge none veb vlan);
my @alltestmodes = sort qw(all fragment icmp tcp udp);

Expand Down Expand Up @@ -626,29 +626,29 @@ sub lro_get_ifs {
}

my @lro_ifs;
sub lro_startup {
sub nolro_startup {
my ($log) = @_;

@lro_ifs = lro_get_ifs();
foreach my $ifname (@lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
logcmd($log, @cmd) and
die "Command '@cmd' failed: $?";
}

# changing LRO may lose interface link status due to down/up
sleep 1;
print $log "lro enabled\n\n";
print "lro enabled\n\n" if $opts{v};
print $log "lro disabled\n\n";
print "lro disabled\n\n" if $opts{v};
}

sub lro_shutdown {
sub nolro_shutdown {
my ($log) = @_;
print $log "\ndisabling lro\n";
print "\ndisabling lro\n" if $opts{v};
print $log "\nenabling lro\n";
print "\nenabling lro\n" if $opts{v};

foreach my $ifname (@lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
logcmd($log, @cmd) and
die "Command '@cmd' failed: $?";
}
Expand Down Expand Up @@ -894,9 +894,9 @@ sub notso_shutdown {
},
);

if ($modify && $modify eq 'lro') {
$tests[0]{startup} = \&lro_startup;
$tests[-1]{shutdown} = \&lro_shutdown;
if ($modify && $modify eq 'nolro') {
$tests[0]{startup} = \&nolro_startup;
$tests[-1]{shutdown} = \&nolro_shutdown;
}
if ($modify && $modify eq 'nopf') {
$tests[0]{startup} = \&nopf_startup;
Expand Down
2 changes: 1 addition & 1 deletion once.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
my $scriptname = "$0 @ARGV";

my @allkernelmodes = qw(align gap sort reorder reboot keep);
my @allmodifymodes = qw(lro nopf notso pfsync);
my @allmodifymodes = qw(nolro nopf notso pfsync);
my @alltestmodes = qw(
all net tcp udp make fs iperf tcpbench udpbench iperftcp
iperfudp net4 tcp4 udp4 iperf4 tcpbench4 udpbench4 iperftcp4 iperfudp4
Expand Down
26 changes: 13 additions & 13 deletions perform.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
my $startdir = getcwd();
my @startcmd = ($0, @ARGV);

my @allmodifymodes = qw(lro nopf notso pfsync);
my @allmodifymodes = qw(nolro nopf notso pfsync);
my @alltestmodes = qw(
all net tcp udp make fs iperf tcpbench udpbench iperftcp
iperfudp net4 tcp4 udp4 iperf4 tcpbench4 udpbench4 iperftcp4 iperfudp4
Expand Down Expand Up @@ -495,41 +495,41 @@ sub lro_get_ifs {
}

my (@lro_ifs, @remote_lro_ifs);
sub lro_startup {
sub nolro_startup {
my ($log) = @_;

@lro_ifs = lro_get_ifs();
foreach my $ifname (@lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
logcmd($log, @cmd) and
die "Command '@cmd' failed: $?";
}
@remote_lro_ifs = lro_get_ifs('ssh', $remote_ssh);
foreach my $ifname (@remote_lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
my @sshcmd = ('ssh', $remote_ssh, @cmd);
logcmd($log, @sshcmd) and
die "Command '@sshcmd' failed: $?";
}

# changing LRO may lose interface link status due to down/up
sleep 1;
print $log "lro enabled\n\n";
print "lro enabled\n\n" if $opts{v};
print $log "lro disabled\n\n";
print "lro disabled\n\n" if $opts{v};
}

sub lro_shutdown {
sub nolro_shutdown {
my ($log) = @_;
print $log "\ndisabling lro\n";
print "\ndisabling lro\n" if $opts{v};
print $log "\nenabling lro\n";
print "\nenabling lro\n" if $opts{v};

foreach my $ifname (@lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
logcmd($log, @cmd) and
die "Command '@cmd' failed: $?";
}
foreach my $ifname (@remote_lro_ifs) {
my @cmd = ('/sbin/ifconfig', $ifname, '-tcplro');
my @cmd = ('/sbin/ifconfig', $ifname, 'tcplro');
my @sshcmd = ('ssh', $remote_ssh, @cmd);
logcmd($log, @sshcmd) and
die "Command '@sshcmd' failed: $?";
Expand Down Expand Up @@ -1130,8 +1130,8 @@ sub fsmark_finalize {
}
) if $testmode{vport6} && $linux_veb_addr6;
if ($modify && $modify eq 'lro') {
$tests[0]{startup} = \&lro_startup;
$tests[-1]{shutdown} = \&lro_shutdown;
$tests[0]{startup} = \&nolro_startup;
$tests[-1]{shutdown} = \&nolro_shutdown;
}
if ($modify && $modify eq 'nopf') {
$tests[0]{startup} = \&nopf_startup;
Expand Down

0 comments on commit 6d24e4d

Please sign in to comment.