Skip to content

Commit

Permalink
Merge branch 'loxilb-io:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-netlox authored Mar 4, 2024
2 parents 32b08ed + c7f2734 commit 1de2fbb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ const (
LbSelPrio
// LbSelRrPersist - persist connectons from same client
LbSelRrPersist
// LbSelLeastConnections - select client based on least connections
LbSelLeastConnections
)

// LBMode - Variable to define LB mode
Expand Down
2 changes: 1 addition & 1 deletion loxilb-ebpf
1 change: 1 addition & 0 deletions loxinet/dpbroker.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ const (
EpHash
EpPrio
EpRRPersist
EpLeastConn
)

// NatEP - a nat end-point
Expand Down
2 changes: 2 additions & 0 deletions loxinet/dpebpf_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,8 @@ func DpNatLbRuleMod(w *NatDpWorkQ) int {
dat.sel_type = C.NAT_LB_SEL_HASH
case w.EpSel == EpRRPersist:
dat.sel_type = C.NAT_LB_SEL_RR_PERSIST
case w.EpSel == EpLeastConn:
dat.sel_type = C.NAT_LB_SEL_LC
/* Currently not implemented in DP */
/*case w.EpSel == EP_PRIO:
dat.sel_type = C.NAT_LB_SEL_PRIO*/
Expand Down
2 changes: 2 additions & 0 deletions loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,8 @@ func (r *ruleEnt) Nat2DP(work DpWorkT) int {
nWork.EpSel = EpRR
case at.sel == cmn.LbSelRrPersist:
nWork.EpSel = EpRRPersist
case at.sel == cmn.LbSelLeastConnections:
nWork.EpSel = EpLeastConn
default:
nWork.EpSel = EpRR
}
Expand Down

0 comments on commit 1de2fbb

Please sign in to comment.