Skip to content

Commit

Permalink
Add support for 50G, 25G and 20G ports
Browse files Browse the repository at this point in the history
Summary:
We need to be able to support 50G and 25G ports in the agent
for yosemite racks. This adds those speeds to the list of supported
speeds in our thrift file.

Reviewed By: jasmeetbagga

Differential Revision: D2522304

fb-gh-sync-id: de6f63c34b53d346e70537a821ba2d11aecd3ae3
  • Loading branch information
aeckert authored and facebook-github-bot-7 committed Dec 16, 2015
1 parent dda9fc8 commit f806681
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion fboss/agent/hw/bcm/BcmHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "fboss/agent/hw/bcm/BcmEgress.h"
#include "fboss/agent/hw/bcm/BcmIntf.h"
#include "fboss/agent/hw/bcm/BcmPort.h"
#include "fboss/agent/hw/bcm/BcmPortTable.h"
#include "fboss/agent/hw/bcm/BcmWarmBootCache.h"

namespace facebook { namespace fboss {
Expand Down
10 changes: 5 additions & 5 deletions fboss/agent/hw/bcm/BcmSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,14 +706,14 @@ void BcmSwitch::updatePortSpeed(const std::shared_ptr<Port>& oldPort,
ret = opennsl_port_speed_max(unit_, bcmPort, &speed);
bcmCheckError(ret, "failed to get max speed for port", newPort->getID());
break;
case cfg::PortSpeed::HUNDREDG:
case cfg::PortSpeed::FIFTYG:
case cfg::PortSpeed::FORTYG:
speed = 40000;
break;
case cfg::PortSpeed::TWENTYFIVEG:
case cfg::PortSpeed::TWENTYG:
case cfg::PortSpeed::XG:
speed = 10000;
break;
case cfg::PortSpeed::GIGE:
speed = 1000;
speed = static_cast<int>(newPort->getSpeed());
break;
default:
throw FbossError("Unsupported speed (", newPort->getSpeed(),
Expand Down
2 changes: 1 addition & 1 deletion fboss/agent/state/Vlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Vlan* Vlan::modify(std::shared_ptr<SwitchState>* state) {
}

void Vlan::addPort(PortID id, bool tagged) {
writableFields()->ports.insert(make_pair(id, PortID(tagged)));
writableFields()->ports.insert(make_pair(id, PortInfo(tagged)));
}

template class NodeBaseT<Vlan, VlanFields>;
Expand Down
3 changes: 3 additions & 0 deletions fboss/agent/switch_config.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ enum PortSpeed {
DEFAULT = 0; // Default for that port defined by HW
GIGE = 1000; // Gig Ethernet
XG = 10000; // 10G
TWENTYG = 20000; // 20G
TWENTYFIVEG = 25000; // 25G
FORTYG = 40000; // 40G
FIFTYG = 50000; // 50G
HUNDREDG = 100000; // 100G
}

Expand Down

0 comments on commit f806681

Please sign in to comment.