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
fcb8e925
Commit
fcb8e925
authored
Jul 23, 2012
by
Mike Hibler
Browse files
Initial support for 10Gb.
parent
561eddfe
Changes
1
Show whitespace changes
Inline
Side-by-side
clientside/tmcc/freebsd/liblocsetup.pm
View file @
fcb8e925
#!/usr/bin/perl -wT
#!/usr/bin/perl -wT
#
#
# EMULAB-COPYRIGHT
# 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.
# All rights reserved.
#
#
...
@@ -152,7 +152,11 @@ sub os_ifconfig_line($$$$$$$$;$$%)
...
@@ -152,7 +152,11 @@ sub os_ifconfig_line($$$$$$$$;$$%)
warn
("
*** Bad speed units $2 in ifconfig, default to 100Mbps
\n
");
warn
("
*** Bad speed units $2 in ifconfig, default to 100Mbps
\n
");
$speed
=
100
;
$speed
=
100
;
}
}
if
(
$speed
==
1000
)
{
if
(
$speed
==
10000
)
{
# 10G is 10G, take it or leave it
$media
=
"";
}
elsif
(
$speed
==
1000
)
{
$media
=
$IFC_1000MBS
;
$media
=
$IFC_1000MBS
;
}
}
elsif
(
$speed
==
100
)
{
elsif
(
$speed
==
100
)
{
...
@@ -169,8 +173,13 @@ sub os_ifconfig_line($$$$$$$$;$$%)
...
@@ -169,8 +173,13 @@ sub os_ifconfig_line($$$$$$$$;$$%)
}
}
if
(
$duplex
eq
"
full
")
{
if
(
$duplex
eq
"
full
")
{
if
(
$speed
==
10000
)
{
# 10G is always full duplex, no need to set
$mediaopt
=
"";
}
else
{
$mediaopt
=
$IFC_FDUPLEX
;
$mediaopt
=
$IFC_FDUPLEX
;
}
}
}
elsif
(
$duplex
eq
"
half
")
{
elsif
(
$duplex
eq
"
half
")
{
$mediaopt
=
$IFC_HDUPLEX
;
$mediaopt
=
$IFC_HDUPLEX
;
}
}
...
...
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