diff --git a/.github/workflows/basic-sanity-ubuntu-22.yml b/.github/workflows/basic-sanity-ubuntu-22.yml index 9eb590587..34ceed77c 100644 --- a/.github/workflows/basic-sanity-ubuntu-22.yml +++ b/.github/workflows/basic-sanity-ubuntu-22.yml @@ -35,7 +35,7 @@ jobs: with: go-version: '>=1.18.0' - run: sudo apt-get update - - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iproute2 + - run: sudo apt-get -y install clang llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iproute2 - run: | sudo ip netns add test sudo ip netns del test diff --git a/api/loxinlp/ipvs.go b/api/loxinlp/ipvs.go index 8ddd797e9..08d840110 100644 --- a/api/loxinlp/ipvs.go +++ b/api/loxinlp/ipvs.go @@ -85,7 +85,7 @@ func (ctx *IPVSH) buildIPVSDB() []*ipVSEntry { } newEntry.sel = cmn.LbSelRr - newEntry.pType = "" + newEntry.pType = "none" newEntry.timeout = svc.Timeout if svc.Flags&0x1 == 0x1 { newEntry.sel = cmn.LbSelRrPersist @@ -107,7 +107,7 @@ func (ctx *IPVSH) buildIPVSDB() []*ipVSEntry { newEntry.mode = cmn.LBModeDefault if svc.Port >= K8sNodePortMin && svc.Port <= K8sNodePortMax { newEntry.mode = cmn.LBModeFullNAT - newEntry.pType = "ping" + //newEntry.pType = "ping" } key := ipVSKey{Address: svc.Address.String(), Protocol: proto, Port: svc.Port} diff --git a/api/loxinlp/nlp.go b/api/loxinlp/nlp.go index bc6cd6f8d..7fa9c7a45 100644 --- a/api/loxinlp/nlp.go +++ b/api/loxinlp/nlp.go @@ -1363,7 +1363,7 @@ func RUWorkSingle(m nlp.RouteUpdate) int { func LUWorker(ch chan nlp.LinkUpdate, f chan struct{}) { - for n := 0; n < cmn.LuWorkQLen; n++ { + for n := 0; n < 32; n++ { select { case m := <-ch: LUWorkSingle(m) @@ -1375,7 +1375,7 @@ func LUWorker(ch chan nlp.LinkUpdate, f chan struct{}) { func AUWorker(ch chan nlp.AddrUpdate, f chan struct{}) { - for n := 0; n < cmn.AuWorkqLen; n++ { + for n := 0; n < 64; n++ { select { case m := <-ch: AUWorkSingle(m) @@ -1388,7 +1388,7 @@ func AUWorker(ch chan nlp.AddrUpdate, f chan struct{}) { func NUWorker(ch chan nlp.NeighUpdate, f chan struct{}) { - for n := 0; n < cmn.NuWorkQLen; n++ { + for n := 0; n < 128; n++ { select { case m := <-ch: NUWorkSingle(m) @@ -1400,7 +1400,7 @@ func NUWorker(ch chan nlp.NeighUpdate, f chan struct{}) { func RUWorker(ch chan nlp.RouteUpdate, f chan struct{}) { - for n := 0; n < cmn.RuWorkQLen; n++ { + for n := 0; n < 128; n++ { select { case m := <-ch: RUWorkSingle(m) @@ -1433,7 +1433,7 @@ func NLWorker(nNl *NlH, bgpPeerMode bool, ch chan bool, wch chan bool) { AUWorker(nNl.FromAUCh, nNl.FromAUDone) NUWorker(nNl.FromNUCh, nNl.FromNUDone) RUWorker(nNl.FromRUCh, nNl.FromRUDone) - time.Sleep(1000 * time.Millisecond) + time.Sleep(500 * time.Millisecond) } } } diff --git a/pkg/loxinet/layer2.go b/pkg/loxinet/layer2.go index f26114807..f15434b34 100644 --- a/pkg/loxinet/layer2.go +++ b/pkg/loxinet/layer2.go @@ -223,8 +223,8 @@ func (l2 *L2H) L2FdbAdd(key FdbKey, attr FdbAttr) (int, error) { if p.SInfo.PortType&cmn.PortVxlanBr == cmn.PortVxlanBr { unRch, ret, err := nfdb.L2FdbResolveNh() if err != nil { - tk.LogIt(tk.LogDebug, "tun-fdb ent resolve error, %v", key) - return ret, err + tk.LogIt(tk.LogDebug, "tun-fdb ent resolve error, %v:%s(%d)", key, err, ret) + //return ret, err } nfdb.unReach = unRch } diff --git a/pkg/loxinet/port.go b/pkg/loxinet/port.go index d518a6a67..1c37d61be 100644 --- a/pkg/loxinet/port.go +++ b/pkg/loxinet/port.go @@ -914,8 +914,8 @@ func (p *Port) DP(work DpWorkT) int { ipts.Qfi = 0 ipts.TTeID = 0 - //mh.dp.ToDpCh <- ipts - DpWorkSingle(mh.dp, ipts) + mh.dp.ToDpCh <- ipts + //DpWorkSingle(mh.dp, ipts) return 0 } @@ -945,8 +945,8 @@ func (p *Port) DP(work DpWorkT) int { rmWq.TunType = DpTunVxlan rmWq.BD = p.L2.Vid - //mh.dp.ToDpCh <- rmWq - DpWorkSingle(mh.dp, rmWq) + mh.dp.ToDpCh <- rmWq + //DpWorkSingle(mh.dp, rmWq) return 0 } @@ -963,8 +963,8 @@ func (p *Port) DP(work DpWorkT) int { pWq.IngVlan = p.L2.Vid pWq.SetBD = p.L2.Vid pWq.SetZoneNum = zoneNum - //mh.dp.ToDpCh <- pWq - DpWorkSingle(mh.dp, pWq) + mh.dp.ToDpCh <- pWq + //DpWorkSingle(mh.dp, pWq) return 0 } @@ -984,8 +984,8 @@ func (p *Port) DP(work DpWorkT) int { pWq.SetPol = p.SInfo.PortPolNum pWq.SetMirr = p.SInfo.PortMirNum - //mh.dp.ToDpCh <- pWq - DpWorkSingle(mh.dp, pWq) + mh.dp.ToDpCh <- pWq + //DpWorkSingle(mh.dp, pWq) } return 0 } @@ -1040,7 +1040,8 @@ func (p *Port) DP(work DpWorkT) int { } rmWq.Status = &p.Sync rmWq.PortNum = p.PortNo - DpWorkSingle(mh.dp, rmWq) + //DpWorkSingle(mh.dp, rmWq) + mh.dp.ToDpCh <- rmWq } } else if work == DpRemove { if p.SInfo.BpfLoaded == true { @@ -1069,7 +1070,8 @@ func (p *Port) DP(work DpWorkT) int { } rmWq.Status = &p.Sync rmWq.PortNum = p.PortNo - DpWorkSingle(mh.dp, rmWq) + //DpWorkSingle(mh.dp, rmWq) + mh.dp.ToDpCh <- rmWq } } } @@ -1079,8 +1081,8 @@ func (p *Port) DP(work DpWorkT) int { } // TODO - Need to unload eBPF when port properties change - //mh.dp.ToDpCh <- pWq - DpWorkSingle(mh.dp, pWq) + mh.dp.ToDpCh <- pWq + //DpWorkSingle(mh.dp, pWq) return 0 } diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go index 3056f5842..14c232a8d 100644 --- a/pkg/loxinet/rules.go +++ b/pkg/loxinet/rules.go @@ -1576,7 +1576,7 @@ func (R *RuleH) DeleteNatLbRule(serv cmn.LbServiceArg) (int, error) { eEps := rule.act.action.(*ruleNatActs).endPoints activatedProbe := false - if rule.act.action.(*ruleNatActs).mode == cmn.LBModeOneArm || rule.hChk.actChk { + if rule.act.action.(*ruleNatActs).mode == cmn.LBModeOneArm || rule.act.action.(*ruleNatActs).mode == cmn.LBModeFullNAT || rule.hChk.actChk { activatedProbe = true } R.modNatEpHost(rule, eEps, false, activatedProbe)