Skip to content

Commit

Permalink
[macsec] Support setting IPG by gearbox_config.json (sonic-net#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
byu343 committed Dec 16, 2021
1 parent 5d5c169 commit 71751d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gearsyncd/gearboxparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ bool GearboxParser::parse()
val = phy["context_id"];
attr = std::make_pair("context_id", std::to_string(val.get<int>()));
attrs.push_back(attr);
if (phy.find("macsec_ipg") != phy.end())
{
val = phy["macsec_ipg"];
attr = std::make_pair("macsec_ipg", std::to_string(val.get<int>()));
attrs.push_back(attr);
}
if (phy.find("hwinfo") == phy.end())
{
SWSS_LOG_ERROR("missing 'hwinfo' field in 'phys' item %d in gearbox configuration", iter);
Expand Down

0 comments on commit 71751d1

Please sign in to comment.