Skip to content

Commit

Permalink
Port group recreate
Browse files Browse the repository at this point in the history
Summary:
Detailed solution:
https://docs.google.com/document/d/1c45Lfy6kq1BFAZONt3lZDXhCIV45ruQhe5G2CJtkLAE/edit?tab=t.0

Reviewed By: srikrishnagopu

Differential Revision: D65735296

fbshipit-source-id: 9f4827cbc1d0b5376b2e388035cd9884ea6d4b05
  • Loading branch information
Vasant Patil authored and facebook-github-bot committed Dec 4, 2024
1 parent 78811af commit 590e5b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions fboss/agent/platforms/sai/SaiMorgan800ccPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h"
#include "fboss/agent/hw/switch_asics/YubaAsic.h"
#include "fboss/agent/platforms/common/morgan800cc/Morgan800ccPlatformMapping.h"
#include "fboss/lib/config/PlatformConfigUtils.h"

namespace facebook::fboss {

Expand Down Expand Up @@ -51,6 +52,19 @@ std::string SaiMorgan800ccPlatform::getHwConfig() {
return asicConfig.get_common().get_jsonConfig();
}

std::vector<PortID> SaiMorgan800ccPlatform::getAllPortsInGroup(
PortID portID) const {
std::vector<PortID> allPortsinGroup;
if (const auto& platformPorts = getPlatformPorts(); !platformPorts.empty()) {
const auto& portList =
utility::getPlatformPortsByControllingPort(platformPorts, portID);
for (const auto& port : portList) {
allPortsinGroup.emplace_back(*port.mapping()->id());
}
}
return allPortsinGroup;
}

SaiMorgan800ccPlatform::~SaiMorgan800ccPlatform() = default;

} // namespace facebook::fboss
1 change: 1 addition & 0 deletions fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class SaiMorgan800ccPlatform : public SaiTajoPlatform {
bool isSerdesApiSupported() const override {
return true;
}
std::vector<PortID> getAllPortsInGroup(PortID) const override;

private:
void setupAsic(
Expand Down

0 comments on commit 590e5b3

Please sign in to comment.