From 71751d109c915197ddea67073dddc3dedfc01e42 Mon Sep 17 00:00:00 2001 From: byu343 Date: Wed, 15 Dec 2021 19:27:49 -0800 Subject: [PATCH] [macsec] Support setting IPG by gearbox_config.json (#2051) --- gearsyncd/gearboxparser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gearsyncd/gearboxparser.cpp b/gearsyncd/gearboxparser.cpp index 1ae8118266c7..dfd68be2ec34 100644 --- a/gearsyncd/gearboxparser.cpp +++ b/gearsyncd/gearboxparser.cpp @@ -151,6 +151,12 @@ bool GearboxParser::parse() val = phy["context_id"]; attr = std::make_pair("context_id", std::to_string(val.get())); 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())); + attrs.push_back(attr); + } if (phy.find("hwinfo") == phy.end()) { SWSS_LOG_ERROR("missing 'hwinfo' field in 'phys' item %d in gearbox configuration", iter);