diff --git a/cmd/internal/switcher/sonic/db/asicdb.go b/cmd/internal/switcher/sonic/db/asicdb.go index d9fa1ca1..398a5d34 100644 --- a/cmd/internal/switcher/sonic/db/asicdb.go +++ b/cmd/internal/switcher/sonic/db/asicdb.go @@ -55,13 +55,3 @@ func (d *AsicDB) ExistRouterInterface(ctx context.Context, rif OID) (bool, error return d.c.Exists(ctx, key) } - -func (d *AsicDB) InFecModeRs(ctx context.Context, port OID) (bool, error) { - key := Key{"ASIC_STATE", "SAI_OBJECT_TYPE_PORT", string(port)} - - result, err := d.c.HGet(ctx, key, "SAI_PORT_ATTR_FEC_MODE") - if err != nil { - return false, err - } - return result == "SAI_PORT_FEC_MODE_RS", err -} diff --git a/cmd/internal/switcher/sonic/db/configdb.go b/cmd/internal/switcher/sonic/db/configdb.go index f74107d4..3f7f8754 100644 --- a/cmd/internal/switcher/sonic/db/configdb.go +++ b/cmd/internal/switcher/sonic/db/configdb.go @@ -18,9 +18,6 @@ const ( adminStatusUp = "up" adminStatusDown = "down" mtu = "mtu" - fec = "fec" - fecRS = "rs" - fecNone = "none" ) type ConfigDB struct { @@ -30,7 +27,6 @@ type ConfigDB struct { type Port struct { AdminStatus bool Mtu string - FecRs bool } func newConfigDB(addr string, id int, sep string) *ConfigDB { @@ -182,23 +178,9 @@ func (d *ConfigDB) GetPort(ctx context.Context, interfaceName string) (*Port, er return &Port{ AdminStatus: result[adminStatus] == adminStatusUp, Mtu: result[mtu], - FecRs: result[fec] == fecRS, }, nil } -func (d *ConfigDB) SetPortFecMode(ctx context.Context, interfaceName string, isFecRs bool) error { - key := Key{portTable, interfaceName} - - var mode string - if isFecRs { - mode = fecRS - } else { - mode = fecNone - } - - return d.c.HSet(ctx, key, Val{fec: mode}) -} - func (d *ConfigDB) SetPortMtu(ctx context.Context, interfaceName string, val string) error { key := Key{portTable, interfaceName}