Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
03b6c9bc
Commit
03b6c9bc
authored
Jul 02, 2012
by
Mike Hibler
Browse files
Tweaks for 10Gb support.
parent
277317f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/liblocsetup.pm
View file @
03b6c9bc
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-201
1
University of Utah and the Flux Group.
# Copyright (c) 2000-201
2
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -93,6 +93,8 @@ my $GROUPDEL = "/usr/sbin/groupdel";
my
$IFCONFIGBIN
=
"
/sbin/ifconfig
";
my
$IFCONFIG
=
"
$IFCONFIGBIN
%s inet %s netmask %s
";
my
$VLANCONFIG
=
"
/sbin/vconfig
";
# XXX 10000 is probably not right, but we don't use mii-tool here
my
$IFC_10000MBS
=
"
10000baseTx
";
my
$IFC_1000MBS
=
"
1000baseTx
";
my
$IFC_100MBS
=
"
100baseTx
";
my
$IFC_10MBS
=
"
10baseT
";
...
...
@@ -630,7 +632,10 @@ sub os_ifconfig_line($$$$$$$$;$$$)
warn
("
*** Bad speed units $2 in ifconfig, default to 100Mbps
\n
");
$speed
=
100
;
}
if
(
$speed
==
1000
)
{
if
(
$speed
==
10000
)
{
$media
=
$IFC_10000MBS
;
}
elsif
(
$speed
==
1000
)
{
$media
=
$IFC_1000MBS
;
}
elsif
(
$speed
==
100
)
{
...
...
@@ -662,10 +667,11 @@ sub os_ifconfig_line($$$$$$$$;$$$)
}
#
# Linux is apparently changing from mii-tool to ethtool but some drivers
# don't support the new interface (3c59x), some don't support the old
# interface (e1000), and some (eepro100) support the new interface just
# enough that they can report success but not actually do anything. Sweet!
# Linux is apparently changing from mii-tool to ethtool but some
# drivers don't support the new interface (3c59x), some don't support
# the old interface (e1000), and some (eepro100) support the new
# interface just enough that they can report success but not actually
# do anything. Sweet!
#
my
$ethtool
;
if
(
-
e
"
/sbin/ethtool
")
{
...
...
@@ -688,7 +694,7 @@ sub os_ifconfig_line($$$$$$$$;$$$)
}
$uplines
.=
"
$ethtool
-s
$iface
autoneg off speed
$speed
duplex
$duplex
\n
"
.
"
sleep 2 # needed due to likely bug in e100 driver on pc850s
\n
";
"
sleep 2 # needed due to likely bug in e100 driver on pc850s
\n
";
}
$uplines
.=
"
else
\n
"
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment