Commit fcb8e925 authored by Mike Hibler's avatar Mike Hibler
Browse files

Initial support for 10Gb.

parent 561eddfe
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2012 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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment