Skip to content

Commit

Permalink
remove remaining fec references
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Sep 23, 2024
1 parent 0fe4b2e commit 1260394
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
10 changes: 0 additions & 10 deletions cmd/internal/switcher/sonic/db/asicdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
18 changes: 0 additions & 18 deletions cmd/internal/switcher/sonic/db/configdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const (
adminStatusUp = "up"
adminStatusDown = "down"
mtu = "mtu"
fec = "fec"
fecRS = "rs"
fecNone = "none"
)

type ConfigDB struct {
Expand All @@ -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 {
Expand Down Expand Up @@ -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}

Expand Down

0 comments on commit 1260394

Please sign in to comment.