Skip to content

Commit

Permalink
xsync grpc optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-netlox committed Sep 4, 2023
1 parent 726350e commit 0aebea5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
5 changes: 2 additions & 3 deletions loxinet/dpbroker.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ type DpH struct {
ToFinCh chan int
DpHooks DpHookInterface
SyncMtx sync.RWMutex
MapMtx sync.RWMutex
Peers []DpPeer
RPC *XSync
Remotes []XSync
Expand Down Expand Up @@ -597,10 +596,10 @@ func callGRPC(client XSyncClient, rpcCallStr string, args interface{}, reply *in

if err != nil {
*reply = -1
tk.LogIt(tk.LogInfo, "XSync %s reply - %v[NOK]\n", rpcCallStr, err.Error())
tk.LogIt(tk.LogError, "XSync %s reply - %v[NOK]\n", rpcCallStr, err.Error())
} else if xreply != nil {
*reply = int(xreply.Response)
tk.LogIt(tk.LogInfo, "XSync %s peer reply - %d\n", rpcCallStr, *reply)
tk.LogIt(tk.LogDebug, "XSync %s peer reply - %d\n", rpcCallStr, *reply)
}
return err
}
Expand Down
3 changes: 0 additions & 3 deletions loxinet/dpebpf_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,8 @@ func dpEbpfTicker() {
// Age any entries related to Conntrack
/* No need to fetch all stats in this fashion */
//C.llb_collect_map_stats(C.int(C.LL_DP_CT_STATS_MAP))
mh.dp.MapMtx.Lock()
/* Per entry stats will be fetched in C.ll_ct_map_ent_has_aged */
C.llb_age_map_entries(C.LL_DP_CT_MAP)
mh.dp.MapMtx.Unlock()

C.llb_age_map_entries(C.LL_DP_FCV4_MAP)

// This means around 10s from start
Expand Down
6 changes: 0 additions & 6 deletions loxinet/xsync_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ func (xs *XSync) DpWorkOnBlockCtAdd(blockCtis []DpCtInfo, ret *int) error {

*ret = 0

mh.dp.MapMtx.Lock()
defer mh.dp.MapMtx.Unlock()

for _, cti := range blockCtis {

tk.LogIt(tk.LogDebug, "RPC - Block CT Add %s\n", cti.Key())
Expand All @@ -63,9 +60,6 @@ func (xs *XSync) DpWorkOnBlockCtDelete(blockCtis []DpCtInfo, ret *int) error {

*ret = 0

mh.dp.MapMtx.Lock()
defer mh.dp.MapMtx.Unlock()

for _, cti := range blockCtis {

tk.LogIt(tk.LogDebug, "RPC - Block CT Del %s\n", cti.Key())
Expand Down

0 comments on commit 0aebea5

Please sign in to comment.