Skip to content

Commit

Permalink
Merge pull request #444 from cybwan/fix-issues
Browse files Browse the repository at this point in the history
recycle HwNum counter
  • Loading branch information
UltraInstinct14 authored Nov 17, 2023
2 parents c6d82c9 + 894c23a commit 71ee3bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion loxinet/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ package loxinet
import (
"errors"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"

cmn "github.com/loxilb-io/loxilb/common"
)

// error codes
Expand Down Expand Up @@ -221,6 +222,7 @@ func (M *MirrH) MirrDelete(name string) (int, error) {
m.DP(DpRemove)

delete(M.MirrMap, m.Key)
defer M.Mark.PutCounter(m.HwNum)

tk.LogIt(tk.LogInfo, "mirror deleted - %s\n", name)

Expand Down
4 changes: 3 additions & 1 deletion loxinet/qospol.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ package loxinet
import (
"errors"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"

cmn "github.com/loxilb-io/loxilb/common"
)

// error codes
Expand Down Expand Up @@ -220,6 +221,7 @@ func (P *PolH) PolDelete(pName string) (int, error) {
p.DP(DpRemove)

delete(P.PolMap, p.Key)
defer P.Mark.PutCounter(p.HwNum)

tk.LogIt(tk.LogInfo, "policer deleted - %s\n", pName)

Expand Down

0 comments on commit 71ee3bc

Please sign in to comment.